Features and Improvements
Minor Improvements
Bugfixes
Miscellaneous
💥Breaking Change
- Rename
in_process_status
argument toin_progress_status
, renamesuccess_status
tosucceeded_status
, renameignore_status
toignored_status
in :meth:`sqlalchemy_mate.patterns.status_tracker.impl.JobMixin.start`.
Features and Improvements
- Add
pending_status
andmore_pending_status
argument to :meth:`sqlalchemy_mate.patterns.status_tracker.impl.JobMixin.start`. Renamein_process_status
argument toin_progress_status
, renamesuccess_status
tosucceeded_status
, renameignore_status
toignored_status
.
Minor Improvements
Bugfixes
Miscellaneous
Features and Improvements
- Add "Large binary column" pattern, support local file and Amazon S3 backend.
- Add the following public API
sqlalchemy_mate.api.patterns.large_binary_column.aws_s3
sqlalchemy_mate.api.patterns.large_binary_column.aws_s3.PutS3BackedColumnResult
sqlalchemy_mate.api.patterns.large_binary_column.aws_s3.put_s3backed_column
sqlalchemy_mate.api.patterns.large_binary_column.aws_s3.clean_up_created_s3_object_when_create_or_update_row_failed
sqlalchemy_mate.api.patterns.large_binary_column.aws_s3.clean_up_old_s3_object_when_update_row_succeeded
sqlalchemy_mate.api.patterns.large_binary_column.aws_s3.PutS3ApiCall
sqlalchemy_mate.api.patterns.large_binary_column.aws_s3.PutS3Result
sqlalchemy_mate.api.patterns.large_binary_column.aws_s3.put_s3
sqlalchemy_mate.api.patterns.large_binary_column.local
sqlalchemy_mate.api.patterns.large_binary_column.local.WriteFileBackedColumnResult
sqlalchemy_mate.api.patterns.large_binary_column.local.write_file_backed_column
sqlalchemy_mate.api.patterns.large_binary_column.local.clean_up_new_file_when_create_or_update_row_failed
sqlalchemy_mate.api.patterns.large_binary_column.local.clean_up_old_file_when_update_row_succeeded
sqlalchemy_mate.api.patterns.large_binary_column.local.WriteFileApiCall
sqlalchemy_mate.api.patterns.large_binary_column.local.WriteFileResult
sqlalchemy_mate.api.patterns.large_binary_column.local.write_file
Minor Improvements
- Use jupyter notebook to generate documentation.
💥Breaking Change
- Rework the public API import. Now you have to use
import sqlalchemy_mate.api as sam
to access the public API.from sqlalchemy_mate import ...
is no longer working. Here's the full list of public API: sqlalchemy_mate.api.selecting.count_row
sqlalchemy_mate.api.selecting.by_pk
sqlalchemy_mate.api.selecting.select_all
sqlalchemy_mate.api.selecting.select_single_column
sqlalchemy_mate.api.selecting.select_many_column
sqlalchemy_mate.api.selecting.select_single_distinct
sqlalchemy_mate.api.selecting.select_many_distinct
sqlalchemy_mate.api.selecting.select_random
sqlalchemy_mate.api.selecting.yield_tuple
sqlalchemy_mate.api.selecting.yield_dict
sqlalchemy_mate.api.inserting.smart_insert
sqlalchemy_mate.api.updating.update_all
sqlalchemy_mate.api.updating.upsert_all
sqlalchemy_mate.api.deleting.delete_all
sqlalchemy_mate.api.test_connection
sqlalchemy_mate.api.EngineCreator
sqlalchemy_mate.api.ExtendedBase
sqlalchemy_mate.api.TimeoutError
sqlalchemy_mate.api.io.sql_to_csv
sqlalchemy_mate.api.io.table_to_csv
sqlalchemy_mate.api.pt.from_result
sqlalchemy_mate.api.pt.from_text_clause
sqlalchemy_mate.api.pt.from_stmt
sqlalchemy_mate.api.pt.from_table
sqlalchemy_mate.api.pt.from_model
sqlalchemy_mate.api.pt.from_dict_list
sqlalchemy_mate.api.pt.from_everything
sqlalchemy_mate.api.patterns.status_tracker.JobLockedError
sqlalchemy_mate.api.patterns.status_tracker.JobIgnoredError
sqlalchemy_mate.api.patterns.status_tracker.JobMixin
sqlalchemy_mate.api.patterns.status_tracker.Updates
- Rework the public API import. Now you have to use
Features and Improvements
- Add status tracker pattern.
💥Breaking Change
- From
sqlalchemy_mate>=2.0.0.0
, it only supportsqlalchemy>=2.0.0
and only compatible with sqlalchemy 2.X API. Everything marked asno longer supported
orno longer accepted
in SQLAlchemy 2.0 - Major Migration Guide document will no longer be supported from this version. - Drop Python3.7 support. Now it only support 3.8+.
Features and Improvements
- Fully adapt sqlalchemy 2.X API.
Minor Improvements
- Migrate to cookiecutter-pyproject v4 code skeleton.
Bugfixes
- fix a syntax bug in
requirements.txt
Features and Improvements
- add
sqlalchemy_mate.types.JSONSerializableType
- add
sqlalchemy_mate.types.CompressedStringType
- add
sqlalchemy_mate.types.CompressedBinaryType
- add
sqlalchemy_mate.ExtendedBase.select_all
method
Bugfixes
- Fix the underlying implementation type for
sqlalchemy_mate.types.CompressedJSONType
Features and Improvements
- add
sqlalchemy_mate.types.CompressedJSONType
column type. - add
sqlalchemy_mate.selecting.by_pk
function.
Features and Improvements
- fully migrate to
sqlalchemy
1.4+ 2.0 styled API, dropped < 1.3 API support - maintain a big version number compatability with Sqlalchemy, won't be responsible to be compatible with different major version. For example,
sqlalchemy_mate==1.4.x
maintain compatibility tosqlalchemy>=1.4.0,<1.5.0
.
Features and Improvements
ExtendedBase.by_id
is renamed toExtendedBase.by_pk
. The old method name is kept for backward API compatibility.- add
ExtendedBase.pk_fields
method - refact
ExtendedBase.update_all
method, allow working with session
Minor Improvements
- move CI to GitHub Action.
- add unit test on Windows
Bugfixes
Miscellaneous
- use in-package timeout_decorator library to ensure api compatibility
Minor Improvements
add type hint.
Features and Improvements
- pretty table
from_everything
now support textual sql - add
ExtendedBase.random()
method
Minor Improvements
- More edge case test
- allow user to assign engine to
ExtendedBase._settings_engine
and then access engine and session withExtendedBase.get_eng()
,ExtendedBase.get_ses()
Bugfixes
Miscellaneous
- include type hint!
Bugfixes
- fix import error in
Credential.from_env
with AWS KMS.
Miscellaneous
- allow
EngineCreator
to return sqlalchemy connect string. - improved docs
Features and Improvements
- add
test_connection(engine, timeout=3)
function. - integrate
Credential.from_env
with AWS Key management Service.
Miscellaneous
- Deprecating
sqlalchemy_mate.engine_creator
Bugfixes
- add
import boto3
inCredential.from_s3_json()
Features and Improvements
ExtendedBase.keys()
now is a class method.ExtendedBase.glance()
can print major attributes and values.- A New DB Credential reader
from sqlalchemy_mate import Credential, EngineCreator
Minor Improvements
- change
FromClause.count()
->func.count()
, since previous one will be deprecated soon in sqlalchemy.
Features and Improvements
- add
ExtendedBase.pk_names
,ExtendedBase.id_field_name
,ExtendedBase.by_id
,ExtendedBase.by_sql
,ExtendedBase.update_all
,ExtendedBase.upsert_all
.
Minor Improvements
- use
pygitrepo==0.0.21
Miscellaneous
- Now
ExtendedBase.smart_insert
method returns number of insertion operation. So you can see the difference now.
Features and Improvements
- add a
ExtendedBase
class to give orm Declaritive Base more useful method. - add a new method performs
smart_insert
in orm. It is 10 times faster in average than one by one insert. Can do bulk insert even there is aIntegrityError
. - add a new
engine_creator
module to quickly create engines.
Minor Improvements
- now
.crud.select, .crud.insert, .crud.update
are renamed to.crud.selecting, .crud.inserting, .crud.updateing
. - greately improved the doc strings.
Bugfixes
- fix a bug that returns different column name in export query result to
PrettyTable
.
Miscellaneous
- improve testing coverage from 60% to 100%.
- add unittest for import.
- add documentation site.
Features and Improvements
- add more function can create PrettyTable from orm query, orm object, sql statement, table.
Minor Improvements
Bugfixes
- fix a bug that sometimes prettytable using bytes str for column name, now it ensures unicode str.
Miscellaneous
- First release
- Add
insert
,select
,update
,io
,pt
module.