Skip to content

Conversation

@drewdzzz
Copy link
Collaborator

@drewdzzz drewdzzz commented Nov 28, 2023

The patch provides client with execute and prepare requests. Execute allows to pass an SQL statement or id of a prepared statement and parameters for it. Response body is populated with sql fields.

Closes #34

@drewdzzz drewdzzz added the do not merge Not ready to be merged label Nov 29, 2023
@drewdzzz drewdzzz removed the do not merge Not ready to be merged label Dec 4, 2023
@drewdzzz drewdzzz force-pushed the conn_execute branch 2 times, most recently from 83c5c9d to 8f68bcb Compare December 5, 2023 13:48
@drewdzzz drewdzzz marked this pull request as ready for review December 5, 2023 13:48
@drewdzzz drewdzzz changed the title Provide tntcxx with SQL Client: support execute and prepare Dec 5, 2023
Data contains a pair of iterators, which are considered to be light -
let's copy iterator before decoding data to allow to decode the same
data several times (or it can be decoded, and then encoded to send to
another tarantool from router).
Copy link
Member

@CuriousGeorgiy CuriousGeorgiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks great, and very clean!

There was an explicit request that we promised to fulfill: please add some examples to the ./examples. Maybe a separate example or as part of the Simple one.

The patch provides client with execute and prepare requests. Execute
allows to pass an SQL statement or id of a prepared statement and
parameters for it. Response body is populated with sql fields.

Co-authored-by: AnastasMIPT <[email protected]>
@drewdzzz
Copy link
Collaborator Author

drewdzzz commented Dec 5, 2023

@CuriousGeorgiy Added a new example. Please check if it clearly explains all capabilities of SQL in tntcxx.

The commit introduces new example `Sql`, which demonstrates usage of
prepare and execute requests - in other words, it shows how to use SQL
with tntcxx. The example is designed to cover all possible sql metadata
fields.
@drewdzzz drewdzzz assigned alyapunov and unassigned drewdzzz Dec 6, 2023
@drewdzzz drewdzzz mentioned this pull request Dec 6, 2023
@alyapunov alyapunov merged commit ac90048 into tarantool:master Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add execute statement

3 participants