github.com/movsb/taorm@v0.0.0-20201209183410-91bafb0b22a6/taorm/types.go (about)

     1  package taorm
     2  
     3  import (
     4  	"database/sql"
     5  )
     6  
     7  type _SQLCommon interface {
     8  	Exec(query string, args ...interface{}) (sql.Result, error)
     9  	Query(query string, args ...interface{}) (*sql.Rows, error)
    10  }
    11  
    12  // M is a string-interface map that is used for Update*.
    13  type M map[string]interface{}
    14  
    15  // Finder wraps method for SELECT.
    16  type Finder interface {
    17  	Find(out interface{}) error
    18  	MustFind(out interface{})
    19  	FindSQL() string
    20  	Count(out interface{}) error
    21  	MustCount(out interface{})
    22  	CountSQL() string
    23  }
    24  
    25  // TableNamer ...
    26  type TableNamer interface {
    27  	TableName() string
    28  }