Skip to content

LindenY/gomdise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gomdise

gomdise is a simple orm alike library aiming to provide complex data structure store/fetch services for redis

Usage

Initialize

Create a gomdise instance by calling

gomdise.New(pool redis.Pool)

Save data

To save data, invoke the method of gomdise instance (example)

gomdise.Save(arg interface{})
  1. Any exported fields of a struct will be saved by gomdise.
  2. To use the customized redis key for the data argument, implement mdl.Model interface
  3. Save can not work with interface type as well

Find data

To find data, invoke the method of gomdise instance (example)

gomdise.Find(key string, arg interface{})
  1. The arg parameter should be an pointer value, more actually, an addressable and settable parameter
  2. The interface{} type is currently not supported for find operation

Sample usage

For the example of how to use gomdise, see the test file for more details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published