-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OverrideSchema not working as expected #318
Comments
The connector does not support an automatic schema reload after a space/index creation: #7 . So you need:
The |
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
And throwing it into insert query gives me "Tuple field 2 (time) type does not match one required by operation: expected datetime, got extension" |
You need to use |
This patch modifies `Connect` api. Now, to connect to the Tarantool, you need to pass an object that satisfies `tarantool.Dialer` interface. You can use one of the existing implementations: `TtDialer` or `OpenSslDialer`. For example: ``` conn, err := tarantool.Connect(context.Background(), tarantool.TtDialer{ Address: "127.0.0.1:3301", User: "user", Password: "secret", }, tarantool.Opts{}) ``` To create a connection pool, you need to pass a `map[string]tarantool.Dialer`, where each dialer is associated with a unique ID (for example, it can be the server address). Connections will be distinguished from each other using these IDs. For example: ``` connPool, err := pool.Connect(context.Background(), map[string]tarantool.Dialer{ "127.0.0.1": tarantool.TtDialer{ Address: "127.0.0.1", User: "user", Password: "secret", }, }, tarantool.Opts{}) ``` The `conn.RemoteAddr` and `conn.LocalAddr` functions have been removed. To obtain the connection address, you can use `conn.Addr`. This function panics if the connection has not been established. Now, `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation. In the case of connection pool, watchers are created for connections that support this feature. `ClientProtocolInfo`, `ServerProtocolInfo` were removed. Now, there is `ProtocolInfo`, which returns the server protocol info. Part of #318
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?
The text was updated successfully, but these errors were encountered: