atlas
sqlc
atlas | sqlc | |
---|---|---|
72 | 178 | |
6,344 | 14,054 | |
4.7% | 2.9% | |
9.7 | 9.0 | |
4 days ago | 2 days ago | |
Go | Go | |
Apache License 2.0 | 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.
atlas
-
Show HN: SRTD – Live-reloading SQL templates for Supabase migrations
thanks for contributing this! i will definitely check it, was thinking about using https://atlasgo.io/ for declarative sql code, glad there is another option!
- Desvendando o Atlas: Gerencie Seus Esquemas de Banco de Dados com Estilo🚀
-
GORM, PostgreSQL & Atlas
Atlas is a modern database schema management tool that provides a declarative way to manage database schemas and migrations.
- Atlas: Manage your database schema as code
-
How to handle migrations in Golang
Atlas
-
Pgroll: zero-downtime, undoable, schema migrations for Postgres
Check out: https://github.com/ariga/atlas
(I'm one of the authors of this project).
-
Show HN: Postgres Language Server
fwiw, I personally am interested in this approach too[0]. I keep running into roadblocks around the ordering of events and some of the hairy issues around "destructive" actions (eg: renaming columns). i think we can get there, especially once we make progress with this LSP.
There are other notable mentions in this space:
Reshape: https://fabianlindfors.se/blog/schema-migrations-in-postgres...
Atlas: https://atlasgo.io/
[0] https://github.com/kiwicopple/declarative-schemas
-
Database migration tool
Atlas: https://github.com/ariga/atlas. It can be integrated with any ORM, but also has an official one for GORM: https://atlasgo.io/guides/orms/gorm
-
Queryx: An Open-Source Go ORM with Automatic Schema Management
Run the queryx db:create command to create a PostgreSQL database, and then run queryx db:migrate to automatically create the database migration files and database structure. Queryx’s database schema management is built upon Atlas.
-
Tool for generating automatic migrations/schema diff
One of https://atlasgo.io's creators here.
sqlc
- Rails for Everything
-
Show HN: Generate type-safe code for SQL queries in any language
sqlc (https://sqlc.dev/) is amazing, but I needed to use it in several unsupported languages. So instead of creating a plugin for each of those languages, I created a generic one, which is based on go templates.
-
Some Go web dev notes
I really wanted to like sqlc, but it had some major limitations and minor annoyances last time I tried it a few months ago. You might want to go through its list of issues[1] before adopting it.
Things like no support for dynamic queries[2], one-to-many relationships[3], embedded CTEs[4], composite types[5], etc.
It might work fine if you only have simple needs, but if you ever want to do something slightly sophisticated, you'll have to fallback to the manual approach. It's partly understandable, though. It cannot realistically support every feature of every DBMS, and it's explicitly not an ORM. But I still decided to stick to the manual approach for everything, instead of wondering whether something is or isn't supported by sqlc.
[1]: https://github.com/sqlc-dev/sqlc/issues/
[2]: https://github.com/sqlc-dev/sqlc/issues/3414
[3]: https://github.com/sqlc-dev/sqlc/issues/3394
[4]: https://github.com/sqlc-dev/sqlc/issues/3128
[5]: https://github.com/sqlc-dev/sqlc/issues/2760
-
Sqlc: Compile SQL to type-safe code
I missed this too. However, I've found you can work around it pretty easily with clauses like CASE WHEN @field != "" THEN column = @field ELSE true END.
Example from the sqlc creator (https://github.com/sqlc-dev/sqlc/discussions/364#discussionc...):
-- name: FilterFoo :many
-
At 50 Years Old, Is SQL Becoming a Niche Skill?
LOL...
And then there is Golang. SQLC ( https://sqlc.dev ) becomes a source of truth not a sink... mix in some yaml and you have your json tags and validation mixed in.
Candidly good engineers are still using SQL...
-
FrankenPHP: The Modern PHP App Server
>> Also, I can think of a number of json schemas that are impossible to replicate in Go's type system but work just fine in PHP.
Not at all. There are some that would be painful to write "by hand". An expansive and nested set of null fields would suck if I had to spell it all out...
https://sqlc.dev << changes everything. If you add in the YAML (and I hate yaml) you can get your JSON to DB mapping in there, as well as your validations (all output as struct tags).
Everything else that you're going to want (transforming inputs to/from json, logging, auth) is some pretty simple middleware.
-
Show HN: Riza – Safely run untrusted code from your app
Hi HN, I’m Kyle and together with Andrew (https://news.ycombinator.com/user?id=stanleydrew) we’ve been working on Riza (https://riza.io), a project to make WASM sandboxing more approachable. We’re excited to share a developer preview of our code interpreter API with HN.
There’s a bit of a backstory here. A few months ago, an old coworker reached out asking how to execute untrusted code generated by an LLM. Based on our experience building a plugin system for sqlc (https://sqlc.dev), we thought a sandboxed WASM runtime would be a good fit. A bit of hacking later, we got everything wired up to solve his issue. Now the API is ready for other developers to try out.
The Riza Code Interpreter API is an HTTP interface to various dynamic language interpreters, each running inside a WASM sandbox without access to the outside world (for now). We modeled the API to align with a POSIX shell-style interface.
We made a playground so you can try it out without signing up: https://riza.io
The API documentation lives here: https://docs.riza.io
There are many limitations at the moment, but we expect to rapidly expand capabilities so that programs can e.g. access the network and filesystem. Our roadmap has more details: https://docs.riza.io/reference/roadmap
If you need to execute LLM-generated code we’d love to have you try the API and let us know if you run into any issues. You can email us directly at [email protected].
-
Give Up Sooner
"Is there a way to get sqlc to use pointers for nullable columns instead of the sql.Null types?"
-
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
What are some alternatives?
migrate - Database migrations. CLI and Golang library.
jet - Type safe SQL builder with code generation and automatic query result data mapping
skeema - Declarative pure-SQL schema management for MySQL and MariaDB
sqlx - general purpose extensions to golang's database/sql
datahub - The Metadata Platform for your Data and AI Stack
ent - An entity framework for Go
goose - A database migration tool. Supports SQL migrations and Go functions.
SQLBoiler - Generate a Go ORM tailored to your database schema.
hcl - HCL is the HashiCorp configuration language.
GORM - The fantastic ORM library for Golang, aims to be developer friendly
chproxy - Open-Source ClickHouse http proxy and load balancer
Squirrel - Fluent SQL generation for golang