Commit Graph

92 Commits

Author SHA1 Message Date
Itai Shirav
86f05a0c23 Python 3 compatibility 2018-06-10 16:17:35 +03:00
Itai Shirav
d7382e1ce2 fix field name parsing when field contains double underscore #69 2018-06-10 14:27:51 +03:00
Itai Shirav
ab0755ad90 - Rename Model.system to Model._system to prevent collision with a column that has the same name
- Rename `Model.readonly` to `Model._readonly` to prevent collision with a column that has the same name
- The `field_names` argument to `Model.to_tsv` is now mandatory
2018-05-14 07:09:57 -04:00
Itai Shirav
1bd3e63cd4 minor improvements in error handling and testing 2018-05-10 15:24:38 +03:00
M1ha
eb15dd65ec Added custom partitioning to all MergeTree family engines 2018-04-24 15:19:05 +05:00
Itai Shirav
7cc5c50240 Merge branch 'issue-66' of https://github.com/carrotquest/infi.clickhouse_orm into carrotquest-issue-66 2018-04-21 13:50:09 +03:00
Itai Shirav
66eda2214c Make tests pass 2018-04-21 13:27:42 +03:00
Itai Shirav
b6229125a3 Merge branch 'custom_partitioning' of https://github.com/carrotquest/infi.clickhouse_orm into carrotquest-custom_partitioning
# Conflicts:
#	src/infi/clickhouse_orm/engines.py
#	src/infi/clickhouse_orm/models.py
#	tests/test_database.py
#	tests/test_engines.py
2018-04-21 13:04:19 +03:00
Itai Shirav
723bd03548 TRIVIAL fix test 2018-04-21 11:49:14 +03:00
Ivan Ladelshchikov
d0aba55b0c tests: fix Distributed with bad cluster name for v1.1.54370 2018-04-21 11:49:14 +03:00
Ivan Ladelshchikov
6673841bf9 tests: fix readonly error messages for v1.1.54335+
the commit that made the changes
59aa1359c8
2018-04-21 11:49:14 +03:00
Ivan Ladelshchikov
99de0f6637 tests: fix sampling expression for v1.1.54310+
see https://github.com/yandex/ClickHouse/blob/master/CHANGELOG.md#clickhouse-release-1154310-2017-11-01

and the commit that made the change
75c65c7b59 (diff-fa7377955af063c4fa16e20f2595937bR120)
2018-04-21 11:49:14 +03:00
Ivan Ladelshchikov
a5f2fa4d76 add Distributed engine 2018-04-21 11:48:32 +03:00
Ivan Ladelshchikov
3268019216 _fields and _writable_fields are OrderedDicts 2018-04-21 11:48:32 +03:00
Ivan Ladelshchikov
57112f9de6 add ServerError exception 2018-04-21 11:48:32 +03:00
M1ha
0927136ffd 1) Added a test on https://github.com/Infinidat/infi.clickhouse_orm/issues/66
2) Fixed issue
2018-04-20 12:38:36 +05:00
M1ha
7fb0589692 1. Added support of custom partitioning (https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/)
2. Added attribute server_version to Database class
3. Changed Engine.create_table_sql(), Engine.drop_table_sql(), Model.create_table_sql(), Model.drop_table_sql()  parameter to db from db_name
2018-04-12 14:21:46 +05:00
Itai Shirav
31ee58967f TRIVIAL fix test 2018-04-07 15:14:14 +03:00
desile
52d63cff60 Add tests demonstrating and checking usage of Q objects for filtration 2017-11-29 23:58:22 +03:00
Itai Shirav
0f9487f589 Added documentation about custom fields 2017-10-31 11:36:17 +02:00
Itai Shirav
b976899f75 Added documentation about custom fields 2017-10-31 10:11:29 +02:00
Itai Shirav
c6905cbc98 Missing brackets 2017-10-30 15:51:10 +02:00
Itai Shirav
fa3f96e464 Merge branch 'migrate_materialized_fields' of https://github.com/carrotquest/infi.clickhouse_orm into carrotquest-migrate_materialized_fields
# Conflicts:
#	tests/sample_migrations/0012.py
#	tests/test_migrations.py (reverted from commit 288db6a28f56b9ae5a4fa1c0ead111f679886488)
2017-10-30 15:49:25 +02:00
Itai Shirav
b758333f42 Merge branch 'dollar_issue_fix' of https://github.com/carrotquest/infi.clickhouse_orm into carrotquest-dollar_issue_fix 2017-10-30 15:30:31 +02:00
Itai Shirav
b93c145cde Merge branch 'tsionyx-develop' into develop 2017-10-30 15:28:37 +02:00
Ivan Ladelshchikov
50e63fb1f8 show field name in error when invalid value assigned 2017-10-10 15:30:37 +04:00
M1ha
5ea20a11a9 Added tests and resolved https://github.com/Infinidat/infi.clickhouse_orm/issues/47 2017-10-10 12:24:17 +05:00
M1ha
911af41ec1 Fixed https://github.com/Infinidat/infi.clickhouse_orm/issues/56 issue 2017-10-04 17:53:23 +05:00
Ivan Ladelshchikov
a89fd63f4c enable skipped JOIN test 2017-10-03 13:26:08 +04:00
Ivan Ladelshchikov
38472012db allow ISO 8601 compliant values in DateTimeField 2017-10-03 13:26:00 +04:00
M1ha
51a814732b Merge branch 'develop' of https://github.com/Infinidat/infi.clickhouse_orm into raw_migrations
# Conflicts:
#	docs/schema_migrations.md
#	tests/sample_migrations/0010.py
#	tests/sample_migrations/0011.py
2017-10-02 15:49:59 +05:00
M1ha
b28e11c69d Added RunPython and RunSQL migration types 2017-09-20 10:08:07 +05:00
Itai Shirav
59564f8c70 Add distinct method to querysets 2017-09-13 12:15:48 +03:00
Itai Shirav
7bbcae574a Add AlterTableWithBuffer migration operation 2017-09-13 12:15:48 +03:00
M1ha
de9f64cd3a Added Merge engine
1) Divided readonly and system flags of Field model. Readonly flag only restricts insert operations, while system flag restricts also create and drop table operations

2) Added Merge engine and tests for it
3) Added docs for Merge engine
4) Added opportunity to make Field readonly. This is useful for "virtual" columns (https://clickhouse.yandex/docs/en/single/index.html#virtual-columns)
2017-09-07 17:44:27 +05:00
Itai Shirav
6bea4cfc68 fix test_freeze 2017-08-20 10:38:05 +03:00
Itai Shirav
9891ccffaf test_freeze fails, possibly due to race condition 2017-08-20 10:38:05 +03:00
Marsel
c4e60ca2a8 Include unicode_literals 2017-08-20 10:37:11 +03:00
Marsel
70d34b097f Fix python3 compatibility 2017-08-20 10:37:11 +03:00
Itai Shirav
06ed53e4ec fix test_freeze 2017-08-20 09:46:00 +03:00
Itai Shirav
59a4f1cecc test_freeze fails, possibly due to race condition 2017-08-20 09:36:26 +03:00
Itai Shirav
67e0442645 - Nullable arrays not supported in latest ClickHouse version
- system.parts table no longer includes "replicated" column in latest ClickHouse version
2017-08-20 09:30:40 +03:00
Itai Shirav
639867bb32 - Added QuerySet.paginate()
- Support for basic aggregation in querysets
2017-08-14 12:14:52 +03:00
Itai Shirav
1966896850 Support queryset slicing 2017-06-24 12:28:42 +03:00
Dzianis Sivets
9b7e7a179e NullableField of ArrayField 2017-06-16 20:38:01 +03:00
Dzianis Sivets
1b0ea035b8 Nullable fields support 2017-06-16 20:37:37 +03:00
Itai Shirav
d02d6b14eb - Added ne and not_in queryset operators
- Querysets no longer have a default order when `order_by` is not called
- Added `autocreate` flag to database initializer
- Fix for SELECT FROM JOIN (#37)
2017-06-15 12:19:17 +03:00
Ivan Ladelshchikov
fcb8196d3d fix unicode params for Py2 2017-06-06 20:16:56 +05:00
Marsel
1ff82a57e1 Fix "NameError: name 'unicode' is not defined" in python3 2017-05-14 23:11:58 +03:00
Itai Shirav
6301ab468e fix queryset problem with non-ascii chars 2017-05-05 15:39:01 +03:00