Commit Graph
177 Commits
Author SHA1 Message Date
Michał Matczuk 7c0a35d621 iterx: Move isScannable to Iterx
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-16 12:39:34 +02:00
Michał Matczuk bd53297a6c iterx: Change field order
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-16 12:39:34 +02:00
Michał Matczuk e5688d15a8 iterx: Fix a typo in test
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-16 12:39:34 +02:00
Michał Matczuk 2c5ac087ec iterx: Improve error messages 2020-04-16 12:39:34 +02:00
Michał Matczuk 4b8b455fa0 benchmark: Update benchmark
- Run on a single CPU
- Moved query initialisation outside the timed zone

Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-16 12:39:34 +02:00
xiang.wang 27c388ea32 table: Added PrimaryKeyCmp() which returns copy of table's primaryKeyCmp. 2020-04-08 09:23:19 +02:00
xiang.wang fc0b7be8ab table: Added cql.builders for insert, update, delete to enable table batch timestamp at statement granularity. 2020-03-19 09:40:56 +01:00
Aleksandar Jankovic ab2a96d9f3 table: fix data race in select builder usage
When table is used with SelectBuilder it triggers data race on Where()
condition usage.

This change copies underlining slices on table creation to allow safe
concurrent usage of the table.
2020-02-25 16:36:59 +02:00
Guy c36e6c5e66 added training information to readme file 2020-02-10 09:38:36 +01:00
Daniel Lohse ed4fad9742 Add DefaultAwaitSchemaAgreement option (disabled by default)
Depending on what is set, schema agreement is checked before each file or before each statement.
Awaiting schema agreement after every migration has run is always done.
2020-02-05 15:23:06 +01:00
Daniel Lohse 0ee9ef8bda Update gocql version to the latest master 2020-02-05 15:23:06 +01:00
Daniel Lohse 12fcad241d Fix resetting DefaultUnsafe option after the DefaultUnsafe select test 2020-01-15 16:31:47 +01:00
Daniel Lohse a471f98eed Add DefaultUnsafe global
Setting it to true will enable Iter's `Unsafe()` behavior for all queries.
2020-01-15 15:24:45 +01:00
Michał Matczuk 0f06ab790c go mod tidy
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-01-07 16:01:17 +01:00
Michał Matczuk 3cba305eef Revert "Replace gocql => github.com/scylladb/gocql"
This reverts commit 3e60935d2a.
2020-01-07 15:59:15 +01:00
Gian Lorenzo Meocci 45d3524bc1 remove empty line in git ignore 2019-12-16 11:14:11 +01:00
Gian Lorenzo Meocci 9239d9c4b4 add UseColums function to avoid extra allocation performed by Colums function
fix name

tidy

adding SetWhere

adding SetWhere

fix go mod

fix comment style

revert go mod

Avoid to append if no needed

fix git ignore

revert change in go.sum/go.mod

adding specific benchmark
2019-12-16 11:14:11 +01:00
Michał Matczuk a57d58f38f Iterx inherit mapper from Queryx
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-11-08 23:57:04 +01:00
Michał Matczuk 1f3032a787 Travis updated Go and Scylla version
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-11-07 16:13:50 -08:00
Michał Matczuk 1668ca5832 Updated golandci-lint to 1.21.0
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-11-07 16:13:50 -08:00
Michał Matczuk 3e60935d2a Replace gocql => github.com/scylladb/gocql
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-11-07 16:13:50 -08:00
Michał Matczuk c4a576ccbb Added vendor dir to .gitignore
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-11-07 16:13:50 -08:00
pierDipi 180d58ce46 Move ne comparator below eq comparator (#119)
qb: Move ne comparator below eq comparator

Signed-off-by: pierdipi <pierangelodipilato@gmail.com>
2019-11-07 06:29:21 -08:00
Henrik Johansson 8a02fca018 Merge pull request #116 from pierDipi/not-equal
Add not equal comparators (!=)
2019-11-04 16:13:41 +01:00
pierdipi 6f13526544 Add not equal comparator (!=)
The `qb.Cmp` lacks `not equal` methods related to the operator `!=`
even though the documentation
https://docs.scylladb.com/getting-started/dml/#select-statement mentions
it.

Closes: #114

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
2019-11-03 10:01:59 +01:00
Martin Sucha 75adfd59ee Add support for BYPASS CACHE
This commit adds support for BYPASS CACHE extension that is present in
ScyllaDB since 3.1 / 2019.1.1.

https://docs.scylladb.com/getting-started/dml/#bypass-cache
2019-09-17 09:35:54 +02:00
Christoph Oelmueller dd98b0e363 add token value comparer to TokenBuilder (#112)
qb: add token value comparer to TokenBuilder
2019-08-29 14:59:43 +02:00
Henrik JohanssonandPiotr Sarna 8b6f083cdc iterx: paging iteration working
We used to rely upon NumRows to determine if there are
new pages available. This is not correct since the server
is allowed to return empty pages with has_more_data flag
set and the needed data to do this is not exposed by
the gocql driver.

We simply remove these checks and let the driver decide
when to stop reading.

Co-authored-by: Henrik Johansson <henrik@scylladb.com>
Co-authored-by: Piotr Sarna <sarna@scylladb.com>
2019-06-03 11:19:43 +02:00
Henrik Johansson eddedae353 scylla: bump version to 3.0 2019-06-03 11:19:43 +02:00
Henrik Johansson 1fda6f1e29 qb: tuples now returns the correct names
The names are auto generated in the form param_0, param_1, ...
2019-05-14 11:24:25 +02:00
Henrik Johansson 219bceab51 qb: tuple support 2019-05-14 09:12:06 +02:00
Henrik Johansson 31ae81aba6 qb: json support 2019-05-14 08:52:59 +02:00
Henrik Johansson eadf9b5427 mod: dependencies updated 2019-05-14 08:52:59 +02:00
Vishal Rana 3a6a3da0c7 Updated deps
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-24 09:37:01 +02:00
Henrik Johansson a1f46eced2 Merge pull request #97 from scylladb/bump_go_reflectx_version
reflectx: bump go-reflectx version to v1.0.1
2019-03-28 13:55:49 +01:00
Henrik Johansson 049bfa4a92 reflectx: bump go-reflectx version to v1.0.1
Modules files are also updated by "go mod tidy".
2019-03-28 10:54:55 +01:00
Ken 2265c3fdbb fix gocql.Query.WithContext retrun shallow copy bug 2019-02-13 10:54:45 +01:00
Michał Matczuk 0b787f2f06 queryx: wrap all the gocql.Query methods that return *Query to return *Queryx
Fixes #86

Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-01-25 17:05:44 +01:00
Michał Matczuk 2348379a4f reflectx: use github.com/scylladb/go-reflectx
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-01-25 15:41:41 +01:00
Michał Matczuk d20fd5b39c qb: fix formatting
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-01-25 15:41:41 +01:00
Michał Matczuk 15daf0dea4 travis: update go version to 1.11.x
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-01-25 15:41:41 +01:00
Maxim Karelov 6100d3b4c2 Add qb.Like to query keys 2019-01-14 21:41:24 +01:00
Rintaro Okamura 5007a41bf5 Update gocql version 2019-01-07 09:53:50 +01:00
Marian Gappa 87976451ed test(qb): Add tests for qb section (#74)
test(qb): Add missing tests for qb directory

* Add a GROUP BY test without Columns
* Add LtFunc test
* Add LtOrEqFunc test
* Add GtFunc test
* Add GtOrEqFunc test
* Add a Select with a AS between one column test
* Add a Order By DESC test
* Add Sum test
* Add Avg test
* Add Max test
* Add 2 tests for FuncColumn
* Add SetNamed test
* Add AddFunc test
* Add RemoveFunc test
* Add TTL and TimestampNamed test
* Add TTLNamed and Timestamp test
* Add TTL with negative or no duration test
* Add LtFunc test
* Add LtOrEqFunc test
* Add GtFunc test
* Add GtOrEqFunc test
* Add a Select with a AS between one column test
* Add a Order By DESC test
* Add Sum test
* Add Avg test
* Add Max test
* Add SetNamed test
* Add AddFunc test
* Add RemoveFunc test
* Add TTL and TimestampNamed test
* Add TTLNamed and Timestamp test
* Add TTL with negative or no duration test
* Add LtFunc test
* Add LtOrEqFunc test
* Add GtFunc test
* Add GtOrEqFunc test
* Add a Select with a AS between one column test
* Add a Order By DESC test
* Add Sum test
* Add Avg test
* Add Max test
* Add 2 tests for FuncColumn
* Add SetNamed test
* Add AddFunc test
* Add RemoveFunc test
* In qb/select.go, if there are no colums and the query have a GroupBy
statement then the query will be malformated.
* In qb/utils.go, refactor writeCql with a strings.Join call.

Fixes #78
2018-12-17 15:40:03 +01:00
Michał Matczuk dcec9d031f table: added function to return table Metadata 2018-11-15 15:45:49 +01:00
Michal Matczuk b7e4f7e8b7 qb: insert support order by multiple columns (#79)
Fixes #78
2018-11-15 11:55:45 +01:00
Michał Matczuk 8083fa27ee table: introduced table package
It adds support for super simple CRUD operations based on table schema model.
2018-11-14 17:09:03 +01:00
sagarafr a503f75a9c fix(perf): Fixed performance
* Performance are better when you write columns byte by
byte rather than string generation
2018-11-09 16:32:05 +01:00
sagarafr ec81eea1fc test(qb): Add GROUP BY test
* Add a GROUP BY test without Columns
2018-11-09 16:32:05 +01:00
sagarafr 19dedfc6a0 fix(qb): Fixed group by generation
* In qb/select.go, if there are no colums and the query have a GroupBy
statement then the query will be malformated.
* In qb/utils.go, refactor writeCql with a strings.Join call.
2018-11-09 16:32:05 +01:00