Skip to content

Commit ac674e9

Browse files
committed
docs: update adapter specs with CURRENT_TIMESTAMP and interval_expr
- MySQL adapter: use CURRENT_TIMESTAMP (not NOW) for consistency - Both adapters: document interval_expr() output format - MySQL: INTERVAL 5 SECOND - PostgreSQL: INTERVAL '5 seconds'
1 parent 51e2f0f commit ac674e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/design/multi-backend-plan.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,8 @@ Key behaviors:
430430
- `quote_identifier()`: Returns `` `name` `` (backticks)
431431
- `create_table_sql()`: Includes `ENGINE=InnoDB` and inline `COMMENT`
432432
- `insert_sql()`: Supports `REPLACE INTO` and `ON DUPLICATE KEY UPDATE`
433-
- `current_timestamp_expr()`: Returns `NOW()` or `NOW(precision)`
433+
- `current_timestamp_expr()`: Returns `CURRENT_TIMESTAMP` or `CURRENT_TIMESTAMP(precision)`
434+
- `interval_expr(5, 'second')`: Returns `INTERVAL 5 SECOND`
434435

435436
### 2.3 PostgreSQL Adapter Implementation
436437

@@ -458,7 +459,8 @@ Key behaviors:
458459
- `quote_identifier()`: Returns `"name"` (double quotes)
459460
- `create_table_sql()`: No engine; comments via separate `COMMENT ON` statement
460461
- `insert_sql()`: Uses `ON CONFLICT DO NOTHING` / `ON CONFLICT DO UPDATE`
461-
- `current_timestamp_expr()`: Returns `CURRENT_TIMESTAMP`
462+
- `current_timestamp_expr()`: Returns `CURRENT_TIMESTAMP` or `CURRENT_TIMESTAMP(precision)`
463+
- `interval_expr(5, 'second')`: Returns `INTERVAL '5 seconds'`
462464
- `core_type_to_sql("datetime")`: Returns `timestamp`
463465
- `core_type_to_sql("decimal(p,s)")`: Returns `numeric(p,s)`
464466

0 commit comments

Comments
 (0)