You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
-
# sqlc-typescript 🚀
1
+
# sqlc-typescript
2
2
3
-
A super lightweight TypeScript SQL query builder that respects your laziness and love for raw SQL. Zero runtime dependencies, just types. This is just a super thin wrapper around sqlc and a file generator - all the real magic is in sqlc. It just makes it more convenient to use in TypeScript projects.
3
+
A super lightweight TypeScript types generator that respects your laziness and love for raw SQL.
4
4
5
-
## Demo
5
+
Zero runtime dependencies, just types. This is just a super thin wrapper around [sqlc](https://sqlc.dev/) and a file generator - all the real magic is in sqlc. It just makes it more convenient to use in TypeScript projects.
@@ -123,9 +125,9 @@ Unfortunately, we can't use tagged template literals like `` sql`SELECT * FROM u
123
125
124
126
### Comparison with Other Tools 🔍
125
127
126
-
-**pgTyped**: Requires separate SQL files and function imports. It uses PostgreSQL wire protocol for type inference which requires a database connection and can't handle nullability well.
127
-
-**Prisma TypedSQL**: SQL files are separate and require function imports and it's Prisma 🫠.
128
-
-**SafeQL**: Great tool but requires ESLint and database connection for type inference.
128
+
-[pgTyped](https://github.com/adelsz/pgtyped): Requires separate SQL files and function imports. It uses PostgreSQL wire protocol for type inference which requires a database connection and can't handle nullability well.
129
+
-[Prisma TypedSQL](https://www.prisma.io/docs/orm/prisma-client/using-raw-sql/typedsql): SQL files are separate and require function imports and it's Prisma 🫠.
130
+
-[SafeQL](https://github.com/ts-safeql/safeql): Great tool but requires ESLint and database connection for type inference.
129
131
130
132
The key difference: We use sqlc's SQL parser instead of PostgreSQL wire protocol for type inference, which means:
0 commit comments