Closed verybadcoder01 closed 1 year ago
The connector does not support an automatic schema reload after a space/index creation: https://github.com/tarantool/go-tarantool/issues/7 .
So you need:
Call()
.Call()
.The OverrideSchema
method just overwrites a schema data from a Tarantool instance. It does not create any space/index. It does not modify a schema data on the Tarantool instance. You could to skip creating a new connection (step 3) after a space/index creation with the method.
Thank you, I get it now. I guess this doesn't relate to this issue, but that's just something I also couldn't find an answer for. How to marshall time.Time into tarantool datetime field? I have a struct like
type Tuple struct {
_msgpack struct{} `msgpack:",asArray"` //nolint // that's the doc
Value string
Time time.Time
}
And throwing it into insert query gives me "Tuple field 2 (time) type does not match one required by operation: expected datetime, got extension"
Do I have to use msgpack:"something"
for this?
Thank you, I get it now. I guess this doesn't relate to this issue, but that's just something I also couldn't find an answer for. How to marshall time.Time into tarantool datetime field?
You need to use github.com/tarantool/go-tarantool/datetime
subpackage and Datetime
type instead of time.Time
, see examples.
I'm trying to create space with indexes and everything with my go application. At firtst I tried doing this by calling lua functions directly via
tarantool.Call()
, but that's just painful, so I looked around and foundOverrideSchema()
function. Unfortunately, I could not find any documentation for it. I wrote some code:This doesn't seem to do anything. At least, it doesn't create a space in tarantool (and that's what I want). What am I missing? Do I have to stick with direct function calling approach?