rundaz / sqliteserver

A library to allow multiple applications to share a single SQLite database using MySQL client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sqliteserver

Implement MySQL server protocol to expose sqlite database to all MySQL clients.

Users can use any MySQL client to connect to server and consume the database service just like working with MySQL server.

Usage

Initialize server

svr, err := sqliteserver.NewServer(sqliteserver.ServerConfig{
    Network:  "tcp",
    Address:  fmt.Sprintf("localhost:%d", viper.GetInt("server.port")),
    UserName: viper.GetString("database.user"),
    Password: viper.GetString("database.password"),
})

Start server

svr.Start()

Close server

svr.Close()

About

A library to allow multiple applications to share a single SQLite database using MySQL client

License:MIT License


Languages

Language:Go 100.0%