dirsql 0.3.76__tar.gz → 0.3.77__tar.gz
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.
- {dirsql-0.3.76 → dirsql-0.3.77}/Cargo.lock +1 -1
- {dirsql-0.3.76 → dirsql-0.3.77}/PKG-INFO +1 -1
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/reference/sdk.md +14 -1
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/Cargo.toml +1 -1
- {dirsql-0.3.76/packages/rust → dirsql-0.3.77/packages/python}/docs/reference/sdk.md +14 -1
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/e2e-attestation.json +2 -2
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/src/lib.rs +31 -6
- {dirsql-0.3.76/packages/python → dirsql-0.3.77/packages/rust}/docs/reference/sdk.md +14 -1
- {dirsql-0.3.76 → dirsql-0.3.77}/Cargo.toml +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/README.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/__init__.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/_async.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/_dirsql.pyi +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/cli/__init__.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/cli/binary_path.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/cli/is_windows.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/cli/main.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/cli/resolve_config_extensions.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/py.typed +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/resolve_config_extensions.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/dirsql/resolve_extension.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/AGENTS.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/explanation.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/getting-started.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/embed.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/persist.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/index.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/migrations.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/package.json +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/playwright.config.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/reference/cli.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/reference/columns.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/reference/config.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/reference/hooks.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/reference/http-api.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/tests/integration/home.spec.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/tests/integration/language-flag.spec.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/tests/integration/sidebar.spec.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/tests/unit/config.test.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/tests/unit/lang.test.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/docs/vitest.config.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/README.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/conftest.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/AGENTS.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/explanation.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/getting-started.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/embed.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/persist.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/index.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/migrations.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/package.json +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/playwright.config.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/reference/cli.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/reference/columns.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/reference/config.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/reference/hooks.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/reference/http-api.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/tests/integration/home.spec.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/tests/integration/language-flag.spec.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/tests/integration/sidebar.spec.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/tests/unit/config.test.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/tests/unit/lang.test.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/vitest.config.ts +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/tests/__init__.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/tests/binding/__init__.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/tests/conftest.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/tests/e2e/__init__.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/tests/integration/__init__.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/python/tests/smoke/__init__.py +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/Cargo.toml +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/README.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/benches/db_bench.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/benches/differ_bench.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/benches/matcher_bench.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/benches/scanner_bench.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/explanation.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/getting-started.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/embed.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/persist.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/index.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/migrations.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/reference/cli.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/reference/columns.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/reference/config.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/reference/hooks.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/docs/reference/http-api.md +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/bin/dirsql.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/cli/execute.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/cli/init.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/cli/mod.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/cli/router.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/cli/serialize.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/cli/server.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/command.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/config.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/db.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/default_config.toml +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/differ.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/lib.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/matcher.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/persist.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/scanner.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/packages/rust/src/watcher.rs +0 -0
- {dirsql-0.3.76 → dirsql-0.3.77}/pyproject.toml +0 -0
|
@@ -210,6 +210,12 @@ Executes a SQL query and returns rows keyed by column name.
|
|
|
210
210
|
| BLOB | `bytes` | `Buffer` | `Value::Blob` |
|
|
211
211
|
| NULL | `None` | `null` | `Value::Null` |
|
|
212
212
|
|
|
213
|
+
An `INTEGER` outside JavaScript's safe integer range (magnitude greater
|
|
214
|
+
than `Number.MAX_SAFE_INTEGER`, 2^53 − 1) cannot be represented as a JS
|
|
215
|
+
`number` without precision loss, so the TypeScript SDK **throws** rather
|
|
216
|
+
than return a rounded value. Python's `int` is unbounded, so it always
|
|
217
|
+
round-trips.
|
|
218
|
+
|
|
213
219
|
### `watch`
|
|
214
220
|
|
|
215
221
|
::: code-group
|
|
@@ -351,7 +357,14 @@ An `extract` callback (and the SQLite columns it feeds) accepts:
|
|
|
351
357
|
| SQLite column | Python value | TypeScript value | Rust `Value` |
|
|
352
358
|
|---|---|---|---|
|
|
353
359
|
| TEXT | `str` | `string` | `Value::Text(String)` |
|
|
354
|
-
| INTEGER | `int`, `bool` | `number`, `boolean` | `Value::Integer(i64)` |
|
|
360
|
+
| INTEGER | `int`, `bool` | `number`, `boolean`, `bigint` | `Value::Integer(i64)` |
|
|
355
361
|
| REAL | `float` | `number` | `Value::Real(f64)` |
|
|
356
362
|
| BLOB | `bytes` | `Buffer` / `Uint8Array` | `Value::Blob(Vec<u8>)` |
|
|
357
363
|
| NULL | `None` | `null` | `Value::Null` |
|
|
364
|
+
|
|
365
|
+
Integers are stored as a signed 64-bit `Value::Integer`. A value that does
|
|
366
|
+
not fit that range is a hard error, not a lossy conversion: Python raises
|
|
367
|
+
`OverflowError`, and a TypeScript `bigint` outside the `i64` range throws.
|
|
368
|
+
A TypeScript `bigint` **within** `i64` range maps to `INTEGER`. Only a real
|
|
369
|
+
`bytes`/`bytearray` (Python) or `Buffer`/`Uint8Array` (TypeScript) maps to
|
|
370
|
+
`BLOB` — a list/array of integers does not.
|
|
@@ -4,7 +4,7 @@ name = "dirsql-py-ext"
|
|
|
4
4
|
# pypi/maturin handler can rewrite it via `write-version` before
|
|
5
5
|
# `maturin build`. `pyproject.toml` declares `dynamic = ["version"]`
|
|
6
6
|
# and maturin reads this field. Mirrors `packages/rust/Cargo.toml`.
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.77"
|
|
8
8
|
edition.workspace = true
|
|
9
9
|
publish = false
|
|
10
10
|
readme = "README.md"
|
|
@@ -210,6 +210,12 @@ Executes a SQL query and returns rows keyed by column name.
|
|
|
210
210
|
| BLOB | `bytes` | `Buffer` | `Value::Blob` |
|
|
211
211
|
| NULL | `None` | `null` | `Value::Null` |
|
|
212
212
|
|
|
213
|
+
An `INTEGER` outside JavaScript's safe integer range (magnitude greater
|
|
214
|
+
than `Number.MAX_SAFE_INTEGER`, 2^53 − 1) cannot be represented as a JS
|
|
215
|
+
`number` without precision loss, so the TypeScript SDK **throws** rather
|
|
216
|
+
than return a rounded value. Python's `int` is unbounded, so it always
|
|
217
|
+
round-trips.
|
|
218
|
+
|
|
213
219
|
### `watch`
|
|
214
220
|
|
|
215
221
|
::: code-group
|
|
@@ -351,7 +357,14 @@ An `extract` callback (and the SQLite columns it feeds) accepts:
|
|
|
351
357
|
| SQLite column | Python value | TypeScript value | Rust `Value` |
|
|
352
358
|
|---|---|---|---|
|
|
353
359
|
| TEXT | `str` | `string` | `Value::Text(String)` |
|
|
354
|
-
| INTEGER | `int`, `bool` | `number`, `boolean` | `Value::Integer(i64)` |
|
|
360
|
+
| INTEGER | `int`, `bool` | `number`, `boolean`, `bigint` | `Value::Integer(i64)` |
|
|
355
361
|
| REAL | `float` | `number` | `Value::Real(f64)` |
|
|
356
362
|
| BLOB | `bytes` | `Buffer` / `Uint8Array` | `Value::Blob(Vec<u8>)` |
|
|
357
363
|
| NULL | `None` | `null` | `Value::Null` |
|
|
364
|
+
|
|
365
|
+
Integers are stored as a signed 64-bit `Value::Integer`. A value that does
|
|
366
|
+
not fit that range is a hard error, not a lossy conversion: Python raises
|
|
367
|
+
`OverflowError`, and a TypeScript `bigint` outside the `i64` range throws.
|
|
368
|
+
A TypeScript `bigint` **within** `i64` range maps to `INTEGER`. Only a real
|
|
369
|
+
`bytes`/`bytearray` (Python) or `Buffer`/`Uint8Array` (TypeScript) maps to
|
|
370
|
+
`BLOB` — a list/array of integers does not.
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
#[cfg(feature = "extension-module")]
|
|
14
14
|
mod python {
|
|
15
15
|
use ::dirsql::{DirSQL, Extension, Row, RowEvent, Table, Value, db::parse_table_name};
|
|
16
|
-
use pyo3::exceptions::PyRuntimeError;
|
|
16
|
+
use pyo3::exceptions::{PyOverflowError, PyRuntimeError};
|
|
17
17
|
use pyo3::prelude::*;
|
|
18
|
-
use pyo3::types::{PyDict, PyList};
|
|
18
|
+
use pyo3::types::{PyBool, PyByteArray, PyBytes, PyDict, PyInt, PyList};
|
|
19
19
|
use std::collections::HashMap;
|
|
20
20
|
use std::path::PathBuf;
|
|
21
21
|
use std::time::Duration;
|
|
@@ -361,21 +361,34 @@ mod python {
|
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
// bool must precede int (bool is a subclass of int in Python).
|
|
364
|
-
if bound.is_instance_of::<
|
|
364
|
+
if bound.is_instance_of::<PyBool>() {
|
|
365
365
|
let b: bool = bound.extract()?;
|
|
366
366
|
return Ok(Value::Integer(if b { 1 } else { 0 }));
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
// A Python int must round-trip losslessly or fail loudly. Falling
|
|
370
|
+
// through to f64/str would silently corrupt an out-of-i64 value
|
|
371
|
+
// (lossy Real, or a TEXT repr).
|
|
372
|
+
if bound.is_instance_of::<PyInt>() {
|
|
373
|
+
return match bound.extract::<i64>() {
|
|
374
|
+
Ok(i) => Ok(Value::Integer(i)),
|
|
375
|
+
Err(_) => Err(PyOverflowError::new_err(int_overflow_message(
|
|
376
|
+
&bound.str()?.to_string(),
|
|
377
|
+
))),
|
|
378
|
+
};
|
|
371
379
|
}
|
|
380
|
+
|
|
372
381
|
if let Ok(f) = bound.extract::<f64>() {
|
|
373
382
|
return Ok(Value::Real(f));
|
|
374
383
|
}
|
|
375
384
|
if let Ok(s) = bound.extract::<String>() {
|
|
376
385
|
return Ok(Value::Text(s));
|
|
377
386
|
}
|
|
378
|
-
|
|
387
|
+
// Only genuine binary types map to BLOB. A list/tuple of ints must
|
|
388
|
+
// NOT be probed as bytes (that turned `[1,2,3]` into a BLOB by
|
|
389
|
+
// magnitude); it falls through to the repr like any other sequence.
|
|
390
|
+
if bound.is_instance_of::<PyBytes>() || bound.is_instance_of::<PyByteArray>() {
|
|
391
|
+
let b: Vec<u8> = bound.extract()?;
|
|
379
392
|
return Ok(Value::Blob(b));
|
|
380
393
|
}
|
|
381
394
|
|
|
@@ -383,6 +396,11 @@ mod python {
|
|
|
383
396
|
Ok(Value::Text(bound.str()?.to_string()))
|
|
384
397
|
}
|
|
385
398
|
|
|
399
|
+
/// The range-error message for a Python int that does not fit `i64`.
|
|
400
|
+
fn int_overflow_message(repr: &str) -> String {
|
|
401
|
+
format!("integer {repr} exceeds the 64-bit signed range dirsql can store")
|
|
402
|
+
}
|
|
403
|
+
|
|
386
404
|
fn value_to_py(py: Python<'_>, value: &Value) -> Py<PyAny> {
|
|
387
405
|
match value {
|
|
388
406
|
Value::Null => py.None(),
|
|
@@ -481,5 +499,12 @@ mod python {
|
|
|
481
499
|
fn extract_error_displays_inner() {
|
|
482
500
|
assert_eq!(ExtractError("bad".to_string()).to_string(), "bad");
|
|
483
501
|
}
|
|
502
|
+
|
|
503
|
+
#[test]
|
|
504
|
+
fn int_overflow_message_names_the_value() {
|
|
505
|
+
let m = int_overflow_message("9223372036854775808");
|
|
506
|
+
assert!(m.contains("9223372036854775808"));
|
|
507
|
+
assert!(m.contains("exceeds"));
|
|
508
|
+
}
|
|
484
509
|
}
|
|
485
510
|
}
|
|
@@ -210,6 +210,12 @@ Executes a SQL query and returns rows keyed by column name.
|
|
|
210
210
|
| BLOB | `bytes` | `Buffer` | `Value::Blob` |
|
|
211
211
|
| NULL | `None` | `null` | `Value::Null` |
|
|
212
212
|
|
|
213
|
+
An `INTEGER` outside JavaScript's safe integer range (magnitude greater
|
|
214
|
+
than `Number.MAX_SAFE_INTEGER`, 2^53 − 1) cannot be represented as a JS
|
|
215
|
+
`number` without precision loss, so the TypeScript SDK **throws** rather
|
|
216
|
+
than return a rounded value. Python's `int` is unbounded, so it always
|
|
217
|
+
round-trips.
|
|
218
|
+
|
|
213
219
|
### `watch`
|
|
214
220
|
|
|
215
221
|
::: code-group
|
|
@@ -351,7 +357,14 @@ An `extract` callback (and the SQLite columns it feeds) accepts:
|
|
|
351
357
|
| SQLite column | Python value | TypeScript value | Rust `Value` |
|
|
352
358
|
|---|---|---|---|
|
|
353
359
|
| TEXT | `str` | `string` | `Value::Text(String)` |
|
|
354
|
-
| INTEGER | `int`, `bool` | `number`, `boolean` | `Value::Integer(i64)` |
|
|
360
|
+
| INTEGER | `int`, `bool` | `number`, `boolean`, `bigint` | `Value::Integer(i64)` |
|
|
355
361
|
| REAL | `float` | `number` | `Value::Real(f64)` |
|
|
356
362
|
| BLOB | `bytes` | `Buffer` / `Uint8Array` | `Value::Blob(Vec<u8>)` |
|
|
357
363
|
| NULL | `None` | `null` | `Value::Null` |
|
|
364
|
+
|
|
365
|
+
Integers are stored as a signed 64-bit `Value::Integer`. A value that does
|
|
366
|
+
not fit that range is a hard error, not a lossy conversion: Python raises
|
|
367
|
+
`OverflowError`, and a TypeScript `bigint` outside the `i64` range throws.
|
|
368
|
+
A TypeScript `bigint` **within** `i64` range maps to `INTEGER`. Only a real
|
|
369
|
+
`bytes`/`bytearray` (Python) or `Buffer`/`Uint8Array` (TypeScript) maps to
|
|
370
|
+
`BLOB` — a list/array of integers does not.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.3.76 → dirsql-0.3.77}/packages/python/docs/tests/integration/language-flag.spec.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|