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

Adding SQL Server support #552

Open
wants to merge 699 commits into
base: sqlserver
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
699 commits
Select commit Hold shift + click to select a range
66d4da9
Merge branch 'master' into orm
sashaaero Aug 5, 2018
b4f87b3
Fix test f strings for Python version < 3.6
sashaaero Aug 5, 2018
f3dec48
Merge branch 'master' into orm
kozlovsky Aug 5, 2018
1683ac0
Fix query optimization
kozlovsky Aug 5, 2018
e1dfdaf
Now exists() in query does not throw away generator expression
sashaaero Aug 7, 2018
ffa446b
Get rid of ponytest and click
sashaaero Aug 7, 2018
6be9266
Translator context added
kozlovsky Aug 5, 2018
e22ed2d
Force joining for genexpr loop variables
kozlovsky Aug 5, 2018
ff556a0
Merge branch `master` to `orm`
kozlovsky Aug 7, 2018
69ddfcc
Add more tests for `exists`
kozlovsky Jul 27, 2018
9dc81a5
New feature: @db.on_connect decorator
sashaaero Aug 7, 2018
c855153
Merge branch `master` to `orm`
kozlovsky Aug 8, 2018
148e013
Closes #371: support of explicit casting of JSON values
sashaaero Aug 8, 2018
5ab8b68
Merge `master` to `orm`
kozlovsky Aug 8, 2018
d007520
on_connect fix
sashaaero Aug 8, 2018
677fadd
Merge branch `master` to `orm`
kozlovsky Aug 8, 2018
79cbee9
Update changelog and pony version: 0.7.6-dev -> 0.7.6rc1
kozlovsky Aug 8, 2018
02fddc3
Pony ORM Release 0.7.6rc1 (2018-08-08)
kozlovsky Aug 8, 2018
585ab81
Fixed a bug with hybrid properties that use external functions
kozlovsky Aug 9, 2018
d88cb15
Improved error message
kozlovsky Aug 9, 2018
8687996
Merge branch `master` to `orm`
kozlovsky Aug 9, 2018
260795e
Update changelog and pony version: 0.7.6rc1 -> 0.7.6
kozlovsky Aug 10, 2018
643e051
Pony ORM Release 0.7.6 (2018-08-10)
kozlovsky Aug 10, 2018
95b3a24
Update Pony version: 0.7.6 -> 0.7.7-dev
kozlovsky Sep 22, 2018
5cc8fa8
typo: NotImplemented used instead of NotImplementedError
sashaaero Sep 19, 2018
810b92f
Negative JSON array indexes in SQLite
kozlovsky Aug 17, 2018
00440cf
Refactoring: normalize EntityIter to Entity
kozlovsky Sep 19, 2018
3e8a952
Improved error message
sashaaero Aug 17, 2018
da35e18
Support of limit in "select from select" type of queries
kozlovsky Sep 22, 2018
fe56efa
Fix #380: db_session should work with async functions
kozlovsky Sep 19, 2018
4000c13
Merge branch master to orm: bugfixes
kozlovsky Sep 22, 2018
76093b9
Remove unused code
kozlovsky Sep 30, 2018
f5e24f2
Add isinstance() support in queries
kozlovsky Sep 30, 2018
bde71b1
Merge branch master to orm
kozlovsky Sep 30, 2018
0f2ce9e
Test added
kozlovsky Sep 30, 2018
dba3891
Merge branch master to orm
kozlovsky Sep 30, 2018
c3af509
Test added
kozlovsky Sep 30, 2018
267bbf0
Merge branch master to orm
kozlovsky Sep 30, 2018
ea6fee1
Typo fixed
kozlovsky Oct 1, 2018
f0ab85b
Merge branch master to orm
kozlovsky Oct 1, 2018
890ee84
Fixes #385: Tests fail with python3.6
sashaaero Oct 3, 2018
3a315d2
Merge branch 'master' into orm
sashaaero Oct 3, 2018
287a05e
Fixes #386: `release unlocked lock` error in SQLite
kozlovsky Oct 5, 2018
5345c81
Merge branch master to orm
kozlovsky Oct 5, 2018
d4b0291
Fixes #390: "TypeError: writable buffers are not hashable"
kozlovsky Oct 16, 2018
4a150dd
Merge branch master to orm
kozlovsky Oct 16, 2018
1934624
Entity __getitem__ works with Entity.get_pk() even if pk is compostite
sashaaero Oct 9, 2018
b237258
Fixes #398: Added support of numpy types
sashaaero Oct 20, 2018
a733a85
Merge branch 'master' into orm
sashaaero Oct 20, 2018
4f0f2ad
Fixes #380: async support
sashaaero Oct 20, 2018
8cdc933
Merge branch 'master' into orm
sashaaero Oct 20, 2018
e19013d
Composite index bug fixed: https://stackoverflow.com/questions/531476…
sashaaero Nov 6, 2018
29bbf4a
fix db_session(sql_debug=True): it should log SQL commands also durin…
kozlovsky Oct 29, 2018
65d4a41
Many-to-many collection loading bug fixed
kozlovsky Oct 23, 2018
a439cb9
Move code around
kozlovsky Aug 7, 2018
600bfe8
Merge branch master to orm: bugfixes
kozlovsky Nov 6, 2018
bfb3a72
py_json_unwrap fix
sashaaero Nov 6, 2018
6e041aa
Array type support added for PostgreSQL and SQLite
sashaaero Oct 23, 2018
bcbcd14
Merge branch master to orm: Array type support in PostgreSQL and SQLite
kozlovsky Nov 7, 2018
2001529
remove options.PREFETCHING
kozlovsky Oct 17, 2018
f5292da
Improved query prefetching
kozlovsky Aug 7, 2018
e78d98e
Increase DBAPIProvider.max_params_count value
kozlovsky Nov 6, 2018
57c8628
Local variable renaming
kozlovsky Nov 7, 2018
d1f5e79
Memory optimization: deduplication of values received from the databa…
kozlovsky Nov 7, 2018
113b84d
Merge branch master to orm: improved prefetching
kozlovsky Nov 7, 2018
1cd129c
Fixes #404: Google App Engine local run detection
sashaaero Nov 21, 2018
134f0d4
Merge branch master to orm
kozlovsky Nov 21, 2018
db964c2
Support for "SELECT ... FOR UPDATE SKIP LOCKED" added
kozlovsky Nov 12, 2018
9bdaeb1
Merge branch master to orm
kozlovsky Nov 21, 2018
a832d37
Code formatting
kozlovsky Nov 17, 2018
8734706
Fix duplicated table join in FROM clause of optimized queries
kozlovsky Nov 24, 2018
0fb4531
Merge branch master to orm
kozlovsky Nov 24, 2018
16ab5ff
TrackedArray type added
sashaaero Nov 7, 2018
ab257bb
Array tests added
sashaaero Nov 11, 2018
7e21d5d
Make IntArray, StrArray and FloatArray classes
kozlovsky Nov 17, 2018
b34baf6
Optional arrays should be NOT NULL by default
sashaaero Nov 17, 2018
5b4ba26
Array fixes
sashaaero Nov 21, 2018
5960ac4
Fix array __getitem__
sashaaero Nov 24, 2018
9c01370
More array tests added
kozlovsky Nov 24, 2018
24bb044
Merge branch master to orm: array type fixes
kozlovsky Nov 24, 2018
c0b5a3c
Fix warnings filter in unittests
kozlovsky Dec 8, 2018
a42d351
For nested db_session retry option should be ignored
kozlovsky Dec 9, 2018
82cfc74
contains for tracked array
sashaaero Nov 24, 2018
926a557
Fixes #405: Breaking change with cx_Oracle 7.0: DML RETURNING stateme…
sashaaero Dec 9, 2018
7084581
Merge branch master to orm
kozlovsky Dec 9, 2018
0521629
Optimization of ast2src(node)
kozlovsky Jan 4, 2019
6e340ff
Add pony.egg-info/ to .gitignore
sashaaero Dec 15, 2018
d2508c4
MySQL `group_concat_max_len` option set to 32-bit platforms' max value
sashaaero Dec 15, 2018
68bb40f
Add total_stat across all SQL queries: db.local_stats[None]
kozlovsky Dec 15, 2018
b442cb3
Wrap obj.get_pk() with @cut_traceback
kozlovsky Jan 5, 2019
aa16b4f
A bit more aggressive cache clearing after rollback in interactive mode
kozlovsky Jan 5, 2019
e5f06c8
Fix accessing global variables from hybrid methods and properties
kozlovsky Jan 6, 2019
f3a590f
Support of select(x for x in y.items)
sashaaero Jan 5, 2019
6aa22d1
Fix flask extension: validate for attribute wasn't expect LocalProxy …
sashaaero Jan 4, 2019
1bd29b5
make_proxy(obj) function creates a proxy object which can be used acr…
sashaaero Dec 15, 2018
9e7cd21
Add support of ON DELETE CASCADE/SET NULL
sashaaero Jan 12, 2019
7a7719b
Show all attribute options in show(Entity) call
sashaaero Jan 12, 2019
279c67a
Merge branch `master` to `orm`
kozlovsky Jan 17, 2019
342a15d
Update changelog and change Pony version: 0.7.7-dev -> 0.7.7
kozlovsky Jan 17, 2019
8bc10f6
PonyORM release 0.7.7 (2019-01-17)
kozlovsky Jan 17, 2019
2138737
Update Pony version: 0.7.7 -> 0.7.8-dev
kozlovsky Jan 17, 2019
5c51407
Add `stream` option to `query.show()` to make its output testable mor…
kozlovsky Jan 18, 2019
3a8c3fe
Fix a bug caused by incorrect deduplication of column values
kozlovsky Jan 18, 2019
eed9d1d
Merge branch 'master' into orm
kozlovsky Jan 18, 2019
65a36c8
Fixes 414: prefetching Optional relationships fails on 0.7.7
kozlovsky Jan 19, 2019
37c7f2f
Merge branch 'master' into orm
kozlovsky Jan 19, 2019
c3d3e9d
Update changelog and pony version: 0.7.8-dev -> 0.7.8
kozlovsky Jan 19, 2019
035fb9d
PonyORM release 0.7.8 (2019-01-19)
kozlovsky Jan 19, 2019
35fe54e
Update Pony version: 0.7.8 -> 0.7.9-dev
kozlovsky Jan 20, 2019
2b17c30
Fix empty array param handling
kozlovsky Jan 20, 2019
66f5602
Merge branch `master` to `orm`
kozlovsky Jan 20, 2019
5ed45d2
Fix reading NULL from optional nullable array column
kozlovsky Jan 21, 2019
61841d3
Fix handling of empty arrays in queries
kozlovsky Jan 21, 2019
efc1368
Merge branch `master` to `orm`
kozlovsky Jan 21, 2019
bf11077
Update changelog and change Pony version: 0.7.9-dev -> 0.7.9
kozlovsky Jan 21, 2019
b4aed3d
PonyORM release 0.7.9 (2019-01-21)
kozlovsky Jan 21, 2019
9031bf4
Update Pony version: 0.7.9 -> 0.7.10-dev
kozlovsky Jan 21, 2019
6b9a1e5
Merge branch `master` to `orm`
kozlovsky Mar 6, 2019
3b895fd
Fixes #415: typo
sashaaero Jan 30, 2019
50cf5b7
Message improved: NotImplementedError on specifying table name for in…
sashaaero Feb 10, 2019
0b9667b
Add second lock to prevent thread starvation on some operating systems
kozlovsky Mar 6, 2019
61129bd
Merge branch `master` to `orm`
kozlovsky Mar 6, 2019
5618cce
Fixes #432: flask can trigger teardown_request without real request.
sashaaero Mar 15, 2019
8587f88
Handle case when someone calls db.bind(kwargs) instead of db.bind(**k…
kozlovsky Mar 24, 2019
9781e06
Decompiler fixes
kozlovsky Mar 24, 2019
fad8c68
Fix decompliation of Python 3.7 bytecode with conditions like "if not…
sashaaero Mar 24, 2019
e733f14
Merge branch master to orm
kozlovsky Mar 31, 2019
f044240
Decompiler fix: decompiling lambda leads to pop from empty stack in p…
sashaaero Apr 14, 2019
3147636
Decompiler tests added
sashaaero Apr 14, 2019
c819c2f
PyPy decompiling fix
sashaaero Apr 14, 2019
333e39f
Fix CALL_METHOD in PyPy
kozlovsky Apr 14, 2019
fd37431
Improve decompiler tests output
kozlovsky Apr 14, 2019
778b010
Merge branch master to orm: bugfixes
kozlovsky Apr 16, 2019
3a0467d
Include LICENSE in sdist
carlwgeorge Mar 4, 2019
0997b35
Include LICENSE in sdist
carlwgeorge Mar 4, 2019
12ad059
Merge branch master to orm
kozlovsky Apr 17, 2019
e804b93
Fixes error messages for PyPy
sashaaero Apr 20, 2019
f781ae4
Fix GROUP_CONCAT separator syntax.
Faless Feb 25, 2019
3566508
Oracle 19C supports DISTINCT in LISTAGG
kozlovsky Apr 20, 2019
1b26f90
Fix test: add second column to ORDER BY section for stable sort order
kozlovsky Apr 20, 2019
a068e9c
Adding a list of awesome Pony ORM supporters
amalashkevich Apr 20, 2019
e9f97b2
Fix: Readable error message while using infinity or NaN Decimal values
sashaaero Apr 20, 2019
b4b338d
Merge branch 'master' into orm
kozlovsky Apr 20, 2019
884d517
Update changelog and Pony version: 0.7.10-dev -> 0.7.10
kozlovsky Apr 20, 2019
b991846
PonyORM release 0.7.10 (2019-04-20)
kozlovsky Apr 20, 2019
bb92bb2
Update Pony version: 0.7.10 -> 0.7.11-dev
kozlovsky Apr 27, 2019
bc36166
Merge branch master to orm
kozlovsky Sep 4, 2019
8a05edf
Fix #463: changing ponyorm.com to ponyorm.org
kozlovsky Sep 4, 2019
c24789e
Minor change in README.md
amalashkevich Apr 20, 2019
cf8b430
Add support development information
amalashkevich Apr 20, 2019
ccfd623
Fixed #430: add ON DELETE CASCADE for many-to-many relationships
kozlovsky Jun 2, 2019
6160527
Fix aggregate bug by reverting 876a844a
kozlovsky Jun 22, 2019
ac69f12
Refactoring of Entity._parse_row_()
kozlovsky Aug 27, 2019
1c8498c
Check value of discriminator column on object creation
kozlovsky Aug 27, 2019
803144b
Remove incorrect assertion
kozlovsky Aug 28, 2019
0f136ec
Fix test for GROUP_CONCAT syntax for MySQL
kozlovsky Aug 28, 2019
bc85217
Remove unnecessary DISTINCT in aggregated queries
kozlovsky Aug 28, 2019
71a3263
Merge branch master to orm
kozlovsky Sep 4, 2019
6c37d6c
Deref proxies when add items to collections
kozlovsky Sep 12, 2019
31a668d
Merge branch master to orm
kozlovsky Sep 12, 2019
454f6a5
Update BACKERS.md
amalashkevich Sep 19, 2019
4d45ddf
Remove unnecessary @db_session
kozlovsky Sep 24, 2019
26c1d8c
Bulk delete should clear query results cache
kozlovsky Sep 24, 2019
ea8020b
Fix error message when hybrid method is too complex to decompile
kozlovsky Sep 24, 2019
c938694
Move code around
kozlovsky Oct 1, 2019
e52c1f6
Move raw_sql function to ormtypes
kozlovsky Oct 1, 2019
cd7fe6c
Hybrid functions
kozlovsky Oct 1, 2019
c85e219
Improved ProgrammingError message in PostgreSQL: "Note: use column ty…
kozlovsky Oct 7, 2019
5e53624
Remove unused code
kozlovsky Oct 8, 2019
fb7e384
Bug fixed: incorrect unpickling of objects with Json attributes
kozlovsky Oct 7, 2019
a0be95a
Update BACKERS.md
amalashkevich Oct 11, 2019
d1c6bb2
Fix bulk delete queries
kozlovsky Oct 14, 2019
37dc817
#472: Fix warning in Python 3.8
kozlovsky Oct 15, 2019
b9527fa
#472: Fix test for Python 3.8
kozlovsky Oct 15, 2019
aa5ed83
#472: Fix parser for Python 3.8: ignore `namedexpr_test` node
kozlovsky Oct 15, 2019
1d60b37
Fixes #472: Specify Python 3.8 support in setup.py
kozlovsky Oct 15, 2019
ecc55b5
Update BACKERS.md
amalashkevich Sep 19, 2019
62b03f7
Update BACKERS.md
amalashkevich Oct 11, 2019
5fd38a6
Merge branch master to orm
kozlovsky Oct 15, 2019
4efb56f
Fix Python 3.8 support: add namedexpr_test method to transformer
kozlovsky Oct 16, 2019
bbf8de6
Fix bulk delete queries
kozlovsky Oct 16, 2019
f42dbf8
Merge branch master to orm
kozlovsky Oct 16, 2019
397e6ac
Fixes #468: Tuple-value comparisons generate incorrect queries
kozlovsky Oct 21, 2019
0fa39eb
Fix #470 'imp' module PendingDeprecationWarning
paxet Oct 15, 2019
bb5ceb5
Merge branch master to orm
kozlovsky Oct 21, 2019
45cbff7
Fixes #465, fixes #466, closes #467: Should reconnect to MySQL on Ope…
imfht Sep 23, 2019
d012df2
Merge master to orm
kozlovsky Oct 21, 2019
368adf8
Adding tests for Attribute Options and Entity Instances
vmtl-adsk Sep 27, 2019
a592b96
raises_exception should correctly handle ... in the middle of the tes…
kozlovsky Oct 21, 2019
ca9a62c
Test fixed
kozlovsky Oct 21, 2019
900b05c
Merge branch master to orm
kozlovsky Oct 21, 2019
2345f31
Revert change from 52c88b6e "Forcing of n+1 query optimization during…
kozlovsky Oct 22, 2019
0ffe60f
Fix #438: support date-date, datetime-datetime, date+timedelta, date-…
kozlovsky Oct 23, 2019
9d008b9
SQLite does not allow to specify distinct and separator in group_conc…
kozlovsky Oct 23, 2019
a8b0a5c
Merge branch master to orm
kozlovsky Oct 23, 2019
66c29f5
Update changelog and Pony version: 0.7.11-dev -> 0.7.11
kozlovsky Oct 23, 2019
8197136
PonyORM release 0.7.11 (2019-10-23)
kozlovsky Oct 23, 2019
21459cf
Update Pony version: 0.7.11 -> 0.7.12-dev
kozlovsky Oct 28, 2019
db29fb5
Fix column definition when sql_default is specified
kozlovsky Oct 28, 2019
42354dc
Merge branch master to orm
kozlovsky Oct 28, 2019
2928534
Relax checks in cache.update_simple_index, cache.db_update_simple_ind…
kozlovsky Oct 30, 2019
b4d3da6
Merge branch 'master' into orm
kozlovsky Oct 30, 2019
e90d200
Update BACKERS.md
amalashkevich Jan 29, 2020
a446c7f
Update BACKERS.md
amalashkevich Jan 29, 2020
4817e4e
Merge master to orm
kozlovsky Feb 4, 2020
493a119
Fix deduplication
kozlovsky Jan 3, 2020
51876a1
Fix determination of interactive mode in PyCharm
kozlovsky Jan 3, 2020
ceecad7
CockroachDB support added
kozlovsky Nov 5, 2019
994654e
Fix cockroach ddl issue
kozlovsky Jan 30, 2020
6822b1c
cockroach retry support
kozlovsky Jan 30, 2020
bd6dc31
New tests mechanics for testing SQLite, PostgreSQL & CockroachDB
sashaaero Dec 4, 2019
8abeb10
Support of `interleave in parent` for CockroachDB
kozlovsky Jan 22, 2020
91935c0
fix date difference in PostgreSQL
kozlovsky Dec 19, 2019
f27aeeb
min/max for PostgreSQL fixed
kozlovsky Dec 19, 2019
8cf3667
fix casting json to dobule in PostgreSQL
kozlovsky Dec 19, 2019
2deadda
Fix count by several columns in PostgreSQL
kozlovsky Dec 19, 2019
861874b
PostgreSQL distinct bug fixed
kozlovsky Jan 15, 2020
d8168d0
Array negative indexes fixes
sashaaero Dec 4, 2019
8f7996f
Micro refactoring/optimization
kozlovsky Feb 4, 2020
c6ccc99
getitem support for strings including slices and negative indexes
kozlovsky Dec 6, 2019
1b6b275
Merge branch master to orm
kozlovsky Feb 4, 2020
bd88abe
Added TeamCity tests builds
sashaaero Feb 4, 2020
7f9616f
Merge branch 'master' into orm
sashaaero Feb 4, 2020
836224a
Update CHANGELOG.md and pony.__version__: 0.7.12-dev -> 0.7.12
kozlovsky Feb 4, 2020
9dde398
PonyORM release 0.7.12 (2020-02-04)
kozlovsky Feb 4, 2020
76c8eef
Update Pony version: 0.7.12 -> 0.7.13-dev
kozlovsky Feb 26, 2020
371cb30
Update README.md
sashaaero Feb 26, 2020
dbdae7b
Update README.md
sashaaero Feb 26, 2020
6a9a132
Merge branch master to orm
kozlovsky Feb 28, 2020
b8e2ed0
Update CHANGELOG.md and pony.__version__: 0.7.13-dev -> 0.7.13
kozlovsky Mar 3, 2020
ab176c6
PonyORM release 0.7.13 (2020-03-03)
kozlovsky Mar 3, 2020
5ba67c8
Fix wording
kozlovsky Mar 3, 2020
d702c5c
Update version: 0.7.13 -> 0.7.14-dev
kozlovsky Mar 3, 2020
5193bb1
Update BACKERS.md
amalashkevich Mar 2, 2020
ea515dc
Merge branch master to orm
kozlovsky Mar 3, 2020
3769fd4
Working SQL Server CRUD, running model1.py test works.
sostholm Aug 15, 2020
9280240
added bool fix
capsamuel Aug 19, 2020
20da084
Merge pull request #1 from sostholmwork/sqlserver2
sostholm Aug 19, 2020
4636ec0
Merge branch 'orm' into sqlserver
sostholm Aug 29, 2020
2bb0dc5
Merge branch 'sqlserver2' into sqlserver
sostholm Aug 29, 2020
6159c9a
WIP: mssql basics are working, including basic JSON fields, DATE_ADD …
sostholm Aug 29, 2020
1cd4a1c
added support for limit
capsamuel Oct 7, 2020
6989956
Update mssql.py
capsamuel Oct 16, 2020
af1b8b2
fixing limit mssql builder for the case where order_by is null. Also …
capsamuel Apr 19, 2021
d6aeaf8
fixing issue with where wildcard string searches for s gets replaced …
capsamuel Apr 28, 2021
925e9cf
fixing mistake where sql gets replaced with ?
capsamuel Apr 28, 2021
4c6629b
removing wildcard replace in execute
capsamuel Apr 28, 2021
217b646
Should fix issue where ids are not returned after inserts
capsamuel May 28, 2021
274f8ba
fixing returning id after insert
capsamuel Jul 30, 2021
11a9e5c
adding ssl support for connecting to mssql database
sostholm Oct 2, 2021
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pony/orm/tests/coverage.bat
pony/orm/tests/htmlcov/*.*
MANIFEST
docs/_build/
pony.egg-info/
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "C:\\Users\\sostholm\\Envs\\pony\\Scripts\\python.exe"
}
18 changes: 18 additions & 0 deletions BACKERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Sponsors & Backers

Pony ORM is Apache 2.0 licensed open source project. If you would like to support Pony ORM development, please consider:

[Become a backer or sponsor](https://ponyorm.org/donation.html)

## Backers

- [Vincere](https://vince.re)
- Sergio Aguilar Guerrero
- David ROUBLOT
- Elijas Dapšauskas
- Dan Swain
- Christian Macht
- Johnathan Nader
- Andrei Rachalouski
- Juan Pablo Scaletti
- Marcus Birkenkrahe
330 changes: 330 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,333 @@
# PonyORM release 0.7.13 (2020-03-03)

This release contains no new features or bugfixes. The only reason for this release is to test our CI/CD process.

# PonyORM release 0.7.12 (2020-02-04)

## Features

* CockroachDB support added
* CI testing for SQLite, PostgreSQL & CockroachDB

## Bugfixes

* Fix translation of getting array items with negative indexes
* Fix string getitem translation for slices and negative indexes
* PostgreSQL DISTINCT bug fixed for queries with ORDER BY clause
* Fix date difference syntax in PostgreSQL
* Fix casting json to dobule in PostgreSQL
* Fix count by several columns in PostgreSQL
* Fix PostgreSQL MIN and MAX expressions on boolean columns
* Fix determination of interactive mode in PyCharm
* Fix column definition when `sql_default` is specified: DEFAULT should be before NOT NULL
* Relax checks on updating in-memory cache indexes (don't throw CacheIndexError on valid cases)
* Fix deduplication logic for attribute values


# PonyORM release 0.7.11 (2019-10-23)

## Features

* #472: Python 3.8 support
* Support of hybrid functions (inlining simple Python functions into query)
* #438: support datetime-datetime, datetime-timedelta, datetime+timedelta in queries

## Bugfixes

* #430: add ON DELETE CASCADE for many-to-many relationships
* #465: Should reconnect to MySQL on OperationalError 2013 'Lost connection to MySQL server during query'
* #468: Tuple-value comparisons generate incorrect queries
* #470 fix PendingDeprecationWarning of imp module
* Fix incorrect unpickling of objects with Json attributes
* Check value of discriminator column on object creation if set explicitly
* Correctly handle Flask current_user proxy when adding new items to collections
* Some bugs in syntax of aggregated queries were fixed
* Fix syntax of bulk delete queries
* Bulk delete queries should clear query results cache so next select will get correct result from the database
* Fix error message when hybrid method is too complex to decompile


# PonyORM release 0.7.10 (2019-04-20)

## Bugfixes

* Python3.7 and PyPy decompiling fixes
* Fix reading NULL from Optional nullable array column
* Fix handling of empty arrays in queries
* #415: error message typo
* #432: PonyFlask - request object can trigger teardown_request without real request
* Fix GROUP CONCAT separator for MySQL


# PonyORM release 0.7.9 (2019-01-21)

## Bugfixes

* Fix handling of empty arrays and empty lists in queries
* Fix reading optional nullable array columns from database


# PonyORM release 0.7.8 (2019-01-19)

## Bugfixes

* #414: prefetching Optional relationships fails on 0.7.7
* Fix a bug caused by incorrect deduplication of column values


# PonyORM release 0.7.7 (2019-01-17)

## Major features

* Array type support for PostgreSQL and SQLite
* isinstance() support in queries
* Support of queries based on collections: select(x for x in y.items)

## Other features

* Support of Entity.select(**kwargs)
* Support of SKIP LOCKED option in 'SELECT ... FOR UPDATE'
* New function make_proxy(obj) to make cros-db_session proxy objects
* Specify ON DELETE CASCADE/SET NULL in foreign keys
* Support of LIMIT in `SELECT FROM (SELECT ...)` type of queries
* Support for negative JSON array indexes in SQLite

## Improvements

* Improved query prefetching: use fewer number of SQL queries
* Memory optimization: deduplication of values recieved from the database in the same session
* increase DBAPIProvider.max_params_count value

## Bugfixes

* #405: breaking change with cx_Oracle 7.0: DML RETURNING now returns a list
* #380: db_session should work with async functions
* #385: test fails with python3.6
* #386: release unlocked lock error in SQLite
* #390: TypeError: writable buffers are not hashable
* #398: add auto coversion of numpy numeric types
* #404: GAE local run detection
* Fix Flask compatibility: add support of LocalProxy object
* db_session(sql_debug=True) should log SQL commands also during db_session.__exit__()
* Fix duplicated table join in FROM clause
* Fix accessing global variables from hybrid methods and properties
* Fix m2m collection loading bug
* Fix composite index bug: stackoverflow.com/questions/53147694
* Fix MyEntity[obj.get_pk()] if pk is composite
* MySQL group_concat_max_len option set to max of 32bit platforms to avoid truncation
* Show all attribute options in show(Entity) call
* For nested db_session retry option should be ignored
* Fix py_json_unwrap
* Other minor fixes


# Pony ORM Release 0.7.6 (2018-08-10)

## Bugfixes

* Fixed a bug with hybrid properties that use external functions


# Pony ORM Release 0.7.6rc1 (2018-08-08)

## New features

* f-strings support in queries: `select(f'{s.name} - {s.age}' for s in Student)`
* #344: It is now possible to specify offset without limit: `query.limit(offset=10)`
* #371: Support of explicit casting of JSON expressions to `str`, `int` or `float`
* `@db.on_connect` decorator added

## Bugfixes

* Fix bulk delete bug introduced in 0.7.4
* #370 Fix memory leak introduced in 0.7.4
* Now `exists()` in query does not throw away condition in generator expression: `exists(s.gpa > 3 for s in Student)`
* #373: 0.7.4/0.7.5 breaks queries using the `in` operator to test membership of another query result
* #374: `auto=True` can be used with all PrimaryKey types, not only `int`
* #369: Make QueryResult looks like a list object again: add concatenation with lists, `.shuffle()` and `.to_list()` methods
* #355: Fix binary primary keys `PrimaryKey(buffer)` in Python2
* Interactive mode support for PyCharm console
* Fix wrong table aliases in complex queries
* Fix query optimization code for complex queries


# Pony ORM Release 0.7.5 (2018-07-24)

## Bugfixes

* `query.where` and `query.filter` method bug introduced in 0.7.4 was fixed


# Pony ORM Release 0.7.4 (2018-07-23)

## Major features

* Hybrid methods and properties added: https://docs.ponyorm.com/entities.html#hybrid-methods-and-properties
* Allow to base queries on another queries: `select(x.a for x in prev_query if x.b)`
* Added support of Python 3.7
* Added support of PyPy
* `group_concat()` aggregate function added
* pony.flask subpackage added for integration with Flask

## Other features

* `distinct` option added to aggregate functions
* Support of explicit casting to `float` and `bool` in queries

## Improvements

* Apply @cut_traceback decorator only when pony.MODE is 'INTERACTIVE'

## Bugfixes

* In SQLite3 `LIKE` is case sensitive now
* #249: Fix incorrect mixin used for Timedelta
* #251: correct dealing with qualified table names
* #301: Fix aggregation over JSON Column
* #306: Support of frozenset constants added
* #308: Fixed an error when assigning JSON attribute value to the same attribute: obj.json_attr = obj.json_attr
* #313: Fix missed retry on exception raised during db_session.__exit__
* #314: Fix AttributeError: 'NoneType' object has no attribute 'seeds'
* #315: Fix attribute lifting for JSON attributes
* #321: Fix KeyError on obj.delete()
* #325: duplicating percentage sign in raw SQL queries without parameters
* #331: Overriding __len__ in entity fails
* #336: entity declaration serialization
* #357: reconnect after PostgreSQL server closed the connection unexpectedly
* Fix Python implementation of between() function and rename arguments: between(a, x, y) -> between(x, a, b)
* Fix retry handling: in PostgreSQL and Oracle an error can be raised during commit
* Fix optimistic update checks for composite foreign keys
* Don't raise OptimisticCheckError if db_session is not optimistic
* Handling incorrect datetime values in MySQL
* Improved ImportError exception messages when MySQLdb, pymysql, psycopg2 or psycopg2cffi driver was not found
* desc() function fixed to allow reverse its effect by calling desc(desc(x))
* __contains__ method should check if objects belong to the same db_session
* Fix pony.MODE detection; mod_wsgi detection according to official doc
* A lot of inner fixes


# Pony ORM Release 0.7.3 (2017-10-23)

## New features

* `where()` method added to query
* `coalesce()` function added
* `between(x, a, b)` function added
* #295: Add `_table_options_` for entity class to specify engine, tablespace, etc.
* Make debug flag thread-local
* `sql_debugging` context manager added
* `sql_debug` and show_values arguments to db_session added
* `set_sql_debug` function added as alias to (to be deprecated) `sql_debug` function
* Allow `db_session` to accept `ddl` parameter when used as context manager
* Add `optimistic=True` option to db_session
* Skip optimistic checks for queries in `db_session` with `serializable=True`
* `fk_name` option added for attributes in order to specify foreign key name
* #280: Now it's possible to specify `timeout` option, as well as pass other keyword arguments for `sqlite3.connect` function
* Add support of explicit casting to int in queries using `int()` function
* Added modulo division % native support in queries

## Bugfixes

* Fix bugs with composite table names
* Fix invalid foreign key & index names for tables which names include schema name
* For queries like `select(x for x in MyObject if not x.description)` add "OR x.info IS NULL" for nullable string columns
* Add optimistic checking for `delete()` method
* Show updated attributes when `OptimisticCheckError` is being raised
* Fix incorrect aliases in nested queries
* Correctly pass exception from user-defined functions in SQLite
* More clear error messages for `UnrepeatableReadError`
* Fix `db_session(strict=True)` which was broken in 2d3afb24
* Fixes #170: Problem with a primary key column used as a part of another key
* Fixes #223: incorrect result of `getattr(entity, attrname)` when the same lambda applies to different entities
* Fixes #266: Add handler to `"pony.orm"` logger does not work
* Fixes #278: Cascade delete error: FOREIGN KEY constraint failed, with complex entity relationships
* Fixes #283: Lost Json update immediately after object creation
* Fixes #284: `query.order_by()` orders Json numbers like strings
* Fixes #288: Expression text parsing issue in Python 3
* Fixes #293: translation of if-expressions in expression
* Fixes #294: Real stack traces swallowed within IPython shell
* `Collection.count()` method should check if session is alive
* Set `obj._session_cache_` to None after exiting from db session for better garbage collection
* Unload collections which are not fully loaded after exiting from db session for better garbage collection
* Raise on unknown options for attributes that are part of relationship


# Pony ORM Release 0.7.2 (2017-07-17)

## New features

* All arguments of db.bind() can be specified as keyword arguments. Previously Pony required the first positional argument which specified the database provider. Now you can pass all the database parameters using the dict: db.bind(**db_params). See https://docs.ponyorm.com/api_reference.html#Database.bind
* The `optimistic` attribute option is added https://docs.ponyorm.com/api_reference.html#cmdoption-arg-optimistic

## Bugfixes

* Fixes #219: when a database driver raises an error, sometimes this error was masked by the 'RollbackException: InterfaceError: connection already closed' exception. This happened because on error, Pony tried to rollback transaction, but the connection to the database was already closed and it masked the initial error. Now Pony displays the original error which helps to understand the cause of the problem.
* Fixes #276: Memory leak
* Fixes the __all__ declaration. Previously IDEs, such as PyCharm, could not understand what is going to be imported by 'from pony.orm import *'. Now it works fine.
* Fixes #232: negate check for numeric expressions now checks if value is zero or NULL
* Fixes #238, fixes #133: raise TransactionIntegrityError exception instead of AssertionError if obj.collection.create(**kwargs) creates a duplicate object
* Fixes #221: issue with unicode json path keys
* Fixes bug when discriminator column is used as a part of a primary key
* Handle situation when SQLite blob column contains non-binary value


# Pony ORM Release 0.7.1 (2017-01-10)

## New features

* New warning DatabaseContainsIncorrectEmptyValue added, it is raised when the required attribute is empty during loading an entity from the database

## Bugfixes

* Fixes #216: Added Python 3.6 support
* Fixes #203: subtranslator should use argnames from parent translator
* Change a way aliases in SQL query are generated in order to fix a problem when a subquery alias masks a base query alias
* Volatile attribute bug fixed
* Fix creation of self-referenced foreign keys - before this Pony didn't create the foreign key for self-referenced attributes
* Bug fixed: when required attribute is empty the loading from the database shouldn't raise the validation error. Now Pony raises the warning DatabaseContainsIncorrectEmptyValue
* Throw an error with more clear explanation when a list comprehension is used inside a query instead of a generator expression: "Use generator expression (... for ... in ...) instead of list comprehension [... for ... in ...] inside query"


# Pony ORM Release 0.7 (2016-10-11)

Starting with this release Pony ORM is release under the Apache License, Version 2.0.

## New features

* Added getattr() support in queries: https://docs.ponyorm.com/api_reference.html#getattr

## Backward incompatible changes

* #159: exceptions happened during flush() should not be wrapped with CommitException

Before this release an exception that happened in a hook(https://docs.ponyorm.com/api_reference.html#entity-hooks), could be raised in two ways - either wrapped into the CommitException or without wrapping. It depended if the exception happened during the execution of flush() or commit() function on the db_session exit. Now the exception happened inside the hook never will be wrapped into the CommitException.

## Bugfixes

* #190: Timedelta is not supported when using pymysql


# Pony ORM Release 0.6.6 (2016-08-22)

## New features

* Added native JSON data type support in all supported databases: https://docs.ponyorm.com/json.html

## Backward incompatible changes

* Dropped Python 2.6 support

## Improvements

* #179 Added the compatibility with PYPY using psycopg2cffi
* Added an experimental @db_session `strict` parameter: https://docs.ponyorm.com/transactions.html#strict

## Bugfixes

* #182 - LEFT JOIN doesn't work as expected for inherited entities when foreign key is None
* Some small bugs were fixed


# Pony ORM Release 0.6.5 (2016-04-04)

## Improvements
Expand Down
Loading