Categorygithub.com/gjbae1212/go-sql
modulepackage
0.1.3
Repository: https://github.com/gjbae1212/go-sql.git
Documentation: pkg.go.dev

# README

go-sql

Go Report Card license

This project is a db connector for SQL databases. And so support to trace context like opentracing.

In this time, mysql is to support only. Continuously expect to support databases like Sqlite, BigQuery, and so on.

Getting Started

Mysql

package main

import (
	gomysql "github.com/gjbae1212/go-sql/mysql"
)

func main() {
    // conn, err := gomysql.NewConnectorWithOpentracing("user:password@/dbname", 2)
	conn, err := gomysql.NewConnector("user:password@/dbname", 2)
	if err != nil {
		panic(err)
	}

	if err := conn.Connect(); err != nil {
		panic(err)
	}

	// db is *gorm.DB(https://github.com/jinzhu/gorm)
	db, err := conn.DB()
	if err != nil {
		panic(err)
	}	
}

To be Supported

  • Sqlite
  • Postgres
  • BigQuery
  • And so on ...

License

This project is licensed under the MIT License

# Packages

No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Connector is common interface for SQL like database.