Context
SurrealDB v3 DATETIME fields reject Python ISO strings. The correct approach is using time::now() in SurrealQL. Kushtaka needs to set timestamps via time::now() but surql-py's create_record/merge_record pass Python values that get serialized as strings.
Examples
# Current (raw):
await query("CREATE table SET created_at = time::now(), updated_at = time::now()")
# Desired:
from surql import create_record, SurrealFn
await create_record('table', created_at=SurrealFn('time::now()'), updated_at=SurrealFn('time::now()'))
Needed
- A way to pass SurrealDB functions (time::now, time::format, math::*) as field values in CRUD operations
- These should be rendered as-is in the SurrealQL, not as parameterized string values
Context
SurrealDB v3 DATETIME fields reject Python ISO strings. The correct approach is using
time::now()in SurrealQL. Kushtaka needs to set timestamps viatime::now()but surql-py's create_record/merge_record pass Python values that get serialized as strings.Examples
Needed