vite-plugin-postgres-import 0.3.0 → 0.3.1
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/README.md +1 -1
- package/package.json +1 -1
- package/parse.js +5 -3
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ The only 4 sqlc annotations that are available are the following:
|
|
|
71
71
|
|
|
72
72
|
- `:one` - returns template argument, or the default-parsed ones from the select/returning clause.
|
|
73
73
|
|
|
74
|
-
ex.: `Query<R
|
|
74
|
+
ex.: `Query<R = { ... }>(c): Promise<R>`
|
|
75
75
|
|
|
76
76
|
- `:many` - returns template argument as an array, or the default-parsed ones from the select/returning clause.
|
|
77
77
|
|
package/package.json
CHANGED
package/parse.js
CHANGED
|
@@ -136,9 +136,11 @@ export function ${module.name}<${module.returnSymbols
|
|
|
136
136
|
? `unknown[]`
|
|
137
137
|
: `[ ${r?.map(() => `unknown`)?.join(", ") ?? ""} ]`
|
|
138
138
|
}`
|
|
139
|
-
: `R${i + 1}
|
|
140
|
-
r
|
|
141
|
-
}${r.length > 3 ? "\
|
|
139
|
+
: `R${i + 1}${module.execution[i] === ":one" ? `` : ` extends QueryResultRow`} = {${
|
|
140
|
+
r.length > 3 ? "\n\t" : " "
|
|
141
|
+
}${r?.map((r) => `${r}: unknown`)?.join(r.length > 3 ? ";\n\t" : "; ") ?? ""}${
|
|
142
|
+
r.length > 3 ? "\n" : " "
|
|
143
|
+
}}`
|
|
142
144
|
)
|
|
143
145
|
.join(", ")}>(
|
|
144
146
|
tx: Pool | ClientBase | Promise<ClientBase>,${keys.length ? `\n\tparams: Record<${keys}, unknown>` : ``}
|