18 Commits
Author SHA1 Message Date
zeekay dda3979851 rename: the ORM is ours — datastore_orm, not infi.clickhouse_orm
This is our fork, so it should read like it. `import datastore_orm` instead of
`from infi.clickhouse_orm import ...`: `infi` was the original vendor's org
namespace, and carrying someone else's org name through every import in the
consuming codebase is not a fork, it is a vendored copy that never got renamed.

The `infi` namespace package is gone entirely (src/infi/__init__.py with it),
the distribution is `datastore-orm`, and the metadata points at Hanzo rather
than at the upstream repo and author.

NOT renamed, deliberately: the migration history tables are still
`infi_clickhouse_orm_migrations`. That name is persisted state — 448 rows in
production key off it — so changing it is a data migration, not a rename. Doing
it carelessly reproduces the exact failure this fork just hit, where a package
rename orphaned the history and silently blocked every migration.
2026-07-26 08:44:11 -07:00
Itai Shirav 26c605ed14 Remove __future__ 2020-07-14 22:01:32 +03:00
Itai Shirav 15f43f7c50 Fix querysets using the SystemPart model 2019-06-13 08:38:06 +03:00
Itai Shirav faa04c4dd5 - Add log_statements parameter to database initializer
- Fix test_merge which fails on ClickHouse v19.8.3
2019-06-13 08:12:56 +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
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
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
MarselandItai Shirav c4e60ca2a8 Include unicode_literals 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
Ivan Ladelshchikov fcb8196d3d fix unicode params for Py2 2017-06-06 20:16:56 +05:00
Itai Shirav 58e322cc52 fix test 2017-02-19 09:04:32 +02:00
M1haandItai Shirav f3e75cfae3 1) Removed database params for working with SystemPart operations
2) Added _database attribute to each model, got through select
2017-02-19 09:04:32 +02:00
M1haandItai Shirav 5f2195f87f 1) Replaced is_insertable() field mehtod with readonly property (unification with model and tables)
2) Method SystemPart.all() was replaced with get()
3) Added conditions parameter to SystemPart.get() and SystemPart.get_active() methods.
2017-02-19 09:02:56 +02:00
M1haandItai Shirav 58b7a9aeac 1) Added to_dict model method
2) Fixed bug in test_freeze cleaning, if backups don't contain all directory names (e. g. 1, 2, 3, 6, 7 - count=5, created_backup=8, not 6)
2017-02-19 09:01:33 +02:00
M1haandItai Shirav db61efd4cc 1) Added readonly models
2) Added SystemPart models in order to execute partition operations
2017-02-19 09:01:33 +02:00