A Simple and Powerful Golang SQL Library
 
 
 
Go to file
Vinícius Garcia 995ccd680c Fix Delete() to work with postgres 2020-12-30 12:33:56 -03:00
nullable fixup! Improve tests for the Update() function 2020-10-26 00:16:19 -03:00
slices Fix lint problems 2020-09-14 15:55:54 -03:00
.gitignore Add Makefile 2020-09-11 18:48:48 -03:00
Makefile Add Makefile 2020-09-11 18:48:48 -03:00
README.md Add README.md 2020-11-10 11:16:39 -03:00
contracts.go Improve comments for the QueryChunks func 2020-10-28 21:30:10 -03:00
dialect.go Fix Insert function to work with postgres 2020-12-29 23:36:10 -03:00
go.mod Fix Insert function to work with postgres 2020-12-29 23:36:10 -03:00
go.sum finish implementing query & queryNext funcs 2020-09-24 19:26:59 -03:00
kiss_orm.go Fix Delete() to work with postgres 2020-12-30 12:33:56 -03:00
kiss_orm_test.go Fix Delete() to work with postgres 2020-12-30 12:33:56 -03:00

README.md

KissORM

Welcome to the KissORM project, o the Keep It Simple Stupid micro ORM.

This ORM was created to be used by any developer efficiently and safely. The goals were:

  • We'll not let you shoot your own foot
  • Testing should be simple and clear for readers
  • The learning curve should be minimal, so we are aiming on a very slim interface

Note: Currently we use GORM internally because we needed a working version asap in order to use it on our next project, however, this is temporary and we are already removing this dependency.

Kiss Interface

The current interface is as follows:

// ORMProvider describes the public behavior of this ORM
type ORMProvider interface {
	Insert(ctx context.Context, records ...interface{}) error
	Delete(ctx context.Context, ids ...interface{}) error
	Update(ctx context.Context, records ...interface{}) error

	Query(ctx context.Context, records interface{}, query string, params ...interface{}) error
	QueryOne(ctx context.Context, record interface{}, query string, params ...interface{}) error
	QueryChunks(ctx context.Context, parser ChunkParser) error
}

You might notice that we are currently lacking an Exec() function and a abstraction for transactions, but it is on our TODO list.