Hein
549ccb8468
fix(handler): fetch updated records after transaction commits
...
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Waiting to run
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Waiting to run
Build , Vet Test, and Lint / Lint Code (push) Waiting to run
Build , Vet Test, and Lint / Build (push) Waiting to run
Tests / Unit Tests (push) Waiting to run
Tests / Integration Tests (push) Waiting to run
* Update selection queries to use model columns
* Ensure updated records are fetched and returned in responses
2026-06-05 11:12:04 +02:00
Hein
c42d09238f
fix: better error detail for failed sql
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Failing after -35m9s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Failing after -35m9s
Build , Vet Test, and Lint / Lint Code (push) Failing after -35m9s
Build , Vet Test, and Lint / Build (push) Failing after -35m9s
Tests / Unit Tests (push) Failing after -35m10s
Tests / Integration Tests (push) Failing after -35m10s
2026-05-20 13:06:26 +02:00
Hein
987a2a7faf
fix(db): convert slices to PostgreSQL array literals in queries
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -32m17s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -31m49s
Build , Vet Test, and Lint / Build (push) Successful in -31m53s
Build , Vet Test, and Lint / Lint Code (push) Successful in -31m11s
Tests / Unit Tests (push) Successful in -32m31s
Tests / Integration Tests (push) Failing after -32m46s
2026-05-07 14:33:35 +02:00
Hein
aef1f96c10
fix(db): cast columns to text for LIKE/ILIKE queries
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -29m15s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -29m7s
Build , Vet Test, and Lint / Build (push) Successful in -32m31s
Build , Vet Test, and Lint / Lint Code (push) Successful in -31m40s
Tests / Integration Tests (push) Failing after -33m31s
Tests / Unit Tests (push) Successful in -31m4s
2026-04-13 14:05:17 +02:00
Hein
aa362c77da
fix(cursor): trim parentheses from sort column names
2026-03-27 15:07:10 +02:00
Hein
7f6410f665
feat(resolvemcp): add support for join-column sorting in cursor pagination
...
* Enhance getCursorFilter to accept join clauses for sorting
* Update resolveColumn to handle joined columns
* Modify tests to validate new join functionality
2026-03-27 13:10:42 +02:00
Hein
7dd630dec2
fix(handler): set default sort to primary key if none provided
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -26m15s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -26m11s
Build , Vet Test, and Lint / Lint Code (push) Failing after -30m52s
Build , Vet Test, and Lint / Build (push) Successful in -30m44s
Tests / Integration Tests (push) Failing after -31m5s
Tests / Unit Tests (push) Successful in -29m6s
2026-03-11 14:37:04 +02:00
Hein
613bf22cbd
fix(cursor): use full schema-qualified table name in filters
2026-03-11 14:25:44 +02:00
warkanum
d1ae4fe64e
refactor(handler): unify filter operator handling for consistency
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -30m26s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -29m58s
Build , Vet Test, and Lint / Lint Code (push) Successful in -29m48s
Build , Vet Test, and Lint / Build (push) Successful in -30m4s
Tests / Integration Tests (push) Failing after -30m39s
Tests / Unit Tests (push) Successful in -30m29s
2026-03-01 13:21:38 +02:00
warkanum
254102bfac
refactor(auth): simplify handler type assertions for middleware
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -30m2s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -29m31s
Build , Vet Test, and Lint / Lint Code (push) Successful in -29m19s
Build , Vet Test, and Lint / Build (push) Successful in -29m42s
Tests / Integration Tests (push) Failing after -30m35s
Tests / Unit Tests (push) Successful in -30m17s
2026-03-01 12:08:36 +02:00
warkanum
6c27419dbc
refactor(auth): enhance request handling with middleware-enriched context
2026-03-01 12:06:43 +02:00
warkanum
377336caf4
feat(sql): implement IN condition handling with parameterized queries
2026-03-01 09:52:32 +02:00
warkanum
79720d5421
feat(security): add BeforeHandle hook for auth checks after model resolution
...
- Implement BeforeHandle hook to enforce authentication based on model rules.
- Integrate with existing security mechanisms to allow or deny access.
- Update documentation to reflect new hook and its usage.
2026-03-01 09:15:30 +02:00
warkanum
e7ab0a20d6
Merge branch 'main' of github.com:bitechdev/ResolveSpec
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -30m15s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -29m41s
Build , Vet Test, and Lint / Build (push) Successful in -29m50s
Build , Vet Test, and Lint / Lint Code (push) Successful in -29m12s
Tests / Integration Tests (push) Failing after -30m43s
Tests / Unit Tests (push) Successful in -30m26s
2026-02-28 22:53:26 +02:00
warkanum
e4087104a9
feat(security): add model rules enforcement for update and delete operations
...
- Implement BeforeUpdate and BeforeDelete hooks to enforce CanUpdate and CanDelete rules.
- Introduce new security context for websocketspec to manage security hooks.
- Enhance error handling in delete operations to provide clearer feedback.
2026-02-28 22:53:21 +02:00
Hein
e923b0a2a3
feat(routes): add authentication middleware support for routes
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -25m48s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -25m25s
Build , Vet Test, and Lint / Lint Code (push) Successful in -25m29s
Build , Vet Test, and Lint / Build (push) Successful in -25m41s
Tests / Integration Tests (push) Failing after -26m14s
Tests / Unit Tests (push) Successful in -26m3s
2026-02-16 10:38:06 +02:00
Hein
fd77385dd6
feat(handler): enhance FetchRowNumber support in handlers
...
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -26m2s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -25m39s
Build , Vet Test, and Lint / Lint Code (push) Successful in -25m42s
Build , Vet Test, and Lint / Build (push) Successful in -25m55s
Tests / Integration Tests (push) Failing after -26m29s
Tests / Unit Tests (push) Successful in -26m17s
* Implement FetchRowNumber handling in multiple handlers
* Improve error logging for missing rows with filters
* Set row numbers correctly based on FetchRowNumber
2026-02-10 17:42:27 +02:00
Hein
a6c7edb0e4
feat(resolvespec): add OR logic support in filters
...
* Introduce `logic_operator` field to combine filters with OR logic.
* Implement grouping for consecutive OR filters to ensure proper SQL precedence.
* Add support for custom SQL operators in filter conditions.
* Enhance `fetch_row_number` functionality to return specific record with its position.
* Update tests to cover new filter logic and grouping behavior.
Features Implemented:
1. OR Logic Filter Support (SearchOr)
- Added to resolvespec, restheadspec, and websocketspec
- Consecutive OR filters are automatically grouped with parentheses
- Prevents SQL logic errors: (A OR B OR C) AND D instead of A OR B OR C AND D
2. CustomOperators
- Allows arbitrary SQL conditions in resolvespec
- Properly integrated with filter logic
3. FetchRowNumber
- Uses SQL window functions: ROW_NUMBER() OVER (ORDER BY ...)
- Returns only the specific record (not all records)
- Available in resolvespec and restheadspec
- Perfect for "What's my rank?" queries
4. RowNumber Field Auto-Population
- Now available in all three packages: resolvespec, restheadspec, and websocketspec
- Uses simple offset-based math: offset + index + 1
- Automatically populates RowNumber int64 field if it exists on models
- Perfect for displaying paginated lists with sequential numbering
2026-02-10 16:55:55 +02:00
Hein
4bf3d0224e
feat(database): ✨ normalize driver names across adapters
...
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -25m46s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -23m31s
Build , Vet Test, and Lint / Lint Code (push) Successful in -24m55s
Tests / Unit Tests (push) Successful in -26m19s
Build , Vet Test, and Lint / Build (push) Successful in -26m2s
Tests / Integration Tests (push) Failing after -26m42s
* Added DriverName method to BunAdapter, GormAdapter, and PgSQLAdapter for consistent driver name handling.
* Updated transaction adapters to include driver name.
* Enhanced mock database implementations for testing with DriverName method.
* Adjusted getTableName functions to accommodate driver-specific naming conventions.
2026-02-05 13:28:53 +02:00
Hein
09f2256899
feat(sql): ✨ Enhance SQL clause handling with parentheses
...
* Add EnsureOuterParentheses function to wrap clauses in parentheses.
* Implement logic to preserve outer parentheses for OR conditions.
* Update SanitizeWhereClause to utilize new function for better query safety.
* Introduce tests for EnsureOuterParentheses and containsTopLevelOR functions.
* Refactor filter application in handler to group OR filters correctly.
2026-01-26 09:14:17 +02:00
Hein
0ac207d80f
fix: better update handling
2026-01-13 11:33:45 +02:00
Hein
cb20a354fc
feat(cors): ✨ update SetCORSHeaders to accept Request
...
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -27m41s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in 53s
Tests / Unit Tests (push) Successful in 29s
Build , Vet Test, and Lint / Lint Code (push) Successful in -27m8s
Build , Vet Test, and Lint / Build (push) Successful in -27m25s
Tests / Integration Tests (push) Failing after 37s
* Modify SetCORSHeaders function to include Request parameter.
* Set Access-Control-Allow-Origin and Access-Control-Allow-Headers to "*".
* Update all relevant calls to SetCORSHeaders across the codebase.
2026-01-07 15:24:44 +02:00
Hein
bf7125efc3
feat(reflection): ✨ add ExtractTagValue and GetRelationshipInfo functions
...
* Implement ExtractTagValue to handle struct tag parsing.
* Introduce GetRelationshipInfo for extracting relationship metadata.
* Update tests to validate new functionality.
* Refactor related code for improved clarity and maintainability.
2026-01-07 11:54:12 +02:00
Hein
62a8e56f1b
feat(reflection): ✨ add GetPointerElement function for type handling
...
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -27m40s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -27m8s
Build , Vet Test, and Lint / Lint Code (push) Successful in -27m5s
Build , Vet Test, and Lint / Build (push) Successful in -27m21s
Tests / Unit Tests (push) Successful in -27m42s
Tests / Integration Tests (push) Failing after -27m55s
* Introduced GetPointerElement to simplify pointer type extraction.
* Updated handleUpdate methods to utilize GetPointerElement for better clarity and maintainability.
2026-01-06 10:45:23 +02:00
Hein
c0c669bd3d
feat(handler): enhance update logic to merge existing records with incoming data
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -26m28s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -24m52s
Build , Vet Test, and Lint / Lint Code (push) Successful in -26m57s
Build , Vet Test, and Lint / Build (push) Successful in -27m29s
Tests / Integration Tests (push) Failing after -27m58s
Tests / Unit Tests (push) Successful in -26m53s
2026-01-05 12:31:01 +02:00
warkanum
96b098f912
feat(resolvespec): accept bunrouter.Router and bunrouter.Group in SetupBunRouterRoutes
...
Replaced *router.StandardBunRouterAdapter parameter with BunRouterHandler
interface to support both bunrouter.Router and bunrouter.Group types,
enabling route registration on router groups with path prefixes.
- Added BunRouterHandler interface
- Updated SetupBunRouterRoutes signature
- Updated example functions to use bunrouter.New() directly
- Added ExampleBunRouterWithGroup demonstrating group usage
2026-01-03 16:06:53 +02:00
Hein
9209193157
fix: lint issues and docs
2025-12-30 17:44:57 +02:00
Hein
02fbdbd651
Cache package is pure infrastructure. Cache invalidates on create/delete from the API
Tests / Integration Tests (push) Failing after 9s
Build , Vet Test, and Lint / Lint Code (push) Successful in 8m13s
Build , Vet Test, and Lint / Build (push) Successful in -24m36s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -25m6s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -24m33s
Tests / Unit Tests (push) Failing after -25m39s
2025-12-18 16:30:38 +02:00
Hein
09be676096
Resolvespec delete returns deleted record
2025-12-18 12:52:47 +02:00
Hein
2f18dde29c
Added Tx common.Database to hooks
2025-12-12 09:45:44 +02:00
Hein
e1abd5ebc1
Enhanced the SanitizeWhereClause function
2025-12-10 08:36:24 +02:00
Hein
23e2db1496
Fixed linting
2025-12-09 12:02:44 +02:00
Hein
d188f49126
Added openapi spec
2025-12-09 12:01:21 +02:00
Hein
1baa0af0ac
Config Package
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Waiting to run
Build , Vet Test, and Lint / Lint Code (push) Waiting to run
Build , Vet Test, and Lint / Build (push) Waiting to run
Tests / Unit Tests (push) Waiting to run
Tests / Integration Tests (push) Waiting to run
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Waiting to run
2025-12-09 09:19:56 +02:00
Hein
659b2925e4
Cursor pagnation for resolvespec
2025-12-09 08:51:15 +02:00
Hein
c9eaf84125
A lot more tests
2025-12-08 16:56:48 +02:00
Hein
b741958895
Code sanity fixes, added middlewares
Tests / Run Tests (1.23.x) (push) Has been cancelled
Tests / Run Tests (1.24.x) (push) Has been cancelled
Tests / Lint Code (push) Has been cancelled
Tests / Build (push) Has been cancelled
2025-12-08 08:28:43 +02:00
Hein
ff72e04428
Added meta operation.
2025-12-03 11:59:58 +02:00
Hein
f3ba314640
Refectored the mux routers.
2025-12-03 10:42:26 +02:00
Hein
a61556d857
Added FallbackHandler
2025-12-02 17:16:34 +02:00
Hein
8172c0495d
More generic security solution.
2025-12-02 16:35:08 +02:00
Hein
7a3c368121
Pass through to default handler
2025-12-02 16:09:36 +02:00
Hein
9c5c7689e9
More common handler interface
2025-12-02 15:45:24 +02:00
Hein
1643a5e920
Added cache, funcspec and implemented total cache
2025-12-01 14:40:54 +02:00
Hein
76bbf33db2
Fixed SingleRecordAsObject true when handleRead with no id
2025-11-21 11:49:08 +02:00
Hein
9a3564f05f
SanitizeWhereClause with tablename on handlers.
2025-11-21 11:00:44 +02:00
Hein
7e76977dcc
Lots of refactoring, Fixes to preloads
2025-11-21 10:17:20 +02:00
Hein
59bd709460
More reflection function to handle sql columns and get default sqlcolumn lists.
2025-11-21 08:35:46 +02:00
Hein
1cd04b7083
Better where clause handling for preloads
2025-11-20 17:02:27 +02:00
Hein
0d4909054c
Better handling of preload where conditions and a few panic changes
2025-11-20 16:50:26 +02:00