Commit Graph

16 Commits

Author SHA1 Message Date
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
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
Michał Matczuk
d20fd5b39c qb: fix formatting
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2019-01-25 15:41:41 +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
Michal Matczuk
b7e4f7e8b7 qb: insert support order by multiple columns (#79)
Fixes #78
2018-11-15 11:55:45 +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
Michał Matczuk
a8febbc71e testing: benchmarks moved to separate files 2018-05-23 09:39:22 +02:00
SpiritOfWill
5526e60464 Add aggregation function to select query builder (#39)
qb: added min, max, avg, sum, and count to SelectBuilder
2018-05-15 14:07:35 +02:00
Josh Giles
6051038fa5 Add ColumnAs for 'SELECT col AS name' queries. (#24)
Add As helper for 'SELECT col AS name' queries

Clients could do this hackily before by manually passing "col AS name",
but it isn't clearly supported.
2017-12-15 09:53:37 +01:00
Michał Matczuk
9e40fcfed4 license: added license header 2017-09-21 21:43:27 +02:00
Michał Matczuk
8d47a6d133 qb: fixed benchmarks 2017-08-03 17:02:22 +02:00
Michał Matczuk
eb033c4922 qb: removed error from builder ToCql function
Builder is not in a position to validate the statement and the effort is
duplicated when the query is build. The checked errors are simple and
do not occur most of the time.
2017-07-28 12:11:43 +02:00
Michał Matczuk
2afe71e2b9 qb: cmp 2017-07-28 12:11:39 +02:00
Michał Matczuk
546e11d58f qb: select 2017-07-28 12:10:50 +02:00