ic-python-db 0.11.0__py3-none-any.whl → 0.13.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ic_python_db/__init__.py CHANGED
@@ -5,6 +5,7 @@ IC Python DB - A lightweight key-value database with entity relationships and au
5
5
  from .constants import ACTION_CREATE, ACTION_DELETE, ACTION_MODIFY
6
6
  from .db_engine import Database
7
7
  from .entity import Entity
8
+ from .errors import TooLargeError
8
9
  from .mixins import TimestampedMixin
9
10
  from .properties import (
10
11
  Boolean,
@@ -14,13 +15,14 @@ from .properties import (
14
15
  ManyToOne,
15
16
  OneToMany,
16
17
  OneToOne,
18
+ RelationView,
17
19
  String,
18
20
  )
19
21
  from .schema import SchemaIncompatibleError, build_schema, diff_schemas, schema_hash
20
22
  from .storage import MemoryStorage, Storage
21
23
  from .system_time import SystemTime
22
24
 
23
- __version__ = "0.11.0"
25
+ __version__ = "0.13.0"
24
26
  __all__ = [
25
27
  "Database",
26
28
  "Entity",
@@ -40,6 +42,8 @@ __all__ = [
40
42
  "ACTION_MODIFY",
41
43
  "ACTION_DELETE",
42
44
  "SchemaIncompatibleError",
45
+ "TooLargeError",
46
+ "RelationView",
43
47
  "build_schema",
44
48
  "diff_schemas",
45
49
  "schema_hash",
ic_python_db/constants.py CHANGED
@@ -4,3 +4,8 @@ LEVEL_MAX_DEFAULT = 3
4
4
  ACTION_CREATE = "create"
5
5
  ACTION_MODIFY = "modify"
6
6
  ACTION_DELETE = "delete"
7
+
8
+ # Largest collection an unpaged operation (iterating a relation, instances())
9
+ # loads in one call; past it they raise TooLargeError. At about 1M
10
+ # instructions per load this stays well inside a query's 5B budget.
11
+ MAX_UNPAGED = 1000