Database - Example project of database realization using drivers and models

Overview

database

Golang based database realization

Description

Example project of database realization using drivers and models

Requirements

  • Go 1.17+;

Test

  • $go test

Examples:

Connect/Disconnect

config := database.LoadConfig("database.cfg")

driver, err := database.NewDriver(database.FILE_DRIVER)
if err != nil {
  log.Fatal(err)
}

err = driver.Configure(config)
if err != nil {
  log.Fatal(err)
}

connection, err := driver.Connect()
if err != nil {
  log.Fatal(err)
}

// Read    . . .
// Iterate . . .
// Write   . . .

defer connection.Disconnect()

Read/Write

// var driver database.IDriver (FileDriver)
// var query database.IQuery (FileQuery)
defer driver.Disconnect()

row := driver.ReadRow("users", query)

row.SetCol("name", "John")

driver.WriteRow(row)

Building a Query

// var driver database.IDriver (FileDriver)
// var query database::IQuery
query := driver.NewQuery()

query.Select("users", "*")
query.From("users")
query.Where("users", "id", "=", "1")
// var row database.Row
row := query.GetRow()

fmt.Println("user name is ", row.GetCol("name"))
Owner
Denis
Obsessed with fast & stable code, Skills: OpenGL, Android, QT, C++, Java, PHP 7+, JS (jQuery), Go 1.6+
Denis
CRUD API example is written in Go using net/http package and MySQL database.

GoCrudBook CRUD API example is written in Go using net/http package and MySQL database. Requirements Go MySQL Code Editor Project Structure GoCrudBook

Serhat Karabulut 3 May 15, 2022
A Go rest API project that is following solid and common principles and is connected to local MySQL database.

This is an intermediate-level go project that running with a project structure optimized RESTful API service in Go. API's of that project is designed based on solid and common principles and connected to the local MySQL database.

Kıvanç Aydoğmuş 21 Jun 6, 2022
Golang restAPI crud project with mySql database.

Golang RestAPI using gorilla/mux Golang restAPI crud project with mySql database. Test Api with Thunder Client vs code beautiful Extension. and use Be

Md Abu. Raihan 6 Mar 26, 2022
[mirror] the database client and tools for the Go vulnerability database

The Go Vulnerability Database golang.org/x/vulndb This repository is a prototype of the Go Vulnerability Database. Read the Draft Design. Neither the

Go 43 May 28, 2022
Schemable - Schemable provides basic struct mapping against a database, using the squirrel package

Schemable Schemable provides basic struct mapping against a database, using the

null 6 Mar 7, 2022
A go package to add support for data at rest encryption if you are using the database/sql.

go-lockset A go package to add support for data at rest encryption if you are using the database/sql to access your database. Installation In your Gol

Bartlomiej Mika 0 Jan 30, 2022
This is the code example how to use SQL to query data from any relational databases in Go programming language.

Go with SQL example This is the code example how to use SQL to query data from any relational databases in Go programming language. To start, please m

Muhammad Uzair Mohd Faizul 1 Mar 12, 2022
A demo project that automatically restarts with a trio of docker, redis and go and transmits page visits.

A demo project that automatically restarts with a trio of docker, redis and go and transmits page visits.

Sami Salih İbrahimbaş 0 Feb 6, 2022
An observability database aims to ingest, analyze and store Metrics, Tracing and Logging data.

BanyanDB BanyanDB, as an observability database, aims to ingest, analyze and store Metrics, Tracing and Logging data. It's designed to handle observab

The Apache Software Foundation 105 Jun 28, 2022
Database Access Layer for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API

REL Modern Database Access Layer for Golang. REL is golang orm-ish database layer for layered architecture. It's testable and comes with its own test

REL 533 Jun 21, 2022
Golang Redis Postgres to-do Project

Golang Backend Project Problem Statement Build a to-do application with Golang a

null 4 Jun 11, 2022
🏋️ dbbench is a simple database benchmarking tool which supports several databases and own scripts

dbbench Table of Contents Description Example Installation Supported Databases Usage Custom Scripts Troubeshooting Development Acknowledgements Descri

Simon Jürgensmeyer 68 May 24, 2022
Additions to Go's database/sql for super fast performance and convenience.

gocraft/dbr (database records) gocraft/dbr provides additions to Go's database/sql for super fast performance and convenience. $ go get -u github.com/

null 1.7k Jun 29, 2022
Database migrations. CLI and Golang library.

migrate Database migrations written in Go. Use as CLI or import as library. Migrate reads migrations from sources and applies them in correct order to

null 9k Jun 29, 2022
Library for scanning data from a database into Go structs and more

scany Overview Go favors simplicity, and it's pretty common to work with a database via driver directly without any ORM. It provides great control and

Georgy Savva 590 Jun 21, 2022
Interactive terminal user interface and CLI for database connections. MySQL, PostgreSQL. More to come.

?? dbui dbui is the terminal user interface and CLI for database connections. It provides features like, Connect to multiple data sources and instance

Kanan Rahimov 88 Jun 18, 2022
Scan database/sql rows directly to structs, slices, and primitive types

Scan Scan standard lib database rows directly to structs or slices. For the most comprehensive and up-to-date docs see the godoc Examples Multiple Row

Brett Jones 273 Jun 22, 2022
Go package providing simple database and server interfaces for the CSV files produced by the sfomuseum/go-libraryofcongress package

go-libraryofcongress-database Go package providing simple database and server interfaces for the CSV files produced by the sfomuseum/go-libraryofcongr

San Francisco International Airport Museum 1 Oct 29, 2021