Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.4.6

- Added `plugins` option to add custom plugins to sqlalchemy engine (e.g. geoalchemy)

# v0.4.5

- Change `infer_foreign_keys` option to `infer_fks` to match other option names (old name still works)
Expand Down
4 changes: 4 additions & 0 deletions subsetter.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ source:
- SET @@session.wait_timeout=28800
- SET @@session.innodb_lock_wait_timeout=3600

# List of plugins to configure the sqlalchemy engine with
plugins: []
# - geoalchemy2

# Set transaction isolation level. Defaults to 'READ COMMITTED' (SERIALIZABLE
# for sqlite).
isolation_level: "READ COMMITTED"
Expand Down
2 changes: 1 addition & 1 deletion subsetter/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.5"
__version__ = "0.4.6"
2 changes: 2 additions & 0 deletions subsetter/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def get_connect_args(
isolation_level: Optional[IsolationLevel] = None
ssl: SSLConfig = SSLConfig()
echo: bool = False
plugins: list[str] = []

def database_url(
self,
Expand Down Expand Up @@ -200,6 +201,7 @@ def database_engine(
env_prefix=env_prefix,
),
echo=self.echo,
plugins=self.plugins,
)

@sa.event.listens_for(engine, "connect")
Expand Down
Loading