Commit Graph

26 Commits

Author SHA1 Message Date
Michał Matczuk
95d96fa939 Merge pull request #3 from hailocab/upstream-merge
Upstream merge
Add Session wrapper

With this patch we can now use gocqlx like:

```
session.Query(`SELECT * FROM struct_table`, nil).Get(&v)
```

instead of (old format):

```
gocqlx.Query(session.Query(`SELECT * FROM struct_table`), nil).Get(&v)
```

Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-21 10:07:45 +02: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
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
9cfd46fcdd gocqlxtest: test helpers extracted to separate package 2018-05-24 14:36:14 +02:00
Michał Matczuk
6e4a05de42 queryx: added Get, GetRelease, Select and SelectRelease helper functions
I have piggy backed with this change some docs update.

Fixes #41
2018-05-23 11:25:00 +02:00
Josh Giles
cbe2659e0d Do not release queries in Get/Select. Fix #25
Releasing query objects in Get/Select could easily lead to
double-releases, which can cause dangerous and tricky data races.

Remove the query field of Iterx and its usages (all release-related).
This is a breaking API change, because it removes the exported method
ReleaseQuery.

Update documenting examples to demonstrate the deferred query release
pattern clients can use to manage query release.
2017-11-13 10:13:38 +01:00
Michał Matczuk
557674a886 qb: update builder advanced assignments 2017-09-22 09:48:19 +02:00
Michał Matczuk
9e40fcfed4 license: added license header 2017-09-21 21:43:27 +02:00
Michał Matczuk
faa3a42062 readme fix 2017-08-31 16:50:06 +02:00
Michał Matczuk
c4886ff8da batch: extracted AddWithPrefix 2017-08-30 16:26:30 +02:00
Michał Matczuk
0779ef4bf4 cmp: example update 2017-08-30 16:05:24 +02:00
Michał Matczuk
1da2c19fe8 query: Query return ptr 2017-08-24 12:32:37 +02:00
Michał Matczuk
bc289ada45 doc: example and readme fixes 2017-08-03 18:53:04 +02:00
Michał Matczuk
804cfad37c qb: batch builder 2017-08-03 18:46:29 +02:00
Michał Matczuk
fd4e0be6c8 BindStruct, BindStructMap, BindStructMap returns *Queryx 2017-08-02 11:16:31 +02:00
Michał Matczuk
711e3369d6 BindStructMap 2017-08-02 10:24:27 +02:00
Michał Matczuk
e976075998 qb: benchmark 2017-07-31 15:30:34 +02:00
Michał Matczuk
41bb8def2a qb: doc 2017-07-31 15:30:26 +02:00
Michał Matczuk
08b131c5ee mapper: moved mapper to separate file, added snake case mapper
Performance is comparable to sting.ToLower

BenchmarkSnakeCase-4              200000              5922 ns/op            1216 B/op         97 allocs/op
BenchmarkToLower-4                300000              5418 ns/op             704 B/op         74 allocs/op
2017-07-26 11:23:17 +02:00
Michał Matczuk
f3b13bf31b queryx 2017-07-25 14:12:07 +02:00
Michał Matczuk
9676daf60d example use query rebind 2017-07-25 11:08:53 +02:00
Michał Matczuk
51c33ef077 release query 2017-07-25 09:13:47 +02:00
Michał Matczuk
26b3f24e21 move to scylladb 2017-07-25 08:25:58 +02:00
Michał Matczuk
cab262b69a boo 2017-07-25 08:25:58 +02:00
Michał Matczuk
f31e47d7bb simple readme and example_test 2017-07-25 08:20:16 +02:00