-
Notifications
You must be signed in to change notification settings - Fork 60
Could I use SQL syntax to query to Tarantool? #62
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
Comments
What prevents you from doing a wrapper over conn and inserting the Eval function there? |
Let's consider this issue as 'bare minimum SQL support': just IPROTO_EXECUTE, without prepared statements and extended metainfo. I would like to see an API proposal before we'll start the implementation. |
That patch adds the support of SQL in connector. Fixes #62
This patch adds the support of SQL in connector. Fixes #62
Added the test covered examples of using SQL from connector. Updated config.lua by creation the space for testing SQL from example. Follows up #62
This patch adds the support of SQL in connector. Added all required constants in const.go for encoding SQL in msgpack. Fixes #62
Added the test covered examples of using SQL from connector. Updated config.lua by creation the space for testing SQL from example. Follows up #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Follows up #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Follows up #62
Probably we need to create PR for docs as well, where update status of SQL support in connector. |
This patch adds the support of SQL in connector. Added support of positional and named arguments. Added all required constants in const.go for encoding SQL in msgpack and decoding response. Fixes #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Changed id of the test space with id=512, cause if using SQL there is no ability to set space id explicitly, so it gets created with id=512 by default and conflicts with already existing space with the same id. Follows up #62
This patch adds the support of SQL in connector. Added support of positional and named arguments. Added all required constants in const.go for encoding SQL in msgpack and decoding response. Fixes #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Changed id of the test space with id=512, cause if using SQL there is no ability to set space id explicitly, so it gets created with id=512 by default and conflicts with already existing space with the same id. Follows up #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Changed id of the test spaces with id=512 and id=514, cause if using SQL in tarantool there is no ability to set space id explicitly, so it gets created with id=512 by default and conflicts with already existing space with the same id. Follows up #62
This patch adds the support of SQL in connector. Added support of positional and named arguments. Added all required constants in const.go for encoding SQL in msgpack and decoding response. Fixes #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Changed id of the test spaces with id=512 and id=514, cause if using SQL in tarantool there is no ability to set space id explicitly, so it gets created with id=512 by default and conflicts with already existing space with the same id. Follows up #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Changed id of the test spaces with id=512 and id=514, cause if using SQL in tarantool there is no ability to set space id explicitly, so it gets created with id=512 by default and conflicts with already existing space with the same id. Added new dependency in go.sum, go.mod for using assert package. Follows up #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Changed id of the test spaces with id=512 and id=514, cause if using SQL in tarantool there is no ability to set space id explicitly, so it gets created with id=512 by default and conflicts with already existing space with the same id. Added new dependency in go.sum, go.mod for using assert package. Follows up #62
Added SQL tests. Updated config.lua for creation the space for using SQL in tests. Added the check of Tarantool version to skip SQL tests if tarantool version < 2.0.0. Changed id of the test spaces with id=512 and id=514, cause if using SQL in tarantool there is no ability to set space id explicitly, so it gets created with id=512 by default and conflicts with already existing space with the same id. Added new dependency in go.sum, go.mod for using assert package. Follows up #62
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Updated CHANGELOG.md. Follows up #62 Closes #117
Added ExecuteTyped/ExecuteAsync implementation to multi package. CHANGELOG.md updated. Follows up #62
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Added mock for ConnectedRequest interface for tests. Follows up #62 Closes #117
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Added mock for ConnectedRequest interface for tests. Follows up #62 Closes #117
Added ExecuteTyped/ExecuteAsync implementation to multi package. CHANGELOG.md updated. Follows up #62
This patch adds the support of prepared statements. Added a new type for handling prepared statements. Added new IPROTO-constants for support of prepared statements in const.go. Added benchmarks for SQL-select prepared statement. Added examples of using Prepare in example_test.go. Fixed some grammar inconsistencies for the method Execute. Added a test helper for checking if SQL is supported in connected Tarantool. Updated CHANGELOG.md. Added mock for ConnectedRequest interface for tests. Follows up #62 Closes #117
Overview This release adds a number of features. The extending of the public API has become possible with a new way of creating requests. New types of requests are created via chain calls: selectReq := NewSelectRequest("space"). Context(ctx). Index(1). Offset(5). Limit(10) future := conn.Do(selectReq) Streams, context and prepared statements support are based on this idea: stream, err := conn.NewStream() beginReq := NewBeginRequest().Context(ctx) if response, err := stream.Do(beginReq).Get(); err != nil { selectFuture := stream.Do(selectReq) commitFuture := stream.Do(NewCommitRequest()) // ... } ``` Breaking changes NewErrorFuture function removed (#190). `IPROTO_*` constants that identify requests renamed from `<Name>Request` to `<Name>RequestCode` (#126) New features SSL support (#155). IPROTO_PUSH messages support (#67). Public API with request object types (#126). Support decimal type in msgpack (#96). Support datetime type in msgpack (#118). Prepared SQL statements (#117). Streams and interactive transactions support (#101). `Call16` method, support build tag `go_tarantool_call_17` to choose default behavior for `Call` method as Call17 (#125) Bugfixes Add `ExecuteAsync` and `ExecuteTyped` to common connector interface (#62).
Add context, streams, SQL and push messages support in Go connector Follows up tarantool/go-tarantool#48 Follows up tarantool/go-tarantool#62 Follows up tarantool/go-tarantool#67 Follows up tarantool/go-tarantool#101
Add context, streams, SQL and push messages support in Go connector Follows up tarantool/go-tarantool#48 Follows up tarantool/go-tarantool#62 Follows up tarantool/go-tarantool#67 Follows up tarantool/go-tarantool#101
Overview This release adds a number of features. The extending of the public API has become possible with a new way of creating requests. New types of requests are created via chain calls: selectReq := NewSelectRequest("space"). Context(ctx). Index(1). Offset(5). Limit(10) future := conn.Do(selectReq) Streams, context and prepared statements support are based on this idea: stream, err := conn.NewStream() beginReq := NewBeginRequest().Context(ctx) if response, err := stream.Do(beginReq).Get(); err != nil { selectFuture := stream.Do(selectReq) commitFuture := stream.Do(NewCommitRequest()) // ... } ``` Breaking changes NewErrorFuture function removed (#190). `IPROTO_*` constants that identify requests renamed from `<Name>Request` to `<Name>RequestCode` (#126) New features SSL support (#155). IPROTO_PUSH messages support (#67). Public API with request object types (#126). Support decimal type in msgpack (#96). Support datetime type in msgpack (#118). Prepared SQL statements (#117). Streams and interactive transactions support (#101). `Call16` method, support build tag `go_tarantool_call_17` to choose default behavior for `Call` method as Call17 (#125) Bugfixes Add `ExecuteAsync` and `ExecuteTyped` to common connector interface (#62).
Overview This release adds a number of features. The extending of the public API has become possible with a new way of creating requests. New types of requests are created via chain calls: selectReq := NewSelectRequest("space"). Context(ctx). Index(1). Offset(5). Limit(10) future := conn.Do(selectReq) Streams, context and prepared statements support are based on this idea: stream, err := conn.NewStream() beginReq := NewBeginRequest().Context(ctx) if response, err := stream.Do(beginReq).Get(); err != nil { selectFuture := stream.Do(selectReq) commitFuture := stream.Do(NewCommitRequest()) // ... } ``` Breaking changes NewErrorFuture function removed (#190). `IPROTO_*` constants that identify requests renamed from `<Name>Request` to `<Name>RequestCode` (#126) New features SSL support (#155). IPROTO_PUSH messages support (#67). Public API with request object types (#126). Support decimal type in msgpack (#96). Support datetime type in msgpack (#118). Prepared SQL statements (#117). Context support for request objects (#48). Streams and interactive transactions support (#101). `Call16` method, support build tag `go_tarantool_call_17` to choose default behavior for `Call` method as Call17 (#125) Bugfixes Add `ExecuteAsync` and `ExecuteTyped` to common connector interface (#62).
Overview This release adds a number of features. The extending of the public API has become possible with a new way of creating requests. New types of requests are created via chain calls: selectReq := NewSelectRequest("space"). Context(ctx). Index(1). Offset(5). Limit(10) future := conn.Do(selectReq) Streams, context and prepared statements support are based on this idea: stream, err := conn.NewStream() beginReq := NewBeginRequest().Context(ctx) if response, err := stream.Do(beginReq).Get(); err != nil { selectFuture := stream.Do(selectReq) commitFuture := stream.Do(NewCommitRequest()) // ... } ``` Breaking changes NewErrorFuture function removed (#190). `IPROTO_*` constants that identify requests renamed from `<Name>Request` to `<Name>RequestCode` (#126) New features SSL support (#155). IPROTO_PUSH messages support (#67). Public API with request object types (#126). Support decimal type in msgpack (#96). Support datetime type in msgpack (#118). Prepared SQL statements (#117). Context support for request objects (#48). Streams and interactive transactions support (#101). `Call16` method, support build tag `go_tarantool_call_17` to choose default behavior for `Call` method as Call17 (#125) Bugfixes Add `ExecuteAsync` and `ExecuteTyped` to common connector interface (#62).
Overview This release adds a number of features. The extending of the public API has become possible with a new way of creating requests. New types of requests are created via chain calls: selectReq := NewSelectRequest("space"). Context(ctx). Index(1). Offset(5). Limit(10) future := conn.Do(selectReq) Streams, context and prepared statements support are based on this idea: stream, err := conn.NewStream() beginReq := NewBeginRequest().Context(ctx) if response, err := stream.Do(beginReq).Get(); err != nil { selectFuture := stream.Do(selectReq) commitFuture := stream.Do(NewCommitRequest()) // ... } ``` Breaking changes NewErrorFuture function removed (#190). `IPROTO_*` constants that identify requests renamed from `<Name>Request` to `<Name>RequestCode` (#126) New features SSL support (#155). IPROTO_PUSH messages support (#67). Public API with request object types (#126). Support decimal type in msgpack (#96). Support datetime type in msgpack (#118). Prepared SQL statements (#117). Context support for request objects (#48). Streams and interactive transactions support (#101). `Call16` method, support build tag `go_tarantool_call_17` to choose default behavior for `Call` method as Call17 (#125) Bugfixes Add `ExecuteAsync` and `ExecuteTyped` to common connector interface (#62).
The patch adds context, streams, SQL, push messages and master discovery support for connection pool to go-tarantool. It also updates GitHub starts for Go connectors. Follows up tarantool/go-tarantool#48 Follows up tarantool/go-tarantool#62 Follows up tarantool/go-tarantool#67 Follows up tarantool/go-tarantool#101 Follows up tarantool/go-tarantool#113
Resolves #3094 The patch adds context, streams, SQL, push messages and master discovery support for connection pool to go-tarantool. It also updates GitHub starts for Go connectors. Follows up tarantool/go-tarantool#48 Follows up tarantool/go-tarantool#62 Follows up tarantool/go-tarantool#67 Follows up tarantool/go-tarantool#101 Follows up tarantool/go-tarantool#113
Like this:
resp, err := conn.Eval(
SELECT * FROM table1 WHERE column1 = 1;
, []interface{}{})Because I don't like to use the 'box.sql.execute'.
The text was updated successfully, but these errors were encountered: