Skip to content

simply, it just key-value Sqlite based store package, so simply and easy-to-use

Notifications You must be signed in to change notification settings

MrTrakos/GoKvSqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoKvSqlite

  • simply, it just key-value Sqlite based store package, so simply and easy-to-use

  • Example:

package main

import (
	"log"

	store "github.com/tm-sah/GoKvSqlite"
)

func main() {

	db, err := store.Client("db.sql")
	if err != nil {
		log.Fatal(err)
	}
	db.Set(
		"name",
		"Mahdi",
	)
	db.Set(
		"age:1",
		16,
	)

	keys, err := db.Keys("*") // or just "" it will work, also.
	if err != nil {
		log.Fatal(err)
	}
	for index, key := range keys {
		println(index, key)
	}
}

Available methods:

Keys, Get, Set, Exists, Delete

  • for simple porpuses.
  • it accept all type of storing, int, int64, string, map, slices, etc.