Visitar URL original
Read-only open; document the SQL for constraints, scans, isolation and maintenance by tae898 · Pull Request #385 · humemai/arcadedb-embedded-python · GitHub
Skip to content

Read-only open; document the SQL for constraints, scans, isolation and maintenance - #385

Merged
tae898 merged 1 commit into
mainfrom
core-api-383
Oct 21, 2026
Merged

tae898 merged 1 commit into
mainfrom
core-api-383

Conversation

@tae898

@tae898 tae898 commented Oct 21, 2026

Copy link
Copy Markdown

Closes #383.

Following the bindings' DSL-first design (docs/api-access-methods.md), Python API is added only for what no statement can express, and the rest is documented as SQL with tests.

  • New API, read-only open: open_database(path, read_only=True), DatabaseFactory.open(read_only=True) (ComponentFile.MODE.READ_ONLY) and Database.is_read_only(); a write, a schema change or a transaction begin raises ArcadeDBError.
  • No new isolation API: the engine sets it in SQL (BEGIN ISOLATION READ_COMMITTED|REPEATABLE_READ), now documented in api/transactions.md, whose "read committed only" text is corrected.
  • Documented as SQL (api/database.md, api/schema.md, guide/core/database.md): property constraints (CREATE PROPERTY ... (mandatory, notnull, readonly, min, max, regexp, default), ALTER PROPERTY), polymorphic scans (SELECT FROM <type>), CHECK DATABASE [FIX], REBUILD INDEX, BACKUP DATABASE (a file name under arcadedb.server.backupDirectory, set with -D in jvm_args).
  • java-api-coverage.md: a SQL mapping table, sqlscript, AsyncExecutor.scan_type, the schema methods it missed, and the DSL as the recommended path.
  • Tests: test_open_read_only.py (reads work, writes and schema changes refused) and test_sql_constraints_and_maintenance.py (each constraint, ALTER PROPERTY, subtypes in a scan, READ_COMMITTED against REPEATABLE_READ in a two-thread case, CHECK DATABASE, REBUILD INDEX, a backup that unzips and opens).

Checked locally against the 26.10.2 engine: the new tests and the related database and transaction tests (22 passed), the -Darcadedb.server.backupDirectory form in a fresh process, pre-commit on the changed files, the strict docs build.

🤖 Generated with Claude Code

…olation and admin (#383)

- open_database/DatabaseFactory.open take read_only=True, Database.is_read_only()
- the bindings are DSL-first, so property constraints, type scans, BEGIN ISOLATION, BACKUP/CHECK DATABASE and REBUILD/COMPACT INDEX are documented as SQL, each run by a test
- fix the 'read committed only' text in api/transactions.md
- java-api-coverage.md: sqlscript, AsyncExecutor.scan_type, get_index_by_name, get_or_create_property, get_vector_index

Refs #383

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 5b6ed21 into main Oct 21, 2026
42 of 44 checks passed
@tae898
tae898 deleted the core-api-383 branch October 21, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Core API: property constraints, scan_type, isolation level, read-only open, admin helpers

1 participant