Closed
Description
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 found OverrideSchema()
function. Unfortunately, I could not find any documentation for it. I wrote some code:
s.conn.OverrideSchema(&tarantool.Schema{
Version: 1,
Spaces: map[string]*tarantool.Space{
"messages": {
Name: "messages", Id: 1,
Fields: map[string]*tarantool.Field{
"time": {Name: "time", Id: 1, Type: "datetime", IsNullable: false},
"value": {Name: "value", Id: 2, Type: "string", IsNullable: false},
},
Indexes: map[string]*tarantool.Index{
"primary": {
Name: "primary", SpaceId: 1, Unique: false,
Fields: []*tarantool.IndexField{{Id: 1, Type: "datetime"}},
},
},
},
},
})
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?