Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConcurrent = errors.New("concurrent update")
Functions ¶
func ObjectNames ¶
func ObjectNames(objectInfos []ObjectInfo) []string
Types ¶
type ExportMeta ¶
type ExportMeta struct {
Kind string `json:"kind"`
}
type MigrateFunc ¶
type ObjectField ¶
type ObjectInfo ¶
type ObjectInfo struct { Name string Table string Fields []ObjectField // TODO(sgotti) instead of a pure ddl, use data to generate it Constraints []string // TODO(sgotti) instead of a pure ddl, use data to generate it Indexes []string }
func PopulateObjectsInfo ¶
func PopulateObjectsInfo(inObjectsInfo []ObjectInfo, dbType sql.Type) []ObjectInfo
func (ObjectInfo) PopulatePostgres ¶
func (oi ObjectInfo) PopulatePostgres() ObjectInfo
func (ObjectInfo) PopulateSqlite3 ¶
func (oi ObjectInfo) PopulateSqlite3() ObjectInfo
type ObjectMeta ¶
type ObjectMeta struct { // ID is the unique ID of the object. ID string `json:"id"` // CreationTime represents the time when this object has been created. CreationTime time.Time `json:"creationTime"` // UpdateTime represents the time when this object has been created/updated. UpdateTime time.Time `json:"updateTime"` // Revision is the object revision, it's not saved in the object but // populated by the fetch from the database Revision uint64 `json:"-"` // TxID is the current transaction id, used internally and must not be saved in the object TxID string `json:"-"` }
func NewObjectMeta ¶
func NewObjectMeta(tx *sql.Tx) ObjectMeta
func (*ObjectMeta) GetID ¶
func (m *ObjectMeta) GetID() string
type PreJSONSetupper ¶
type PreJSONSetupper interface {
PreJSON() error
}
Click to show internal directories.
Click to hide internal directories.