Skip to content
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

Integrate knex #64

Closed
B4nan opened this issue Jun 16, 2019 · 1 comment
Closed

Integrate knex #64

B4nan opened this issue Jun 16, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@B4nan
Copy link
Member

B4nan commented Jun 16, 2019

Integrate knex into QueryBuilder and Connection. This will allow handling easier connection pooling implementation and will come handy when building better schema management support (like computing differential updates).

Knex instance will be used as an SQL client in newly created AbstractSqlConnection. It will allow executing plain SQL statements (strings) as well as knex query builder instances. Current QueryBuilder class will use this knex client under the hood to build the query. Users will be able to get this configured knex instance and build custom queries with knex directly.

It should allow us to simplify schema generator and remove some parts of Platform implementations.

This will probably bring some breaking changes. Follow up to #56.

@B4nan B4nan added the enhancement New feature or request label Jun 16, 2019
@B4nan B4nan added this to the 3.0 milestone Jun 16, 2019
@B4nan B4nan self-assigned this Jun 16, 2019
B4nan pushed a commit that referenced this issue Jul 13, 2019
QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
 with '#' will be ignored, and an empty message aborts the commit.
B4nan pushed a commit that referenced this issue Jul 13, 2019
QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan pushed a commit that referenced this issue Jul 15, 2019
QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan pushed a commit that referenced this issue Jul 15, 2019
QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan pushed a commit that referenced this issue Jul 25, 2019
QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Jul 25, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
@B4nan B4nan mentioned this issue Jul 25, 2019
59 tasks
B4nan added a commit that referenced this issue Aug 7, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 7, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 7, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 7, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 8, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 9, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 9, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 9, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 14, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Aug 15, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Sep 2, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Sep 3, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Sep 6, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Sep 15, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
B4nan added a commit that referenced this issue Sep 19, 2019
…#76)

QueryBuilder now internally uses knex to run all queries. As knex already supports connection pooling, thbis feature comes without any effort. New configuration for pooling is now availableAs knex already supports connection pooling, this feature comes without any effort.

BREAKING CHANGES:
Transactions now require using EM.transactional() method, previous helpers `beginTransaction/commit/rollback` are now removed. All transaction management has been removed from IDatabaseDriver interface, now EM handles this, passing the transaction context (carried by EM, and created by Connection) to all driver methods. New methods on EM exists: `isInTransaction` and `getTransactionContext`.
Because of knex being used as a query runner, there are some minor differences in results of plain sql calls (made by calling connection.execute() with string sql parameter instead of using QueryBuilder). Another difference is in postgre driver, that used to require passing parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (?), like in other dialects, so this is now unified with other drivers.

Closes #64
@B4nan
Copy link
Member Author

B4nan commented Sep 20, 2019

Available for testing via next tag.

@B4nan B4nan closed this as completed Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant