Commit Graph
159 Commits
Author SHA1 Message Date
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
Michał Matczuk 8ea6a9d5f5 queryx: added Iter function
Fixes #64
2018-10-23 16:32:30 +02:00
Michał Matczuk 68ea72072a makefile: bump goloangci-lint to 1.10.2 2018-10-23 15:57:24 +02:00
Michał Matczuk 5aa68226b4 travis: bump go to 1.11.1 2018-10-23 15:57:24 +02:00
Michał Matczuk bbb21ea945 CompileNamedQuery: fix doc string to include escaping ::
Fixes #56
2018-10-23 15:52:54 +02:00
Michał Matczuk 620bef0b6c workaround for gocql bug gocql/gocql#1161 2018-08-23 15:20:02 +02:00
Michał Matczuk 1064db9f88 benchmark fix and update
Fixed double insert bug in BenchmarkE2EGocqlInsert. Modernized other
benchmarks to use new API that releases query where applicable. Updated
benchmark results with new version of libraries and Scylla 2.2.

Fixes #61
2018-08-23 15:20:02 +02:00
Michał Matczuk f8424b00b9 added golangci (#59) 2018-08-07 16:16:24 +02:00
Vincent Rischmann 2f13a81c46 Add qb.ContainsKey to query keys in a map (#57)
qb: add ContainsKey and ContainsKeyNamed
2018-07-28 06:56:44 +02:00
Michał Matczuk 9b530002fa travis: fixed go to 1.10.x 2018-07-28 06:54:20 +02:00
Michał Matczuk 47c22c9fd2 makefile: switched to golangci-lint 2018-07-28 06:54:20 +02:00
Henrik Johansson a9f91f5f4b generated an initial go.mod file.
Fixes: #46
2018-06-01 12:02:46 +02:00
Michał Matczuk d5caed56c3 readme: updated docs 2018-05-25 14:20:59 +02:00
Michał Matczuk fa402f3f0c qb: using ttl timestamp
Fixes: #40
2018-05-25 14:05:55 +02:00
Michał Matczuk e8ffe4afe9 makefile: added reflectx tests 2018-05-25 11:17:07 +02:00
Michał Matczuk daad194304 reflectx: fixes to items reported by megacheck 2018-05-25 11:17:07 +02:00
Michał Matczuk aef66f4663 reflectx: code ported from github.com/jmoiron/sqlx a2429ba
Depending on sqlx makes users pull SQL related code that is usually not
needed. Tools like dep make it easier by explicitly listing relevant
subpackages but the code needs to be downloaded anyway.
2018-05-25 11:17:07 +02:00
Michał Matczuk 1fec441dbc makefile: synchronise testing of packages
Packages are tested in parallel by default, as we have integration tests
in root package and migrate it fails sometimes.
2018-05-24 14:36:14 +02:00
Michał Matczuk 512f8f1e25 travis: scyla disable in-memory mode 2018-05-24 14:36:14 +02:00