Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Tidb | 34,185 | 68 | 101 | a day ago | 1,289 | April 07, 2022 | 4,039 | apache-2.0 | Go | |
TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://tidbcloud.com/free-trial | ||||||||||
Metabase | 32,667 | 21 hours ago | 1 | June 08, 2022 | 3,049 | other | Clojure | |||
The simplest, fastest way to get business intelligence and analytics to everyone in your company :yum: | ||||||||||
Dbeaver | 32,313 | 21 hours ago | 1,750 | apache-2.0 | Java | |||||
Free universal database tool and SQL client | ||||||||||
Cockroach | 27,260 | 50 | 22 | 21 hours ago | 248 | August 06, 2021 | 6,607 | other | Go | |
CockroachDB - the open source, cloud-native distributed SQL database. | ||||||||||
Sqlmap | 27,229 | 3 days ago | 1 | February 27, 2018 | 58 | other | Python | |||
Automatic SQL injection and database takeover tool | ||||||||||
Directus | 21,822 | 50 | 21 hours ago | 55 | September 22, 2022 | 221 | other | TypeScript | ||
The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database. | ||||||||||
Tdengine | 21,421 | 1 | a day ago | 12 | April 14, 2022 | 1,032 | agpl-3.0 | C | ||
TDengine is an open source, high-performance, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, Industrial IoT and DevOps. | ||||||||||
Surrealdb | 20,733 | a day ago | 35 | December 14, 2021 | 228 | other | Rust | |||
A scalable, distributed, collaborative, document-graph database, for the realtime web | ||||||||||
Postgrest | 20,635 | 4 | 2 days ago | 37 | July 12, 2022 | 207 | mit | Haskell | ||
REST API for any Postgres database | ||||||||||
Shardingsphere | 18,469 | 8 | 21 hours ago | 7 | June 04, 2020 | 742 | apache-2.0 | Java | ||
Ecosystem to transform any database into a distributed database system, and enhance it with sharding, elastic scaling, encryption features & more |
To use: go get
github.com/dal-go/dalgo
Using this module allows you:
To abstract work with data storage so underlying API can be swapped.
Write less code. Write more readable code.
Easily add logging & hooks for all DB operations.
Write unit tests for your business logic without dependency on specific API.
The github.com/dal-go/dalgo
package provides a consistent and flexible API for working with different types of
databases in Go. By providing a single interface for different types of databases, dalgo allows developers to write code
that is agnostic to the underlying data store. This can help reduce development time and improve code maintainability,
while also providing the flexibility to choose the data store that best suits their needs. The package includes an
easy-to-use API for querying, inserting, updating, and deleting records, as well as features for handling errors and
logging. It also supports transactions.
Currently, the dalgo package supports a variety of different databases, including relational databases such as MS SQL Server, MySQL and PostgreSQL, as well as key-value stores like Redis and Memcached. It can also be used with cloud-based data stores like Google Firestore and Datastore.
It comes with a set of end-to-end tests that are run against different DB clients. By running these tests against multiple database clients, dalgo can ensure that it is compatible with a wide range of database systems and that it can handle scenarios such as concurrent access, complex queries, and schema changes.
Dalgo will include a code generation tool that can generate Go code for interacting with the database based on the database schema. This feature can be especially useful when working with large databases with complex schemas.
Overall, the dalgo package provides a consistent, flexible & agnostic API for working with different types of databases in Go. By allowing developers to write database-agnostic code, it provides a powerful tool for reducing development time and improving code maintainability, while also offering the flexibility to choose the data store that best suits their needs.
dal
- Database Abstraction Layerorm
- Objectrelational mappingrecord
- helpers to simplify working with dalgo records in strongly typed way.DALgo defines abstract interfaces and helpers methods to work with databases in abstract manner.
Here is modules that bridge DALgo to specific APIs:
for database/sql - a generic interface around SQL (or SQL-like) databases.
for Firestore - a NoSQL document database that lets you easily store, sync, and query data for your mobile and web apps - at global scale.
for Google Cloud Datastore - Highly scalable NoSQL database - is a predecessor for Firestore.
for BuntDB - an embeddable, in-memory key/value database for Go with custom indexing and geospatial support.
for BadgerDB - an embeddable, persistent and fast key-value (KV) database written in pure Go.
The CI process for this package and for officially supported bridges runs unit tests and end-to-end integration tests.
Package: github.com/dal-go/dalgo/dal
The main abstraction is though dalgo.Record
interface :
package dal
type Record interface {
Key() *Key // defines `table` name of the entity
Data() any // value to be stored/retrieved (without ID)
Error() error // holds error for the record
SetError(err error) // sets error relevant to specific record
Exists() bool // indicates if the record exists in DB
}
All methods are working with the Record
and use context.Context
.
The Database
interface defines an interface to a storage that should be implemented by a specific
driver. Contributions for client bridges are very welcome!
If the db driver does not support some operations it must return dalgo.ErrNotSupported
.
package dal
type Database interface {
TransactionCoordinator
ReadonlySession
}
// TransactionCoordinator provides methods to work with transactions
type TransactionCoordinator interface {
// RunReadonlyTransaction starts readonly transaction
RunReadonlyTransaction(ctx context.Context, f ROTxWorker, options ...TransactionOption) error
// RunReadwriteTransaction starts read-write transaction
RunReadwriteTransaction(ctx context.Context, f RWTxWorker, options ...TransactionOption) error
}
// ReadonlySession defines methods that do not modify database
type ReadonlySession interface {
// Get gets a single record from database by key
Get(ctx context.Context, record Record) error
// GetMulti gets multiples records from database by keys
GetMulti(ctx context.Context, records []Record) error
// Select executes a data retrieval query
Select(ctx context.Context, query Select) (Reader, error)
}
// ReadwriteSession defines methods that can modify database
type ReadwriteSession interface {
ReadonlySession
writeOnlySession
}
type writeOnlySession interface {
// Insert inserts a single record in database
Insert(c context.Context, record Record, opts ...InsertOption) error
// Set sets a single record in database by key
Set(ctx context.Context, record Record) error
// SetMulti sets multiples records in database by keys
SetMulti(ctx context.Context, records []Record) error
// Update updates a single record in database by key
Update(ctx context.Context, key *Key, updates []Update, preconditions ...Precondition) error
// UpdateMulti updates multiples records in database by keys
UpdateMulti(c context.Context, keys []*Key, updates []Update, preconditions ...Precondition) error
// Delete deletes a single record from database by key
Delete(ctx context.Context, key *Key) error
// DeleteMulti deletes multiple records from database by keys
DeleteMulti(ctx context.Context, keys []*Key) error
}
Note that getters are populating records in place using target instance obtained via Record.GetData()
.
Originally developed to support work with Google AppEngine Datastore and Firebase Firestore it takes into account its
specifics. This works well with other key-value storages as well. Also dalgo
supports SQL databases.
strongo/bots-framework
- framework to build chatbots
in Go language.More dependants can be found using SourceGraph search.
Contributions are welcome but should follow the contribution guidelines.