sq
node-sql
sq | node-sql | |
---|---|---|
10 | 1 | |
227 | 1,047 | |
- | - | |
5.9 | 0.0 | |
9 days ago | over 1 year ago | |
Go | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sq
-
How to use prepared queries wisely - postgres & pgx & squirell
You can use my library sq which handles this exact use case with the PreparedQuery type. It allows you to build a query programmatically, prepare it and optionally rebind parameters by name.
-
How to Work with SQL Databases in Go
Have you seen my library https://github.com/bokwoon95/sq? You can use it like database/sql and write plain SQL strings, only needing to provide a function that maps an database row to a struct and generics returns a slice of those structs at the end.
-
DRY pgx / database/sql?
Also consider my library sq which handles dynamic query generation as well as data mapping. You may find it simpler than bun because it's a lot closer to database/sql (it doesn't require a special DB object, it uses a plain *sql.DB).
-
Ent: An Entity Framework for Go
> I didn't see anything to help me build back graphs
Hmm you've certainly given me something to think about. Thanks.
BTW joins are not challenging, but you made me realize I didn't show any joins in my basic examples. Here is UPDATE with JOIN example: https://bokwoon.neocities.org/sq.html#postgres-update-with-j....
-
scan rows into types powered by generics
How does it compare to https://github.com/bokwoon95/sq?
- Show HN: An SQL data mapper using Go generics
- A type-safe struct mapper and query builder for Go (using generics)
- A struct mapper, query builder and migration tool for Go.
node-sql
-
Ent: An Entity Framework for Go
> Eg, transform a schema type that describes my database tables into an easy-to-use query builder and data abstraction API with rich method chaining.
TypeScript can do this. It was done already halfway-well 6 years ago with way fewer features in TypeScript (https://github.com/brianc/node-sql/blob/master/lib/types.d.t...) - today we can do much better.
What are some alternatives?
vlcn-orm - Develop with your data model anywhere. Query and load data reactively. Replicate between peers without a central server.
scan - scan sql rows into any type powered by generics
ent - An entity framework for Go
korm - KORM, an elegant and lightning-fast ORM for all your concurrent and async needs. Inspired by the highly popular Django Framework, KORM offers similar functionality with the added bonus of performance
Squirrel - Fluent SQL generation for golang
typed-graphql-builder - A fully type-safe graphql query builder, inspired by tql
sqddl - sqddl is a zero-configuration database migration tool.
gqlgen - go generate based graphql server library
go_sql_benchmarks
atlas - Manage your database schema as code