Commit graph

14 commits

Author SHA1 Message Date
Lukas Kahwe Smith
169560af77
Add nested routes support in the RestApiHandler (#2454) 2026-03-23 18:25:36 -07:00
Jiasheng
17922f03e7
feat(transaction): implement transaction handling with sequential operations and validation (#2399)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-25 20:49:43 +08:00
Lukas Kahwe Smith
14a0a035b9
fix handling of a single column unique index with externalIdMapping (#612) 2026-01-30 21:07:44 +08:00
Yiming Cao
99f68e2f7b
feat(orm): mysql support (#616)
* WIP(orm): mysql support

* WIP: more progress with fixing tests

* WIP: get all client api tests pass

* WIP: get all tests pass

* fix executor

* add MySQL to CI matrix

* fix sqlite test runs

* fix test

* fix delete readback check

* set mysql container max connections

* fix tests

* fix test

* refactor: extract duplicated mysql/pg code into base class

* address PR comments

* refactor: remove order by duplicated code

* refactor: optimize stripTableReference

* addressing PR comments

* fix tests
2026-01-24 23:21:36 +08:00
sanny-io
27e8910830
feat: between operator (#569)
* feat: `between` operator

* chore: add tests

* Document inclusivity.

* Add reversed order test.

* chore: add REST server test

* Fix test typo.

* Verify correct object returned.

* Additional test cases.

* Make AI suggested changes.

* Remove filter.

* Fix styling.

* Add more REST tests.

* Add more int tests for REST.
2026-01-16 21:30:31 +08:00
Yiming Cao
9033211ae6
fix(server): allow Infinity as pageSize option for REST api (#581)
* fix(server): allow Infinity as pageSize option for REST api

* fix schema
2026-01-09 16:17:25 +08:00
Yiming Cao
6ac5af5ab1
fix(qaas): add options validation (#574)
* feat(cli): implement watch mode for generate

* chore(root): update pnpm-lock.yaml

* chore(cli): track all model declaration and removed paths, logs in past tense

* fix(cli): typo, unused double array from

* fix(orm): preserve zod validation errors when validating custom json types

* update

* chore(cli): move import, fix parallel generation on watch

* feat(common-helpers): implement single-debounce

* chore(cli): use single-debounce for debouncing

* feat(common-helpers): implement single-debounce

* fix(common-helpers): re run single-debounce

* fix(qaas): add options validation

* fix pr comments

---------

Co-authored-by: FTB_lag <tabolskyy.git@gmail.com>
2026-01-08 16:58:45 +08:00
Mike Willbanks
2172614e0e
custom procedures (#551)
* feat: custom procs

* chore: cleanup

* fix: remove $procedures from client

* fix: failing test due to previous alias

* feat(custom-procs)!: make procedures envelope-only via $procs

- Switch procedure calls to `db.$procs.name({ args: {...} })` (no positional args)
- Remove legacy `$procedures` alias entirely (client API + server routing/logging)
- Validate procedure envelope input (`args` object, required/unknown keys)
- Keep TanStack Query procedure hooks as `(args, options)` (with conditional args optionality)
- Update server/ORM/client tests for the envelope API

* fix: code review feedback

* fix: code review comments

* fix: coderabbit review comments

* fix: remove useless proxy method

* test: add a couple of e2e tests that verify both typing and runtime

* test: improve e2e tests

* test: add missing mutation flag

* regenerate test schema

* refactor: procedure params generation fix and type refactors

- Simplified procedure's params definition from a tuple an object, since procs are now called with an envelop now

- Refactored procedure related typing to make them more consistent with other CURD types (that usually takes the schema as the first type parameter, and a name as the second)

- Moved detailed procedure's types to "crud-types" where other ORM client detailed types are defined

- Removed some type duplication from hooks side

- Updated the "orm" sample to demonstrate procedures

* fix: disable infinite custom proc queries for now

---------

Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-01-08 11:21:51 +08:00
sanny-io
446a48335f
feat: exists operation (#550)
* feat: exists operation

* Add RPC handling.

* Add frontend handling.

* Add tests.

* Fix postgres error.

* Add JSDoc.

* Remove `@ts-expect-error`

* Disable post-processing.

* Put semicolon back.
2026-01-07 18:05:49 +08:00
Mike Willbanks
65388a5ac5
issue: rpc on update, 422 filtering error (#546)
* issue: rpc on update, 422 filtering error

the error appears to be caused by the json filtering logic, it is attempting
to utilize the filtering logic when there is an update on a list or json
field even if there are no such values to be filtered during an update
when attempting to set a new value

* fix: rpc update handling

* fix: undo the ORM side change since it's unrelated to the original issue

* fix: get back the `args ?? {}` safety guard

---------

Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-30 12:02:55 +08:00
Yiming Cao
ff0808d359
refactor: revised error system (#377)
* refactor: revised error system

* addressing PR comments
2025-11-06 21:59:27 -08:00
Yiming Cao
95da8d2dc5
feat(server): migrate rest api handler (#337)
* feat(server): migrate rest api handler

* addressing PR comments

* update lock file

* fix pg string json handling

* update
2025-10-26 22:27:09 -07:00
Yiming Cao
cccd34491d
refactor: rename runtime package to orm (#332) 2025-10-23 22:07:55 -07:00
Yiming Cao
56b68ab9cc
feat(server): migrate rpc api handler and express adapter (#328)
* feat(server): migrate rpc api handler and express adapter

* fix package.json

* misc fixes

* update

* update ot express5 only

* update

* update

* fix test
2025-10-23 19:05:05 -07:00