Skip to content

DCsunset/mysql-kv-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql-kv-wrapper

Installation

go get github.com/DCsunset/mysql-kv-wrapper

Examples

package main

import (
	kvstore "github.com/DCsunset/mysql-kv-wrapper"
)

func main() {
	var store kvstore.KVStore
	err := store.Open("root:password@/")
	if err != nil {
		panic(err)
	}
	defer store.Close()

	err = store.Write("hello", "world")
	if err != nil {
		panic(err)
	}
	value, err := store.Read("hello")
	if value != "world" {
		panic("Wrong value")
	}
}

About

A wrapper for KV operation in MySQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages