Skip to content

Conversation

@AnastasMIPT
Copy link
Contributor

@AnastasMIPT AnastasMIPT commented Jul 2, 2021

Added support for sql queries. Implemented methods:

Added new structures ColumnMap, SqlInfo, Metadata and readers for them.
Added tests for the methods above.

@AnastasMIPT AnastasMIPT changed the title Abelyaev/sql statements Providing SQL statements Jul 2, 2021
@AnastasMIPT AnastasMIPT force-pushed the abelyaev/sql_statements branch 3 times, most recently from 28c96aa to 29381bf Compare July 6, 2021 13:33
@AnastasMIPT AnastasMIPT force-pushed the abelyaev/sql_statements branch 15 times, most recently from e37bed3 to 9973d2d Compare July 21, 2021 11:15
Copy link
Contributor

@Korablev77 Korablev77 left a comment

Choose a reason for hiding this comment

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

Otherwise seems to be great!

@AnastasMIPT AnastasMIPT force-pushed the abelyaev/sql_statements branch 3 times, most recently from 035f77f to 01977e0 Compare August 21, 2021 14:43
@AnastasMIPT AnastasMIPT force-pushed the abelyaev/sql_statements branch from 01977e0 to f644742 Compare August 21, 2021 14:49
TEST_CASE("CREATE TABLE");
rid_t create_table = conn.execute("CREATE TABLE IF NOT EXISTS testing_sql "
"(column1 UNSIGNED PRIMARY KEY, "
"column2 VARCHAR(50), "
Copy link
Contributor

Choose a reason for hiding this comment

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

Add also test cases including collations, autoincrements, different spans etc so that cover all possible values of metadata.

@AnastasMIPT AnastasMIPT force-pushed the abelyaev/sql_statements branch from f644742 to 903a0de Compare August 26, 2021 07:29
-- Added support for execute(), which executes the SQL statement
contained in the sql-statement parameter. It is also possible to
execute an expression by its id, obtained using the prepare() function.
-- Added new structures ColumnMap, SqlInfo, Metadata and readers for them.
-- Added tests to check and as an example of how to use the function.
-- Added support for prepare(), which prepares the SQL statement contained
in the sql-statement parameter. With execute() you can execute the
expression by its id, obtained with the prepare() function.
-- Added tests to check and as an example of how to use the function.
@AnastasMIPT AnastasMIPT force-pushed the abelyaev/sql_statements branch from ef66eb7 to 8b41889 Compare March 31, 2022 07:07
@alyapunov alyapunov assigned Korablev77 and unassigned alyapunov Jul 5, 2022
@Totktonada Totktonada mentioned this pull request Oct 13, 2022
@sergos sergos assigned alyapunov and unassigned Korablev77 Jul 7, 2023
@sergos sergos requested a review from alyapunov July 7, 2023 08:01
@drewdzzz drewdzzz assigned drewdzzz and unassigned alyapunov Oct 19, 2023
@drewdzzz
Copy link
Collaborator

drewdzzz commented Dec 6, 2023

Thank you for the patch!

Unfortunately, tntcxx has changed a lot since your last contribution to this PR. Old decoder (which is used in this patch) was replaced with the new one - it has completely different interface, so the whole decoding part (ResponseReader.hpp) is irrelevant. Encoder hasn't changed much, so even though it requires changes, it only requires minor ones. New connection methods are fully relevant. Regarding the test, it required revision as it doesn't cover extended sql metadata.

I wrote a new patch based on yours, but covering all the flaws I described above, and added you as a co-author. That is why I'm closing this PR as a duplicate of #74.

@drewdzzz drewdzzz closed this Dec 6, 2023
@drewdzzz drewdzzz removed their assignment Dec 6, 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.

4 participants