@surf-ai/sdk 1.0.0-alpha.31 → 1.0.0-alpha.33
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.
- package/dist/db/index.d.cts +5 -9
- package/dist/db/index.d.ts +5 -9
- package/package.json +1 -1
package/dist/db/index.d.cts
CHANGED
|
@@ -32,18 +32,14 @@ declare function watchSchema(schemaPath: string, options?: {
|
|
|
32
32
|
}): () => void;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* @surf-ai/sdk/db —
|
|
35
|
+
* @surf-ai/sdk/db — Database helpers via HTTP proxy to Neon PostgreSQL.
|
|
36
36
|
*
|
|
37
|
-
*
|
|
37
|
+
* All queries go through the Surf API proxy — there is no direct database
|
|
38
|
+
* connection or Drizzle ORM query builder. Use dbQuery() for all reads/writes.
|
|
38
39
|
*
|
|
39
40
|
* Usage:
|
|
40
|
-
* const {
|
|
41
|
-
*
|
|
42
|
-
* // In a backend route:
|
|
43
|
-
* const users = await db.select().from(schema.users)
|
|
44
|
-
*
|
|
45
|
-
* // Raw SQL:
|
|
46
|
-
* const result = await dbQuery('SELECT * FROM users WHERE id = $1', [userId])
|
|
41
|
+
* const { dbQuery } = require('@surf-ai/sdk/db')
|
|
42
|
+
* const users = await dbQuery('SELECT * FROM users WHERE id = $1', [userId])
|
|
47
43
|
*/
|
|
48
44
|
|
|
49
45
|
/**
|
package/dist/db/index.d.ts
CHANGED
|
@@ -32,18 +32,14 @@ declare function watchSchema(schemaPath: string, options?: {
|
|
|
32
32
|
}): () => void;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* @surf-ai/sdk/db —
|
|
35
|
+
* @surf-ai/sdk/db — Database helpers via HTTP proxy to Neon PostgreSQL.
|
|
36
36
|
*
|
|
37
|
-
*
|
|
37
|
+
* All queries go through the Surf API proxy — there is no direct database
|
|
38
|
+
* connection or Drizzle ORM query builder. Use dbQuery() for all reads/writes.
|
|
38
39
|
*
|
|
39
40
|
* Usage:
|
|
40
|
-
* const {
|
|
41
|
-
*
|
|
42
|
-
* // In a backend route:
|
|
43
|
-
* const users = await db.select().from(schema.users)
|
|
44
|
-
*
|
|
45
|
-
* // Raw SQL:
|
|
46
|
-
* const result = await dbQuery('SELECT * FROM users WHERE id = $1', [userId])
|
|
41
|
+
* const { dbQuery } = require('@surf-ai/sdk/db')
|
|
42
|
+
* const users = await dbQuery('SELECT * FROM users WHERE id = $1', [userId])
|
|
47
43
|
*/
|
|
48
44
|
|
|
49
45
|
/**
|