Skip to content

Commit 4eaa354

Browse files
authored
Added support for array_collect() and count(distinct) in queries (#21)
* Added support for array_collect() SQL functions
1 parent 0f44094 commit 4eaa354

File tree

13 files changed

+864
-448
lines changed

13 files changed

+864
-448
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
66
## Unreleased
77

88
### Added
9-
- Latest Oracle Cloud Infrastructure regions and region codes: TYO, ABH, DAC, DOH, IZQ
109
- Cloud only: added support for Global Active Tables. This includes new requests and structs:
1110
- AddReplicaRequest
1211
- DropReplicaRequest
1312
- ReplicaStatsRequest/Result
1413
- ReplicaStats
1514
- Replica
1615
as well as additional replica-related information in TableResult
16+
- Latest Oracle Cloud Infrastructure regions and region codes: TYO, ABH, DAC, DOH, IZQ
17+
- Added support for array_collect() and count(distinct) in queries. These
18+
require server side support which is only available in Oracle NoSQL releases
19+
23.3 and higher and will not be immediately available in the cloud service
1720

1821
### Changed
1922
- Changed copyrights to 2024

internal/test/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ func createClient(cfg *Config) (*nosqldb.Client, error) {
150150
return nil, err
151151
}
152152

153+
client.InTest = true
154+
153155
// if specified, force a specific serial version
154156
if cfg.SerialVersion != 0 {
155157
if cfg.Verbose {

internal/test/nosql_testsuite.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ package test
99

1010
import (
1111
"fmt"
12+
"strings"
1213
"time"
1314

1415
"github.com/oracle/nosql-go-sdk/nosqldb"
@@ -88,6 +89,10 @@ func (suite *NoSQLTestSuite) CreateTable(createStmt string, limits *nosqldb.Tabl
8889
}
8990

9091
res, err := suite.Client.DoTableRequestAndWait(req, 30*time.Second, time.Second)
92+
if err != nil && strings.Contains(err.Error(), "limits on child table") {
93+
req.TableLimits = nil
94+
res, err = suite.Client.DoTableRequestAndWait(req, 30*time.Second, time.Second)
95+
}
9196
suite.Require().NoErrorf(err, "%q: got error %v.", createStmt, err)
9297
if res != nil {
9398
suite.AddToTables(res.TableName)

0 commit comments

Comments
 (0)