All Projects → uptrace → bun

uptrace / bun

Licence: BSD-2-Clause license
SQL-first Golang ORM

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to bun

Vscode Sqltools
Database management for VSCode
Stars: ✭ 741 (-52.8%)
Mutual labels:  mssql, sqlite3
json-sql-builder2
Level Up Your SQL-Queries
Stars: ✭ 59 (-96.24%)
Mutual labels:  mssql, sqlite3
Sqlboiler
Generate a Go ORM tailored to your database schema.
Stars: ✭ 4,497 (+186.43%)
Mutual labels:  mssql, sqlite3
Sworm
a write-only ORM for Node.js
Stars: ✭ 128 (-91.85%)
Mutual labels:  mssql, sqlite3
QuickDAO
Simple Data Access Object library with LinQ and multiengine support for (Windows,Linux,OSX/IOS/Android) and freepascal (Windows/Linux)
Stars: ✭ 49 (-96.88%)
Mutual labels:  mssql, sqlite3
Rom Sql
SQL support for rom-rb
Stars: ✭ 169 (-89.24%)
Mutual labels:  mssql, sqlite3
Sqler
write APIs using direct SQL queries with no hassle, let's rethink about SQL
Stars: ✭ 1,943 (+23.76%)
Mutual labels:  mssql, sqlite3
laravel-database-manager
Make your database simple, easier and faster with vuejs.
Stars: ✭ 50 (-96.82%)
Mutual labels:  mssql, sqlite3
Generation
⭐ A Private, Secure, End-to-End Encrypted Messaging app made in Flutter(With Firebase and SQLite) that helps you to connect with your connections without any Ads, promotion. No other third-party person, organization, or even Generation Team can't read your messages. 💝
Stars: ✭ 18 (-98.85%)
Mutual labels:  sqlite3
sql exporter
Database agnostic SQL exporter for Prometheus
Stars: ✭ 72 (-95.41%)
Mutual labels:  mssql
WendzelNNTPd
A usable and IPv6-ready Usenet-server (NNTP daemon). It is portable (Linux/*BSD/*nix), supports AUTHINFO authentication, contains ACL as well as role based ACL and provides "invisible" newsgroups. It can run on MySQL and SQLite backends.
Stars: ✭ 43 (-97.26%)
Mutual labels:  sqlite3
fapro
Fake Protocol Server
Stars: ✭ 1,338 (-14.78%)
Mutual labels:  mssql
eReports-open-source
Sistema de envio e agendamento de relatórios
Stars: ✭ 30 (-98.09%)
Mutual labels:  mssql
Bank-Account-Simulation
A Bank Account Simulation with JavaFX and SQLite back-end. Material UX|UI.
Stars: ✭ 19 (-98.79%)
Mutual labels:  sqlite3
Athena
Test your Security Skills, and Clean Code Development as a Pythonist, Hacker & Warrior 🥷🏻
Stars: ✭ 43 (-97.26%)
Mutual labels:  sqlite3
linkifier
Database reverse engineering
Stars: ✭ 32 (-97.96%)
Mutual labels:  mssql
AnkiSharp
Create anki decks and cards from your C# application
Stars: ✭ 39 (-97.52%)
Mutual labels:  sqlite3
food-sqlite-demo
This tutorial we will save text from EditText and Image from gallery into SQLite database
Stars: ✭ 58 (-96.31%)
Mutual labels:  sqlite3
v2ex-collections-search
v2ex收藏搜索
Stars: ✭ 21 (-98.66%)
Mutual labels:  sqlite3
squirrel
Like curl, or wget, but downloads directly go to a SQLite databse
Stars: ✭ 24 (-98.47%)
Mutual labels:  sqlite3

SQL-first Golang ORM for PostgreSQL, MySQL, MSSQL, and SQLite

build workflow PkgGoDev Documentation Chat

Bun is brought to you by uptrace/uptrace. Uptrace is an open-source APM tool that supports distributed tracing, metrics, and logs. You can use it to monitor applications and set up automatic alerts to receive notifications via email, Slack, Telegram, and others. See OpenTelemetry example for details.

Features

Resources:

Featured projects using Bun:

Why another database client?

So you can elegantly write complex queries:

regionalSales := db.NewSelect().
	ColumnExpr("region").
	ColumnExpr("SUM(amount) AS total_sales").
	TableExpr("orders").
	GroupExpr("region")

topRegions := db.NewSelect().
	ColumnExpr("region").
	TableExpr("regional_sales").
	Where("total_sales > (SELECT SUM(total_sales) / 10 FROM regional_sales)")

var items []map[string]interface{}
err := db.NewSelect().
	With("regional_sales", regionalSales).
	With("top_regions", topRegions).
	ColumnExpr("region").
	ColumnExpr("product").
	ColumnExpr("SUM(quantity) AS product_units").
	ColumnExpr("SUM(amount) AS product_sales").
	TableExpr("orders").
	Where("region IN (SELECT region FROM top_regions)").
	GroupExpr("region").
	GroupExpr("product").
	Scan(ctx, &items)
WITH regional_sales AS (
    SELECT region, SUM(amount) AS total_sales
    FROM orders
    GROUP BY region
), top_regions AS (
    SELECT region
    FROM regional_sales
    WHERE total_sales > (SELECT SUM(total_sales)/10 FROM regional_sales)
)
SELECT region,
       product,
       SUM(quantity) AS product_units,
       SUM(amount) AS product_sales
FROM orders
WHERE region IN (SELECT region FROM top_regions)
GROUP BY region, product

And scan results into scalars, structs, maps, slices of structs/maps/scalars:

users := make([]User, 0)
if err := db.NewSelect().Model(&users).OrderExpr("id ASC").Scan(ctx); err != nil {
	panic(err)
}

user1 := new(User)
if err := db.NewSelect().Model(user1).Where("id = ?", 1).Scan(ctx); err != nil {
	panic(err)
}

See Getting started guide and check examples.

See also

Contributors

Thanks to all the people who already contributed!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].