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

Experiment/sqlx #558

Merged
merged 14 commits into from
Apr 8, 2024
Merged

Experiment/sqlx #558

merged 14 commits into from
Apr 8, 2024

Conversation

zaychenko-sergei
Copy link
Contributor

@zaychenko-sergei zaychenko-sergei commented Mar 20, 2024

Description

Prototyped SQLX infrastructure to support persistent domains.

Checklist before requesting a review

  • CHANGELOG.md updated
  • API changes are backwards-compatible: not relevant
  • Workspace layout changes include a migration: not relevant
  • Documentation update PR: updated
  • Dataset pipelines update scheduled if needed: updated
  • Unit-tests added

DEVELOPER.md Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
DEVELOPER.md Outdated Show resolved Hide resolved
DEVELOPER.md Outdated Show resolved Hide resolved
DEVELOPER.md Show resolved Hide resolved
src/database/database-common/src/db_transaction_manager.rs Outdated Show resolved Hide resolved
src/database/database-common/src/db_transaction_manager.rs Outdated Show resolved Hide resolved
src/database/sqlx-mysql/src/mysql_connection_pool.rs Outdated Show resolved Hide resolved
src/database/sqlx-mysql/src/mysql_plugin.rs Outdated Show resolved Hide resolved
Verry dummy sketch of how to connect to Postgres and MariaDB/MySQL databases and write & read an account information
Separate crates for common database definitions, PostgreSQL and MySQL specific definitions - to run both databases simultaneously
Enable SQLX offline mode for GH
Added check of offline data in `make lint` script
Very basic look of repositories and db-specific components initializer
Simplified initializers of database components
Sketched how transactions management might look like
Prototyped how testing repositories might look like based on `sqlx:test` macro.
Transaction subject hidden in catalog behind double pointer and asynchronous mutex
Added automation for local SQLX setup.
Extended DEVELOPER.md documentation covering database topics.
Experiment with GH actions
Marked database tests with testgroups, disabled database tests on all platforms except Linux
Review: got rid of `unsafe` Send for transaction
Review: TransactionSubject => Transaction
Review: separated transaction managers into dedicated components
Review: not wrapping connection pools, using directly in dill::Catalog
Review: got rid of async-closure
Review: explicit transaction rollback on error
Improve transaction ergonomics

Reorganized domain repository crates.
Simplified database crates.
Makefile has a list of Postgres and MySQL crates and expands them in typical commands

Added top .env file with offline mode enabled by default.
`make sqlx-local-setup` uses lists of dependent crates for all steps.
Automated `make sqlx-local-clean` action that reverses the effect of `make sqlx-local-setup`.
Updated manual with the strategy of having SQLX_OFFLINE mode enabled by default.

Reorganized crates of "task-system" domain
Draft of Task System's Postgres repository implementation.
Pagination support for task events
Support real streaming in Postgres task event store
Support bulk insert
Support windowing
Extended and unified test suite for tasks repositories: applying identical checks for in-mem and Postgres implementation
Cargo.toml Show resolved Hide resolved
DEVELOPER.md Outdated Show resolved Hide resolved
@zaychenko-sergei zaychenko-sergei marked this pull request as ready for review April 8, 2024 07:51
@zaychenko-sergei zaychenko-sergei merged commit 7399e7b into master Apr 8, 2024
6 checks passed
@zaychenko-sergei zaychenko-sergei deleted the experiment/sqlx branch April 8, 2024 11:12
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