Commit Graph

18 Commits

Author SHA1 Message Date
Martin Sucha
a08a66ee85 iterx: Allow forcing scanning as struct
We have a structure type that implements UnmarshalCQL method.
We use it to unmarshal a user defined type. We also want to use the same struct for scanning an entire row.

There is StructScan method available in gocqlx for this purpose when iterating over rows, but no equivalent when doing a Select.
This commit introduces the possibility when doing select/get as well.

Co-authored-by: Michał Matczuk <michal@scylladb.com>
2020-04-17 09:26:48 +02: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
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
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
8ea6a9d5f5 queryx: added Iter function
Fixes #64
2018-10-23 16:32:30 +02:00
Michał Matczuk
bbb21ea945 CompileNamedQuery: fix doc string to include escaping ::
Fixes #56
2018-10-23 15:52:54 +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
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
Justin Nuß
439bce4bdc avoid one allocation when binding structs 2017-12-15 09:51:32 +01:00
Michał Matczuk
9e40fcfed4 license: added license header 2017-09-21 21:43:27 +02:00
Michał Matczuk
46603152a1 error: %s replaced with %q in missing field errors 2017-09-21 21:29:44 +02:00
Michał Matczuk
1da2c19fe8 query: Query return ptr 2017-08-24 12:32:37 +02:00
Michał Matczuk
de9287b6e7 queryx: exec release 2017-08-22 11:36:21 +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
41bb8def2a qb: doc 2017-07-31 15:30:26 +02:00
Michał Matczuk
871a3693ad compile named query: drop of loop over runes 30% performance improvement 2017-07-26 09:10:35 +02:00
Michał Matczuk
f3b13bf31b queryx 2017-07-25 14:12:07 +02:00