- Replace log.Faltal with error wrapping in schemagen func
- Simplify tests, use temp dir and ioutil functions, remove boilerplate code
- In test use schemagen keyspace to avoid name conflict with examples
- Change template
In scylladb/scylla#7781 we added possibility to add timeout as part of USING spec.
This patch adds support for it by adding `Timeout` and `TimeoutNamed` functions to builders.
Fixes#194
This patch adds FromFS function and lets you use the new go:embed directive to add the migration files to the binary.
Also, migration tests use an in memory FS impl instead of working with tmp directories.
It allows to write shorter and more straightforward code.
Instead writing:
```
session.Query(qb.Select("cluster").Columns("id").ToCql())
```
you can write:
```
qb.Select("cluster").Columns("id").Query(session)
```
These shortucuts allows to write shorter more straightforward code.
It allows to write:
```
clusters.InsertQuery(session).BindStruct(r).ExecRelease()
```
instead of:
```
tmt, names := clusters.Insert()
session.Query(stmt,names).BindStruct(r).ExecRelease()
```
Added ExecCAS, ExecCASRelease, GetCAS, GetCASRelease functions
suitable for INSERT ... IF NOT EXISTS and UPDATE's containing IF statement.
Functions returns information wheter query was applied or not, together
with pre-image.
Fixes#98
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>
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>