sqlcx-orm 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +11 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -106,6 +106,17 @@ preferences JSONB
106
106
 
107
107
  Generates a fully typed TypeBox object schema. Supports nested objects, arrays (`string[]`), and nullable (`string?`).
108
108
 
109
+ ### Partial column selection
110
+
111
+ Only select the columns you need — the generated type matches exactly what you query:
112
+
113
+ ```sql
114
+ -- name: ListUsers :many
115
+ SELECT id, name, email FROM users ORDER BY created_at DESC;
116
+ ```
117
+
118
+ Generates a `ListUsersRow` with only `{ id: number; name: string; email: string }` — not the full table type. No over-fetching in your types.
119
+
109
120
  ### `RETURNING` clause support
110
121
 
111
122
  ```sql
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sqlcx-orm",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "SQL-first cross-language type-safe code generator",
5
5
  "type": "module",
6
6
  "bin": {