16 Commits

Author SHA1 Message Date
84c58f45a3 Delete everything except query builder 2025-11-20 16:09:09 +01:00
Dmitry Kropachev
38001d64ac Update gocql version to v1.16.1 (#353)
* Update gocql version to v1.16.1

1. Update gocql to v1.16.1
2. Update golang to 1.25, since new gocql version requres it

* Update golangci to 2.5.0

It is needed since 1.64.8 does not support golang 1.25.
1. Update golangci to 2.5.0
2. Migrate from golangci config v1 to v2
3. Integrate fieldaligment to golangci
4. Drop fieldaligment from Makefile
5. Address complaints
2025-10-28 14:52:22 -04:00
Michał Matczuk
ab279e68ed Automated UDT support
This patch adds the power of GocqlX to UDTs.
Now you can make a struct be UDT compatible by adding a single line.

```
type FullName struct {
	gocqlx.UDT
	FirstName string
	LastName  string
}
```

Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-21 09:41:41 +02:00
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
7c0a35d621 iterx: Move isScannable to Iterx
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-16 12:39:34 +02: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
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
cca99d4a42 makefile: added megacheck 2018-05-22 15:03:59 +02:00
Michał Matczuk
9e40fcfed4 license: added license header 2017-09-21 21:43:27 +02:00
Michał Matczuk
4025a4d426 docs: whitespace fix 2017-08-23 16:07:55 +02:00
Michał Matczuk
4be0a35207 iter: unsafe 2017-08-23 15:26:16 +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
fee479a584 Iterx put to separate file 2017-07-25 11:09:41 +02:00
Michał Matczuk
51c33ef077 release query 2017-07-25 09:13:47 +02:00
Michał Matczuk
f31e47d7bb simple readme and example_test 2017-07-25 08:20:16 +02:00
Michał Matczuk
6653e63afd initial version 2017-07-24 13:00:21 +02:00