sqlc
rqlite
Our great sponsors
sqlc | rqlite | |
---|---|---|
169 | 112 | |
10,518 | 14,760 | |
5.9% | 1.6% | |
9.7 | 9.9 | |
6 days ago | 7 days ago | |
Go | Go | |
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.
sqlc
-
Show HN: Sqlbind a Python library to compose raw SQL
I came across this yesterday for golang: https://sqlc.dev which is somewhat like what you want, maybe.
Not sure it allows you to parameterize table names but the basic idea is codegen from sql queries so you are working with go code (autocompletion etc).
- API completa em Golang - Parte 7
-
ORMs are nice but they are the wrong abstraction
Agreed, but tools like https://sqlc.dev, which I mention in the article, are a good trade-off that allows you to have verified, testable, SQL in your code.
- API completa em Golang - Parte 6
-
Go ORMs Compared
sqlc is not strictly a conventional ORM. It offers a unique approach by generating Go code from SQL queries. This allows developers to write SQL, which sqlc then converts into type-safe Go code, reducing the boilerplate significantly. It ensures that your queries are syntactically correct and type-safe. sqlc is ideal for those who prefer writing SQL and are looking for an efficient way to integrate it into a Go application.
-
Type-safe Data Access in Go using Prisma and sqlc
I was browsing awesome-go for ideas on how to setup my data access layer when I stumbled on sqlc. It seemed like a great option. Code generation is a strategy often used in the Go ecosystem and making my queries safe at compile time was an idea I really liked. Knex was great, but it required of me that I test thoroughly my queries at runtime and that I sanitize my query results to ensure type safety within my application.
-
Level UP your RDBMS Productivity in GO
Now, we are going to generate the code. For this purpose, we are going to use sqlc.
-
What 3rd-party libraries do you use often/all the time?
https://github.com/sqlc-dev/sqlc — for use with //go:generate
- API completa em Golang - Parte 1
- Tenha controle sobre seu SQL com Golang e SQLC
rqlite
-
CursusDB – A new scalable distributed document oriented database
Seems like you could do the same with rqlite [1], since SQLite supports JSON.
[1]: https://rqlite.io
- I'm All-In on Server-Side SQLite
-
So, you want to deploy on the edge?
rqlite[1] creator here, happy to answer any questions. rqlite also supports read-only nodes, which can also help with reads at the "edge". It probably wouldn't scale to 100s of nodes, it is an option.
"rqlite supports adding read-only nodes. You can use this feature to add read scalability to the cluster if you need a high volume of reads, or want to distribute copies of the data nearer to clients – but don’t want those nodes counted towards the quorum. These types of nodes are also known as non-voting nodes."
- LiteFS Cloud: Distributed SQLite with Managed Backups
-
Latest Chat-GPT4 release (May 12th 2023) sure is buggy
result, opErr := db.executeStmtWithConn for the "executeStmt that you , you can manipulate the picture ', you ... i = t given, and it' . If, -212<|endoftext|>
[1] https://rqlite.io/
Yes, it's saved me hours of time -- with certain narrow tasks. For example, it generated these files for me:
https://github.com/rqlite/rqlite/blob/master/auto/backup/sum*
It took a few minutes, might have taken me 1+ hour of some research, and mechanically typing it all in.
-
Ask HN: It's 2023, how do you choose between MySQL and Postgres?
Just to point out, there are now SQLite replication and various "distributed database" projects which seem to work fairly well.
They're probably not as battle tested as the PostgreSQL ones, but they are around, have users, and are actively developed.
The ones I remember off the top of my head:
* https://github.com/rqlite/rqlite <-- more of a "distributed database using RAFT" type of thing
-
rqlite v7.15: the lightweight distributed database built on Go, Raft, and SQLite -- now with automatic backups to S3
Instead of running it as a separate rqlited, integrate it into an existing binary. I answered my own question by looking in https://github.com/rqlite/rqlite/blob/master/cmd/rqlited/main.go
-
Strong Consistency with Raft and SQLite
Is this somehow related to rqlite? https://rqlite.io/
The architecture is very similar.
What are some alternatives?
sqlx - general purpose extensions to golang's database/sql
GORM - The fantastic ORM library for Golang, aims to be developer friendly
SQLBoiler - Generate a Go ORM tailored to your database schema.
ent - An entity framework for Go
dqlite - Embeddable, replicated and fault-tolerant SQL engine.
pgx - PostgreSQL driver and toolkit for Go
jet - Type safe SQL builder with code generation and automatic query result data mapping
PyPika - PyPika is a python SQL query builder that exposes the full richness of the SQL language using a syntax that reflects the resulting query. PyPika excels at all sorts of SQL queries but is especially useful for data analysis.
Squirrel - Fluent SQL generation for golang
litestream - Streaming replication for SQLite.
xo - Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server
goqu - SQL builder and query library for golang