Skip to content

Conversation

ptiurin
Copy link
Contributor

@ptiurin ptiurin commented Feb 15, 2024

FIR-30151

Support decoupling of databases and engines (USE DATABASE, USE ENGINES).

Design decisions:

  • Connection object holds initial database/engine that's specified by the user. All cursors created from it inherit these, but also keep them local. This means that cursors change on execution of "USE DATABASE/ENGINE" where they're connected to, but any new cursors from a connection will start from the initial configuration.
  • init_parameters in connection used for parameters that server side returns from USE command. On connect() we execute these queries on system engine if the user supplied database/engine and pass the resulting parameters to the Connection constructor. This ensures connection is initialised as per user parameters.
  • ENGINE_STATUS is now a list, since engines V2 and engines V1 statuses are different.
  • Common properties (database) in cursor moved to the base class, since they're used in both cursor versions.
  • Response header parsing is refactored to a base class since it's common for sync and async.

@ptiurin ptiurin marked this pull request as ready for review February 23, 2024 12:00
@ptiurin ptiurin requested a review from a team as a code owner February 23, 2024 12:00
Copy link

sonarqubecloud bot commented Mar 5, 2024

@ptiurin ptiurin merged commit f4ea8ae into main Mar 5, 2024
@ptiurin ptiurin deleted the feat-use-engine branch March 5, 2024 14:32
@ptiurin ptiurin restored the feat-use-engine branch March 5, 2024 18:28
@ptiurin ptiurin deleted the feat-use-engine branch March 22, 2024 14:53
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.

2 participants