Documentation ¶
Index ¶
- Variables
- type EventsFixture
- type EventsFixtureQuery
- func (q *EventsFixtureQuery) BatchSize(size uint64) *EventsFixtureQuery
- func (q *EventsFixtureQuery) Copy() *EventsFixtureQuery
- func (q *EventsFixtureQuery) Limit(n uint64) *EventsFixtureQuery
- func (q *EventsFixtureQuery) Offset(n uint64) *EventsFixtureQuery
- func (q *EventsFixtureQuery) Order(cols ...kallax.ColumnOrder) *EventsFixtureQuery
- func (q *EventsFixtureQuery) Select(columns ...kallax.SchemaField) *EventsFixtureQuery
- func (q *EventsFixtureQuery) SelectNot(columns ...kallax.SchemaField) *EventsFixtureQuery
- func (q *EventsFixtureQuery) Where(cond kallax.Condition) *EventsFixtureQuery
- type EventsFixtureResultSet
- func (rs *EventsFixtureResultSet) All() ([]*EventsFixture, error)
- func (rs *EventsFixtureResultSet) ForEach(fn func(*EventsFixture) error) error
- func (rs *EventsFixtureResultSet) Get() (*EventsFixture, error)
- func (rs *EventsFixtureResultSet) Next() bool
- func (rs *EventsFixtureResultSet) One() (*EventsFixture, error)
- type EventsFixtureStore
- func (s *EventsFixtureStore) AfterInsert(doc *EventsFixture) error
- func (s *EventsFixtureStore) AfterUpdate(doc *EventsFixture) error
- func (s *EventsFixtureStore) BeforeInsert(doc *EventsFixture) error
- func (s *EventsFixtureStore) BeforeUpdate(doc *EventsFixture) error
- func (s *EventsFixtureStore) Count(q *EventsFixtureQuery) (int64, error)
- func (s *EventsFixtureStore) Delete(record *EventsFixture) error
- func (s *EventsFixtureStore) Find(q *EventsFixtureQuery) (*EventsFixtureResultSet, error)
- func (s *EventsFixtureStore) FindOne(q *EventsFixtureQuery) (*EventsFixture, error)
- func (s *EventsFixtureStore) Insert(record *EventsFixture) error
- func (s *EventsFixtureStore) MustCount(q *EventsFixtureQuery) int64
- func (s *EventsFixtureStore) MustFind(q *EventsFixtureQuery) *EventsFixtureResultSet
- func (s *EventsFixtureStore) MustFindOne(q *EventsFixtureQuery) *EventsFixture
- func (s *EventsFixtureStore) Reload(record *EventsFixture) error
- func (s *EventsFixtureStore) Save(record *EventsFixture) (updated bool, err error)
- func (s *EventsFixtureStore) Transaction(callback func(*EventsFixtureStore) error) error
- func (s *EventsFixtureStore) Update(record *EventsFixture, cols ...kallax.SchemaField) (int64, error)
- type EventsSaveFixture
- func (r *EventsSaveFixture) ColumnAddress(col string) (interface{}, error)
- func (r *EventsSaveFixture) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *EventsSaveFixture) SetRelationship(field string, record kallax.Record) error
- func (r *EventsSaveFixture) Value(col string) (interface{}, error)
- type EventsSaveFixtureQuery
- func (q *EventsSaveFixtureQuery) BatchSize(size uint64) *EventsSaveFixtureQuery
- func (q *EventsSaveFixtureQuery) Copy() *EventsSaveFixtureQuery
- func (q *EventsSaveFixtureQuery) Limit(n uint64) *EventsSaveFixtureQuery
- func (q *EventsSaveFixtureQuery) Offset(n uint64) *EventsSaveFixtureQuery
- func (q *EventsSaveFixtureQuery) Order(cols ...kallax.ColumnOrder) *EventsSaveFixtureQuery
- func (q *EventsSaveFixtureQuery) Select(columns ...kallax.SchemaField) *EventsSaveFixtureQuery
- func (q *EventsSaveFixtureQuery) SelectNot(columns ...kallax.SchemaField) *EventsSaveFixtureQuery
- func (q *EventsSaveFixtureQuery) Where(cond kallax.Condition) *EventsSaveFixtureQuery
- type EventsSaveFixtureResultSet
- func (rs *EventsSaveFixtureResultSet) All() ([]*EventsSaveFixture, error)
- func (rs *EventsSaveFixtureResultSet) ForEach(fn func(*EventsSaveFixture) error) error
- func (rs *EventsSaveFixtureResultSet) Get() (*EventsSaveFixture, error)
- func (rs *EventsSaveFixtureResultSet) Next() bool
- func (rs *EventsSaveFixtureResultSet) One() (*EventsSaveFixture, error)
- type EventsSaveFixtureStore
- func (s *EventsSaveFixtureStore) AfterSave(doc *EventsSaveFixture) error
- func (s *EventsSaveFixtureStore) BeforeSave(doc *EventsSaveFixture) error
- func (s *EventsSaveFixtureStore) Count(q *EventsSaveFixtureQuery) (int64, error)
- func (s *EventsSaveFixtureStore) Delete(record *EventsSaveFixture) error
- func (s *EventsSaveFixtureStore) Find(q *EventsSaveFixtureQuery) (*EventsSaveFixtureResultSet, error)
- func (s *EventsSaveFixtureStore) FindOne(q *EventsSaveFixtureQuery) (*EventsSaveFixture, error)
- func (s *EventsSaveFixtureStore) Insert(record *EventsSaveFixture) error
- func (s *EventsSaveFixtureStore) MustCount(q *EventsSaveFixtureQuery) int64
- func (s *EventsSaveFixtureStore) MustFind(q *EventsSaveFixtureQuery) *EventsSaveFixtureResultSet
- func (s *EventsSaveFixtureStore) MustFindOne(q *EventsSaveFixtureQuery) *EventsSaveFixture
- func (s *EventsSaveFixtureStore) Reload(record *EventsSaveFixture) error
- func (s *EventsSaveFixtureStore) Save(record *EventsSaveFixture) (updated bool, err error)
- func (s *EventsSaveFixtureStore) Transaction(callback func(*EventsSaveFixtureStore) error) error
- func (s *EventsSaveFixtureStore) Update(record *EventsSaveFixture, cols ...kallax.SchemaField) (int64, error)
- type MultiKeySortFixture
- func (r *MultiKeySortFixture) ColumnAddress(col string) (interface{}, error)
- func (r *MultiKeySortFixture) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *MultiKeySortFixture) SetRelationship(field string, record kallax.Record) error
- func (r *MultiKeySortFixture) Value(col string) (interface{}, error)
- type MultiKeySortFixtureQuery
- func (q *MultiKeySortFixtureQuery) BatchSize(size uint64) *MultiKeySortFixtureQuery
- func (q *MultiKeySortFixtureQuery) Copy() *MultiKeySortFixtureQuery
- func (q *MultiKeySortFixtureQuery) Limit(n uint64) *MultiKeySortFixtureQuery
- func (q *MultiKeySortFixtureQuery) Offset(n uint64) *MultiKeySortFixtureQuery
- func (q *MultiKeySortFixtureQuery) Order(cols ...kallax.ColumnOrder) *MultiKeySortFixtureQuery
- func (q *MultiKeySortFixtureQuery) Select(columns ...kallax.SchemaField) *MultiKeySortFixtureQuery
- func (q *MultiKeySortFixtureQuery) SelectNot(columns ...kallax.SchemaField) *MultiKeySortFixtureQuery
- func (q *MultiKeySortFixtureQuery) Where(cond kallax.Condition) *MultiKeySortFixtureQuery
- type MultiKeySortFixtureResultSet
- func (rs *MultiKeySortFixtureResultSet) All() ([]*MultiKeySortFixture, error)
- func (rs *MultiKeySortFixtureResultSet) ForEach(fn func(*MultiKeySortFixture) error) error
- func (rs *MultiKeySortFixtureResultSet) Get() (*MultiKeySortFixture, error)
- func (rs *MultiKeySortFixtureResultSet) Next() bool
- func (rs *MultiKeySortFixtureResultSet) One() (*MultiKeySortFixture, error)
- type MultiKeySortFixtureStore
- func (s *MultiKeySortFixtureStore) Count(q *MultiKeySortFixtureQuery) (int64, error)
- func (s *MultiKeySortFixtureStore) Delete(record *MultiKeySortFixture) error
- func (s *MultiKeySortFixtureStore) Find(q *MultiKeySortFixtureQuery) (*MultiKeySortFixtureResultSet, error)
- func (s *MultiKeySortFixtureStore) FindOne(q *MultiKeySortFixtureQuery) (*MultiKeySortFixture, error)
- func (s *MultiKeySortFixtureStore) Insert(record *MultiKeySortFixture) error
- func (s *MultiKeySortFixtureStore) MustCount(q *MultiKeySortFixtureQuery) int64
- func (s *MultiKeySortFixtureStore) MustFind(q *MultiKeySortFixtureQuery) *MultiKeySortFixtureResultSet
- func (s *MultiKeySortFixtureStore) MustFindOne(q *MultiKeySortFixtureQuery) *MultiKeySortFixture
- func (s *MultiKeySortFixtureStore) Reload(record *MultiKeySortFixture) error
- func (s *MultiKeySortFixtureStore) Save(record *MultiKeySortFixture) (updated bool, err error)
- func (s *MultiKeySortFixtureStore) Transaction(callback func(*MultiKeySortFixtureStore) error) error
- func (s *MultiKeySortFixtureStore) Update(record *MultiKeySortFixture, cols ...kallax.SchemaField) (int64, error)
- type QueryFixture
- type QueryFixtureQuery
- func (q *QueryFixtureQuery) BatchSize(size uint64) *QueryFixtureQuery
- func (q *QueryFixtureQuery) Copy() *QueryFixtureQuery
- func (q *QueryFixtureQuery) Limit(n uint64) *QueryFixtureQuery
- func (q *QueryFixtureQuery) Offset(n uint64) *QueryFixtureQuery
- func (q *QueryFixtureQuery) Order(cols ...kallax.ColumnOrder) *QueryFixtureQuery
- func (q *QueryFixtureQuery) Select(columns ...kallax.SchemaField) *QueryFixtureQuery
- func (q *QueryFixtureQuery) SelectNot(columns ...kallax.SchemaField) *QueryFixtureQuery
- func (q *QueryFixtureQuery) Where(cond kallax.Condition) *QueryFixtureQuery
- type QueryFixtureResultSet
- func (rs *QueryFixtureResultSet) All() ([]*QueryFixture, error)
- func (rs *QueryFixtureResultSet) ForEach(fn func(*QueryFixture) error) error
- func (rs *QueryFixtureResultSet) Get() (*QueryFixture, error)
- func (rs *QueryFixtureResultSet) Next() bool
- func (rs *QueryFixtureResultSet) One() (*QueryFixture, error)
- type QueryFixtureStore
- func (s *QueryFixtureStore) Count(q *QueryFixtureQuery) (int64, error)
- func (s *QueryFixtureStore) Delete(record *QueryFixture) error
- func (s *QueryFixtureStore) Find(q *QueryFixtureQuery) (*QueryFixtureResultSet, error)
- func (s *QueryFixtureStore) FindOne(q *QueryFixtureQuery) (*QueryFixture, error)
- func (s *QueryFixtureStore) Insert(record *QueryFixture) error
- func (s *QueryFixtureStore) MustCount(q *QueryFixtureQuery) int64
- func (s *QueryFixtureStore) MustFind(q *QueryFixtureQuery) *QueryFixtureResultSet
- func (s *QueryFixtureStore) MustFindOne(q *QueryFixtureQuery) *QueryFixture
- func (s *QueryFixtureStore) Reload(record *QueryFixture) error
- func (s *QueryFixtureStore) Save(record *QueryFixture) (updated bool, err error)
- func (s *QueryFixtureStore) Transaction(callback func(*QueryFixtureStore) error) error
- func (s *QueryFixtureStore) Update(record *QueryFixture, cols ...kallax.SchemaField) (int64, error)
- type ResultSetFixture
- func (r *ResultSetFixture) ColumnAddress(col string) (interface{}, error)
- func (r *ResultSetFixture) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *ResultSetFixture) SetRelationship(field string, record kallax.Record) error
- func (r *ResultSetFixture) Value(col string) (interface{}, error)
- type ResultSetFixtureQuery
- func (q *ResultSetFixtureQuery) BatchSize(size uint64) *ResultSetFixtureQuery
- func (q *ResultSetFixtureQuery) Copy() *ResultSetFixtureQuery
- func (q *ResultSetFixtureQuery) Limit(n uint64) *ResultSetFixtureQuery
- func (q *ResultSetFixtureQuery) Offset(n uint64) *ResultSetFixtureQuery
- func (q *ResultSetFixtureQuery) Order(cols ...kallax.ColumnOrder) *ResultSetFixtureQuery
- func (q *ResultSetFixtureQuery) Select(columns ...kallax.SchemaField) *ResultSetFixtureQuery
- func (q *ResultSetFixtureQuery) SelectNot(columns ...kallax.SchemaField) *ResultSetFixtureQuery
- func (q *ResultSetFixtureQuery) Where(cond kallax.Condition) *ResultSetFixtureQuery
- type ResultSetFixtureResultSet
- func (rs *ResultSetFixtureResultSet) All() ([]*ResultSetFixture, error)
- func (rs *ResultSetFixtureResultSet) ForEach(fn func(*ResultSetFixture) error) error
- func (rs *ResultSetFixtureResultSet) Get() (*ResultSetFixture, error)
- func (rs *ResultSetFixtureResultSet) Next() bool
- func (rs *ResultSetFixtureResultSet) One() (*ResultSetFixture, error)
- type ResultSetFixtureStore
- func (s *ResultSetFixtureStore) Count(q *ResultSetFixtureQuery) (int64, error)
- func (s *ResultSetFixtureStore) Delete(record *ResultSetFixture) error
- func (s *ResultSetFixtureStore) Find(q *ResultSetFixtureQuery) (*ResultSetFixtureResultSet, error)
- func (s *ResultSetFixtureStore) FindOne(q *ResultSetFixtureQuery) (*ResultSetFixture, error)
- func (s *ResultSetFixtureStore) Insert(record *ResultSetFixture) error
- func (s *ResultSetFixtureStore) MustCount(q *ResultSetFixtureQuery) int64
- func (s *ResultSetFixtureStore) MustFind(q *ResultSetFixtureQuery) *ResultSetFixtureResultSet
- func (s *ResultSetFixtureStore) MustFindOne(q *ResultSetFixtureQuery) *ResultSetFixture
- func (s *ResultSetFixtureStore) Reload(record *ResultSetFixture) error
- func (s *ResultSetFixtureStore) Save(record *ResultSetFixture) (updated bool, err error)
- func (s *ResultSetFixtureStore) Transaction(callback func(*ResultSetFixtureStore) error) error
- func (s *ResultSetFixtureStore) Update(record *ResultSetFixture, cols ...kallax.SchemaField) (int64, error)
- type ResultSetInitFixture
- func (r *ResultSetInitFixture) ColumnAddress(col string) (interface{}, error)
- func (r *ResultSetInitFixture) Init(doc kallax.Record) error
- func (r *ResultSetInitFixture) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *ResultSetInitFixture) SetRelationship(field string, record kallax.Record) error
- func (r *ResultSetInitFixture) Value(col string) (interface{}, error)
- type ResultSetInitFixtureQuery
- func (q *ResultSetInitFixtureQuery) BatchSize(size uint64) *ResultSetInitFixtureQuery
- func (q *ResultSetInitFixtureQuery) Copy() *ResultSetInitFixtureQuery
- func (q *ResultSetInitFixtureQuery) Limit(n uint64) *ResultSetInitFixtureQuery
- func (q *ResultSetInitFixtureQuery) Offset(n uint64) *ResultSetInitFixtureQuery
- func (q *ResultSetInitFixtureQuery) Order(cols ...kallax.ColumnOrder) *ResultSetInitFixtureQuery
- func (q *ResultSetInitFixtureQuery) Select(columns ...kallax.SchemaField) *ResultSetInitFixtureQuery
- func (q *ResultSetInitFixtureQuery) SelectNot(columns ...kallax.SchemaField) *ResultSetInitFixtureQuery
- func (q *ResultSetInitFixtureQuery) Where(cond kallax.Condition) *ResultSetInitFixtureQuery
- type ResultSetInitFixtureResultSet
- func (rs *ResultSetInitFixtureResultSet) All() ([]*ResultSetInitFixture, error)
- func (rs *ResultSetInitFixtureResultSet) ForEach(fn func(*ResultSetInitFixture) error) error
- func (rs *ResultSetInitFixtureResultSet) Get() (*ResultSetInitFixture, error)
- func (rs *ResultSetInitFixtureResultSet) Next() bool
- func (rs *ResultSetInitFixtureResultSet) One() (*ResultSetInitFixture, error)
- type ResultSetInitFixtureStore
- func (s *ResultSetInitFixtureStore) Count(q *ResultSetInitFixtureQuery) (int64, error)
- func (s *ResultSetInitFixtureStore) Delete(record *ResultSetInitFixture) error
- func (s *ResultSetInitFixtureStore) Find(q *ResultSetInitFixtureQuery) (*ResultSetInitFixtureResultSet, error)
- func (s *ResultSetInitFixtureStore) FindOne(q *ResultSetInitFixtureQuery) (*ResultSetInitFixture, error)
- func (s *ResultSetInitFixtureStore) Insert(record *ResultSetInitFixture) error
- func (s *ResultSetInitFixtureStore) MustCount(q *ResultSetInitFixtureQuery) int64
- func (s *ResultSetInitFixtureStore) MustFind(q *ResultSetInitFixtureQuery) *ResultSetInitFixtureResultSet
- func (s *ResultSetInitFixtureStore) MustFindOne(q *ResultSetInitFixtureQuery) *ResultSetInitFixture
- func (s *ResultSetInitFixtureStore) Reload(record *ResultSetInitFixture) error
- func (s *ResultSetInitFixtureStore) Save(record *ResultSetInitFixture) (updated bool, err error)
- func (s *ResultSetInitFixtureStore) Transaction(callback func(*ResultSetInitFixtureStore) error) error
- func (s *ResultSetInitFixtureStore) Update(record *ResultSetInitFixture, cols ...kallax.SchemaField) (int64, error)
- type SchemaFixture
- type SchemaFixtureQuery
- func (q *SchemaFixtureQuery) BatchSize(size uint64) *SchemaFixtureQuery
- func (q *SchemaFixtureQuery) Copy() *SchemaFixtureQuery
- func (q *SchemaFixtureQuery) Limit(n uint64) *SchemaFixtureQuery
- func (q *SchemaFixtureQuery) Offset(n uint64) *SchemaFixtureQuery
- func (q *SchemaFixtureQuery) Order(cols ...kallax.ColumnOrder) *SchemaFixtureQuery
- func (q *SchemaFixtureQuery) Select(columns ...kallax.SchemaField) *SchemaFixtureQuery
- func (q *SchemaFixtureQuery) SelectNot(columns ...kallax.SchemaField) *SchemaFixtureQuery
- func (q *SchemaFixtureQuery) Where(cond kallax.Condition) *SchemaFixtureQuery
- func (q *SchemaFixtureQuery) WithNested() *SchemaFixtureQuery
- type SchemaFixtureResultSet
- func (rs *SchemaFixtureResultSet) All() ([]*SchemaFixture, error)
- func (rs *SchemaFixtureResultSet) ForEach(fn func(*SchemaFixture) error) error
- func (rs *SchemaFixtureResultSet) Get() (*SchemaFixture, error)
- func (rs *SchemaFixtureResultSet) Next() bool
- func (rs *SchemaFixtureResultSet) One() (*SchemaFixture, error)
- type SchemaFixtureStore
- func (s *SchemaFixtureStore) Count(q *SchemaFixtureQuery) (int64, error)
- func (s *SchemaFixtureStore) Delete(record *SchemaFixture) error
- func (s *SchemaFixtureStore) Find(q *SchemaFixtureQuery) (*SchemaFixtureResultSet, error)
- func (s *SchemaFixtureStore) FindOne(q *SchemaFixtureQuery) (*SchemaFixture, error)
- func (s *SchemaFixtureStore) Insert(record *SchemaFixture) error
- func (s *SchemaFixtureStore) MustCount(q *SchemaFixtureQuery) int64
- func (s *SchemaFixtureStore) MustFind(q *SchemaFixtureQuery) *SchemaFixtureResultSet
- func (s *SchemaFixtureStore) MustFindOne(q *SchemaFixtureQuery) *SchemaFixture
- func (s *SchemaFixtureStore) Reload(record *SchemaFixture) error
- func (s *SchemaFixtureStore) Save(record *SchemaFixture) (updated bool, err error)
- func (s *SchemaFixtureStore) Transaction(callback func(*SchemaFixtureStore) error) error
- func (s *SchemaFixtureStore) Update(record *SchemaFixture, cols ...kallax.SchemaField) (int64, error)
- type StoreFixture
- type StoreFixtureQuery
- func (q *StoreFixtureQuery) BatchSize(size uint64) *StoreFixtureQuery
- func (q *StoreFixtureQuery) Copy() *StoreFixtureQuery
- func (q *StoreFixtureQuery) Limit(n uint64) *StoreFixtureQuery
- func (q *StoreFixtureQuery) Offset(n uint64) *StoreFixtureQuery
- func (q *StoreFixtureQuery) Order(cols ...kallax.ColumnOrder) *StoreFixtureQuery
- func (q *StoreFixtureQuery) Select(columns ...kallax.SchemaField) *StoreFixtureQuery
- func (q *StoreFixtureQuery) SelectNot(columns ...kallax.SchemaField) *StoreFixtureQuery
- func (q *StoreFixtureQuery) Where(cond kallax.Condition) *StoreFixtureQuery
- type StoreFixtureResultSet
- func (rs *StoreFixtureResultSet) All() ([]*StoreFixture, error)
- func (rs *StoreFixtureResultSet) ForEach(fn func(*StoreFixture) error) error
- func (rs *StoreFixtureResultSet) Get() (*StoreFixture, error)
- func (rs *StoreFixtureResultSet) Next() bool
- func (rs *StoreFixtureResultSet) One() (*StoreFixture, error)
- type StoreFixtureStore
- func (s *StoreFixtureStore) Count(q *StoreFixtureQuery) (int64, error)
- func (s *StoreFixtureStore) Delete(record *StoreFixture) error
- func (s *StoreFixtureStore) Find(q *StoreFixtureQuery) (*StoreFixtureResultSet, error)
- func (s *StoreFixtureStore) FindOne(q *StoreFixtureQuery) (*StoreFixture, error)
- func (s *StoreFixtureStore) Insert(record *StoreFixture) error
- func (s *StoreFixtureStore) MustCount(q *StoreFixtureQuery) int64
- func (s *StoreFixtureStore) MustFind(q *StoreFixtureQuery) *StoreFixtureResultSet
- func (s *StoreFixtureStore) MustFindOne(q *StoreFixtureQuery) *StoreFixture
- func (s *StoreFixtureStore) Reload(record *StoreFixture) error
- func (s *StoreFixtureStore) Save(record *StoreFixture) (updated bool, err error)
- func (s *StoreFixtureStore) Transaction(callback func(*StoreFixtureStore) error) error
- func (s *StoreFixtureStore) Update(record *StoreFixture, cols ...kallax.SchemaField) (int64, error)
- type StoreWithConstructFixture
- func (r *StoreWithConstructFixture) ColumnAddress(col string) (interface{}, error)
- func (r *StoreWithConstructFixture) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *StoreWithConstructFixture) SetRelationship(field string, record kallax.Record) error
- func (r *StoreWithConstructFixture) Value(col string) (interface{}, error)
- type StoreWithConstructFixtureQuery
- func (q *StoreWithConstructFixtureQuery) BatchSize(size uint64) *StoreWithConstructFixtureQuery
- func (q *StoreWithConstructFixtureQuery) Copy() *StoreWithConstructFixtureQuery
- func (q *StoreWithConstructFixtureQuery) Limit(n uint64) *StoreWithConstructFixtureQuery
- func (q *StoreWithConstructFixtureQuery) Offset(n uint64) *StoreWithConstructFixtureQuery
- func (q *StoreWithConstructFixtureQuery) Order(cols ...kallax.ColumnOrder) *StoreWithConstructFixtureQuery
- func (q *StoreWithConstructFixtureQuery) Select(columns ...kallax.SchemaField) *StoreWithConstructFixtureQuery
- func (q *StoreWithConstructFixtureQuery) SelectNot(columns ...kallax.SchemaField) *StoreWithConstructFixtureQuery
- func (q *StoreWithConstructFixtureQuery) Where(cond kallax.Condition) *StoreWithConstructFixtureQuery
- type StoreWithConstructFixtureResultSet
- func (rs *StoreWithConstructFixtureResultSet) All() ([]*StoreWithConstructFixture, error)
- func (rs *StoreWithConstructFixtureResultSet) ForEach(fn func(*StoreWithConstructFixture) error) error
- func (rs *StoreWithConstructFixtureResultSet) Get() (*StoreWithConstructFixture, error)
- func (rs *StoreWithConstructFixtureResultSet) Next() bool
- func (rs *StoreWithConstructFixtureResultSet) One() (*StoreWithConstructFixture, error)
- type StoreWithConstructFixtureStore
- func (s *StoreWithConstructFixtureStore) Count(q *StoreWithConstructFixtureQuery) (int64, error)
- func (s *StoreWithConstructFixtureStore) Delete(record *StoreWithConstructFixture) error
- func (s *StoreWithConstructFixtureStore) Find(q *StoreWithConstructFixtureQuery) (*StoreWithConstructFixtureResultSet, error)
- func (s *StoreWithConstructFixtureStore) FindOne(q *StoreWithConstructFixtureQuery) (*StoreWithConstructFixture, error)
- func (s *StoreWithConstructFixtureStore) Insert(record *StoreWithConstructFixture) error
- func (s *StoreWithConstructFixtureStore) MustCount(q *StoreWithConstructFixtureQuery) int64
- func (s *StoreWithConstructFixtureStore) MustFind(q *StoreWithConstructFixtureQuery) *StoreWithConstructFixtureResultSet
- func (s *StoreWithConstructFixtureStore) MustFindOne(q *StoreWithConstructFixtureQuery) *StoreWithConstructFixture
- func (s *StoreWithConstructFixtureStore) Reload(record *StoreWithConstructFixture) error
- func (s *StoreWithConstructFixtureStore) Save(record *StoreWithConstructFixture) (updated bool, err error)
- func (s *StoreWithConstructFixtureStore) Transaction(callback func(*StoreWithConstructFixtureStore) error) error
- func (s *StoreWithConstructFixtureStore) Update(record *StoreWithConstructFixture, cols ...kallax.SchemaField) (int64, error)
- type StoreWithNewFixture
- func (r *StoreWithNewFixture) ColumnAddress(col string) (interface{}, error)
- func (r *StoreWithNewFixture) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *StoreWithNewFixture) SetRelationship(field string, record kallax.Record) error
- func (r *StoreWithNewFixture) Value(col string) (interface{}, error)
- type StoreWithNewFixtureQuery
- func (q *StoreWithNewFixtureQuery) BatchSize(size uint64) *StoreWithNewFixtureQuery
- func (q *StoreWithNewFixtureQuery) Copy() *StoreWithNewFixtureQuery
- func (q *StoreWithNewFixtureQuery) Limit(n uint64) *StoreWithNewFixtureQuery
- func (q *StoreWithNewFixtureQuery) Offset(n uint64) *StoreWithNewFixtureQuery
- func (q *StoreWithNewFixtureQuery) Order(cols ...kallax.ColumnOrder) *StoreWithNewFixtureQuery
- func (q *StoreWithNewFixtureQuery) Select(columns ...kallax.SchemaField) *StoreWithNewFixtureQuery
- func (q *StoreWithNewFixtureQuery) SelectNot(columns ...kallax.SchemaField) *StoreWithNewFixtureQuery
- func (q *StoreWithNewFixtureQuery) Where(cond kallax.Condition) *StoreWithNewFixtureQuery
- type StoreWithNewFixtureResultSet
- func (rs *StoreWithNewFixtureResultSet) All() ([]*StoreWithNewFixture, error)
- func (rs *StoreWithNewFixtureResultSet) ForEach(fn func(*StoreWithNewFixture) error) error
- func (rs *StoreWithNewFixtureResultSet) Get() (*StoreWithNewFixture, error)
- func (rs *StoreWithNewFixtureResultSet) Next() bool
- func (rs *StoreWithNewFixtureResultSet) One() (*StoreWithNewFixture, error)
- type StoreWithNewFixtureStore
- func (s *StoreWithNewFixtureStore) Count(q *StoreWithNewFixtureQuery) (int64, error)
- func (s *StoreWithNewFixtureStore) Delete(record *StoreWithNewFixture) error
- func (s *StoreWithNewFixtureStore) Find(q *StoreWithNewFixtureQuery) (*StoreWithNewFixtureResultSet, error)
- func (s *StoreWithNewFixtureStore) FindOne(q *StoreWithNewFixtureQuery) (*StoreWithNewFixture, error)
- func (s *StoreWithNewFixtureStore) Insert(record *StoreWithNewFixture) error
- func (s *StoreWithNewFixtureStore) MustCount(q *StoreWithNewFixtureQuery) int64
- func (s *StoreWithNewFixtureStore) MustFind(q *StoreWithNewFixtureQuery) *StoreWithNewFixtureResultSet
- func (s *StoreWithNewFixtureStore) MustFindOne(q *StoreWithNewFixtureQuery) *StoreWithNewFixture
- func (s *StoreWithNewFixtureStore) New(f, b string) *StoreWithNewFixture
- func (s *StoreWithNewFixtureStore) Reload(record *StoreWithNewFixture) error
- func (s *StoreWithNewFixtureStore) Save(record *StoreWithNewFixture) (updated bool, err error)
- func (s *StoreWithNewFixtureStore) Transaction(callback func(*StoreWithNewFixtureStore) error) error
- func (s *StoreWithNewFixtureStore) Update(record *StoreWithNewFixture, cols ...kallax.SchemaField) (int64, error)
Constants ¶
This section is empty.
Variables ¶
var Schema = &schema{
EventsFixture: &schemaEventsFixture{
BaseSchema: kallax.NewBaseSchema(
"event",
"__eventsfixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("checks"),
kallax.NewSchemaField("must_fail_before"),
kallax.NewSchemaField("must_fail_after"),
),
ID: kallax.NewSchemaField("id"),
Checks: kallax.NewSchemaField("checks"),
MustFailBefore: kallax.NewSchemaField("must_fail_before"),
MustFailAfter: kallax.NewSchemaField("must_fail_after"),
},
EventsSaveFixture: &schemaEventsSaveFixture{
BaseSchema: kallax.NewBaseSchema(
"event",
"__eventssavefixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("checks"),
kallax.NewSchemaField("must_fail_before"),
kallax.NewSchemaField("must_fail_after"),
),
ID: kallax.NewSchemaField("id"),
Checks: kallax.NewSchemaField("checks"),
MustFailBefore: kallax.NewSchemaField("must_fail_before"),
MustFailAfter: kallax.NewSchemaField("must_fail_after"),
},
MultiKeySortFixture: &schemaMultiKeySortFixture{
BaseSchema: kallax.NewBaseSchema(
"query",
"__multikeysortfixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("name"),
kallax.NewSchemaField("start"),
kallax.NewSchemaField("_end"),
),
ID: kallax.NewSchemaField("id"),
Name: kallax.NewSchemaField("name"),
Start: kallax.NewSchemaField("start"),
End: kallax.NewSchemaField("_end"),
},
QueryFixture: &schemaQueryFixture{
BaseSchema: kallax.NewBaseSchema(
"query",
"__queryfixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("foo"),
),
ID: kallax.NewSchemaField("id"),
Foo: kallax.NewSchemaField("foo"),
},
ResultSetFixture: &schemaResultSetFixture{
BaseSchema: kallax.NewBaseSchema(
"resultset",
"__resultsetfixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("foo"),
),
ID: kallax.NewSchemaField("id"),
Foo: kallax.NewSchemaField("foo"),
},
ResultSetInitFixture: &schemaResultSetInitFixture{
BaseSchema: kallax.NewBaseSchema(
"resultset",
"__resultsetinitfixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("foo"),
),
ID: kallax.NewSchemaField("id"),
Foo: kallax.NewSchemaField("foo"),
},
SchemaFixture: &schemaSchemaFixture{
BaseSchema: kallax.NewBaseSchema(
"schema",
"__schemafixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{
"Nested": kallax.NewSchemaField("schema_fixture_id"),
},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("string"),
kallax.NewSchemaField("int"),
kallax.NewSchemaField("inline"),
kallax.NewSchemaField("map_of_string"),
kallax.NewSchemaField("map_of_interface"),
kallax.NewSchemaField("map_of_some_type"),
),
ID: kallax.NewSchemaField("id"),
String: kallax.NewSchemaField("string"),
Int: kallax.NewSchemaField("int"),
},
StoreFixture: &schemaStoreFixture{
BaseSchema: kallax.NewBaseSchema(
"store",
"__storefixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("foo"),
),
ID: kallax.NewSchemaField("id"),
Foo: kallax.NewSchemaField("foo"),
},
StoreWithConstructFixture: &schemaStoreWithConstructFixture{
BaseSchema: kallax.NewBaseSchema(
"store_construct",
"__storewithconstructfixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("foo"),
),
ID: kallax.NewSchemaField("id"),
Foo: kallax.NewSchemaField("foo"),
},
StoreWithNewFixture: &schemaStoreWithNewFixture{
BaseSchema: kallax.NewBaseSchema(
"store_new",
"__storewithnewfixture",
kallax.NewSchemaField("id"),
kallax.ForeignKeys{},
kallax.NewSchemaField("id"),
kallax.NewSchemaField("foo"),
kallax.NewSchemaField("bar"),
),
ID: kallax.NewSchemaField("id"),
Foo: kallax.NewSchemaField("foo"),
Bar: kallax.NewSchemaField("bar"),
},
}
Functions ¶
This section is empty.
Types ¶
type EventsFixture ¶
type EventsFixture struct { kallax.Model `table:"event"` Checks map[string]bool MustFailBefore error MustFailAfter error }
func NewEventsFixture ¶
func NewEventsFixture() (record *EventsFixture)
NewEventsFixture returns a new instance of EventsFixture.
func (*EventsFixture) ColumnAddress ¶
func (r *EventsFixture) ColumnAddress(col string) (interface{}, error)
func (*EventsFixture) NewRelationshipRecord ¶
func (r *EventsFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*EventsFixture) SetRelationship ¶
func (r *EventsFixture) SetRelationship(field string, record kallax.Record) error
func (*EventsFixture) Value ¶
func (r *EventsFixture) Value(col string) (interface{}, error)
type EventsFixtureQuery ¶
type EventsFixtureQuery struct {
*kallax.BaseQuery
}
EventsFixtureQuery is the object used to create queries for the EventsFixture entity.
func NewEventsFixtureQuery ¶
func NewEventsFixtureQuery() *EventsFixtureQuery
NewEventsFixtureQuery returns a new instance of EventsFixtureQuery.
func (*EventsFixtureQuery) BatchSize ¶
func (q *EventsFixtureQuery) BatchSize(size uint64) *EventsFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*EventsFixtureQuery) Copy ¶
func (q *EventsFixtureQuery) Copy() *EventsFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*EventsFixtureQuery) Limit ¶
func (q *EventsFixtureQuery) Limit(n uint64) *EventsFixtureQuery
Limit sets the max number of items to retrieve.
func (*EventsFixtureQuery) Offset ¶
func (q *EventsFixtureQuery) Offset(n uint64) *EventsFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*EventsFixtureQuery) Order ¶
func (q *EventsFixtureQuery) Order(cols ...kallax.ColumnOrder) *EventsFixtureQuery
Order adds order clauses to the query for the given columns.
func (*EventsFixtureQuery) Select ¶
func (q *EventsFixtureQuery) Select(columns ...kallax.SchemaField) *EventsFixtureQuery
Select adds columns to select in the query.
func (*EventsFixtureQuery) SelectNot ¶
func (q *EventsFixtureQuery) SelectNot(columns ...kallax.SchemaField) *EventsFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*EventsFixtureQuery) Where ¶
func (q *EventsFixtureQuery) Where(cond kallax.Condition) *EventsFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type EventsFixtureResultSet ¶
type EventsFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
EventsFixtureResultSet is the set of results returned by a query to the database.
func NewEventsFixtureResultSet ¶
func NewEventsFixtureResultSet(rs *kallax.ResultSet) *EventsFixtureResultSet
func (*EventsFixtureResultSet) All ¶
func (rs *EventsFixtureResultSet) All() ([]*EventsFixture, error)
All returns all records on the result set and closes the result set.
func (*EventsFixtureResultSet) ForEach ¶
func (rs *EventsFixtureResultSet) ForEach(fn func(*EventsFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*EventsFixtureResultSet) Get ¶
func (rs *EventsFixtureResultSet) Get() (*EventsFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*EventsFixtureResultSet) Next ¶
func (rs *EventsFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*EventsFixtureResultSet) One ¶
func (rs *EventsFixtureResultSet) One() (*EventsFixture, error)
One returns the first record on the result set and closes the result set.
type EventsFixtureStore ¶
type EventsFixtureStore struct {
*kallax.Store
}
EventsFixtureStore is the entity to access the records of the type EventsFixture in the database.
func NewEventsFixtureStore ¶
func NewEventsFixtureStore(db *sql.DB) *EventsFixtureStore
NewEventsFixtureStore creates a new instance of EventsFixtureStore using a SQL database.
func (*EventsFixtureStore) AfterInsert ¶
func (s *EventsFixtureStore) AfterInsert(doc *EventsFixture) error
func (*EventsFixtureStore) AfterUpdate ¶
func (s *EventsFixtureStore) AfterUpdate(doc *EventsFixture) error
func (*EventsFixtureStore) BeforeInsert ¶
func (s *EventsFixtureStore) BeforeInsert(doc *EventsFixture) error
func (*EventsFixtureStore) BeforeUpdate ¶
func (s *EventsFixtureStore) BeforeUpdate(doc *EventsFixture) error
func (*EventsFixtureStore) Count ¶
func (s *EventsFixtureStore) Count(q *EventsFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*EventsFixtureStore) Delete ¶
func (s *EventsFixtureStore) Delete(record *EventsFixture) error
Delete removes the given record from the database.
func (*EventsFixtureStore) Find ¶
func (s *EventsFixtureStore) Find(q *EventsFixtureQuery) (*EventsFixtureResultSet, error)
Find returns the set of results for the given query.
func (*EventsFixtureStore) FindOne ¶
func (s *EventsFixtureStore) FindOne(q *EventsFixtureQuery) (*EventsFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*EventsFixtureStore) Insert ¶
func (s *EventsFixtureStore) Insert(record *EventsFixture) error
Insert inserts a EventsFixture in the database. A non-persisted object is required for this operation.
func (*EventsFixtureStore) MustCount ¶
func (s *EventsFixtureStore) MustCount(q *EventsFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*EventsFixtureStore) MustFind ¶
func (s *EventsFixtureStore) MustFind(q *EventsFixtureQuery) *EventsFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*EventsFixtureStore) MustFindOne ¶
func (s *EventsFixtureStore) MustFindOne(q *EventsFixtureQuery) *EventsFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*EventsFixtureStore) Reload ¶
func (s *EventsFixtureStore) Reload(record *EventsFixture) error
Reload refreshes the EventsFixture with the data in the database and makes it writable.
func (*EventsFixtureStore) Save ¶
func (s *EventsFixtureStore) Save(record *EventsFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*EventsFixtureStore) Transaction ¶
func (s *EventsFixtureStore) Transaction(callback func(*EventsFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*EventsFixtureStore) Update ¶
func (s *EventsFixtureStore) Update(record *EventsFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type EventsSaveFixture ¶
type EventsSaveFixture struct { kallax.Model `table:"event"` Checks map[string]bool MustFailBefore error MustFailAfter error }
func NewEventsSaveFixture ¶
func NewEventsSaveFixture() (record *EventsSaveFixture)
NewEventsSaveFixture returns a new instance of EventsSaveFixture.
func (*EventsSaveFixture) ColumnAddress ¶
func (r *EventsSaveFixture) ColumnAddress(col string) (interface{}, error)
func (*EventsSaveFixture) NewRelationshipRecord ¶
func (r *EventsSaveFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*EventsSaveFixture) SetRelationship ¶
func (r *EventsSaveFixture) SetRelationship(field string, record kallax.Record) error
func (*EventsSaveFixture) Value ¶
func (r *EventsSaveFixture) Value(col string) (interface{}, error)
type EventsSaveFixtureQuery ¶
type EventsSaveFixtureQuery struct {
*kallax.BaseQuery
}
EventsSaveFixtureQuery is the object used to create queries for the EventsSaveFixture entity.
func NewEventsSaveFixtureQuery ¶
func NewEventsSaveFixtureQuery() *EventsSaveFixtureQuery
NewEventsSaveFixtureQuery returns a new instance of EventsSaveFixtureQuery.
func (*EventsSaveFixtureQuery) BatchSize ¶
func (q *EventsSaveFixtureQuery) BatchSize(size uint64) *EventsSaveFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*EventsSaveFixtureQuery) Copy ¶
func (q *EventsSaveFixtureQuery) Copy() *EventsSaveFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*EventsSaveFixtureQuery) Limit ¶
func (q *EventsSaveFixtureQuery) Limit(n uint64) *EventsSaveFixtureQuery
Limit sets the max number of items to retrieve.
func (*EventsSaveFixtureQuery) Offset ¶
func (q *EventsSaveFixtureQuery) Offset(n uint64) *EventsSaveFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*EventsSaveFixtureQuery) Order ¶
func (q *EventsSaveFixtureQuery) Order(cols ...kallax.ColumnOrder) *EventsSaveFixtureQuery
Order adds order clauses to the query for the given columns.
func (*EventsSaveFixtureQuery) Select ¶
func (q *EventsSaveFixtureQuery) Select(columns ...kallax.SchemaField) *EventsSaveFixtureQuery
Select adds columns to select in the query.
func (*EventsSaveFixtureQuery) SelectNot ¶
func (q *EventsSaveFixtureQuery) SelectNot(columns ...kallax.SchemaField) *EventsSaveFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*EventsSaveFixtureQuery) Where ¶
func (q *EventsSaveFixtureQuery) Where(cond kallax.Condition) *EventsSaveFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type EventsSaveFixtureResultSet ¶
type EventsSaveFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
EventsSaveFixtureResultSet is the set of results returned by a query to the database.
func NewEventsSaveFixtureResultSet ¶
func NewEventsSaveFixtureResultSet(rs *kallax.ResultSet) *EventsSaveFixtureResultSet
func (*EventsSaveFixtureResultSet) All ¶
func (rs *EventsSaveFixtureResultSet) All() ([]*EventsSaveFixture, error)
All returns all records on the result set and closes the result set.
func (*EventsSaveFixtureResultSet) ForEach ¶
func (rs *EventsSaveFixtureResultSet) ForEach(fn func(*EventsSaveFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*EventsSaveFixtureResultSet) Get ¶
func (rs *EventsSaveFixtureResultSet) Get() (*EventsSaveFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*EventsSaveFixtureResultSet) Next ¶
func (rs *EventsSaveFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*EventsSaveFixtureResultSet) One ¶
func (rs *EventsSaveFixtureResultSet) One() (*EventsSaveFixture, error)
One returns the first record on the result set and closes the result set.
type EventsSaveFixtureStore ¶
type EventsSaveFixtureStore struct {
*kallax.Store
}
EventsSaveFixtureStore is the entity to access the records of the type EventsSaveFixture in the database.
func NewEventsSaveFixtureStore ¶
func NewEventsSaveFixtureStore(db *sql.DB) *EventsSaveFixtureStore
NewEventsSaveFixtureStore creates a new instance of EventsSaveFixtureStore using a SQL database.
func (*EventsSaveFixtureStore) AfterSave ¶
func (s *EventsSaveFixtureStore) AfterSave(doc *EventsSaveFixture) error
func (*EventsSaveFixtureStore) BeforeSave ¶
func (s *EventsSaveFixtureStore) BeforeSave(doc *EventsSaveFixture) error
func (*EventsSaveFixtureStore) Count ¶
func (s *EventsSaveFixtureStore) Count(q *EventsSaveFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*EventsSaveFixtureStore) Delete ¶
func (s *EventsSaveFixtureStore) Delete(record *EventsSaveFixture) error
Delete removes the given record from the database.
func (*EventsSaveFixtureStore) Find ¶
func (s *EventsSaveFixtureStore) Find(q *EventsSaveFixtureQuery) (*EventsSaveFixtureResultSet, error)
Find returns the set of results for the given query.
func (*EventsSaveFixtureStore) FindOne ¶
func (s *EventsSaveFixtureStore) FindOne(q *EventsSaveFixtureQuery) (*EventsSaveFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*EventsSaveFixtureStore) Insert ¶
func (s *EventsSaveFixtureStore) Insert(record *EventsSaveFixture) error
Insert inserts a EventsSaveFixture in the database. A non-persisted object is required for this operation.
func (*EventsSaveFixtureStore) MustCount ¶
func (s *EventsSaveFixtureStore) MustCount(q *EventsSaveFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*EventsSaveFixtureStore) MustFind ¶
func (s *EventsSaveFixtureStore) MustFind(q *EventsSaveFixtureQuery) *EventsSaveFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*EventsSaveFixtureStore) MustFindOne ¶
func (s *EventsSaveFixtureStore) MustFindOne(q *EventsSaveFixtureQuery) *EventsSaveFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*EventsSaveFixtureStore) Reload ¶
func (s *EventsSaveFixtureStore) Reload(record *EventsSaveFixture) error
Reload refreshes the EventsSaveFixture with the data in the database and makes it writable.
func (*EventsSaveFixtureStore) Save ¶
func (s *EventsSaveFixtureStore) Save(record *EventsSaveFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*EventsSaveFixtureStore) Transaction ¶
func (s *EventsSaveFixtureStore) Transaction(callback func(*EventsSaveFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*EventsSaveFixtureStore) Update ¶
func (s *EventsSaveFixtureStore) Update(record *EventsSaveFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type MultiKeySortFixture ¶
type MultiKeySortFixture struct { kallax.Model `table:"query"` Name string Start time.Time End time.Time }
func NewMultiKeySortFixture ¶
func NewMultiKeySortFixture() (record *MultiKeySortFixture)
NewMultiKeySortFixture returns a new instance of MultiKeySortFixture.
func (*MultiKeySortFixture) ColumnAddress ¶
func (r *MultiKeySortFixture) ColumnAddress(col string) (interface{}, error)
func (*MultiKeySortFixture) NewRelationshipRecord ¶
func (r *MultiKeySortFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*MultiKeySortFixture) SetRelationship ¶
func (r *MultiKeySortFixture) SetRelationship(field string, record kallax.Record) error
func (*MultiKeySortFixture) Value ¶
func (r *MultiKeySortFixture) Value(col string) (interface{}, error)
type MultiKeySortFixtureQuery ¶
type MultiKeySortFixtureQuery struct {
*kallax.BaseQuery
}
MultiKeySortFixtureQuery is the object used to create queries for the MultiKeySortFixture entity.
func NewMultiKeySortFixtureQuery ¶
func NewMultiKeySortFixtureQuery() *MultiKeySortFixtureQuery
NewMultiKeySortFixtureQuery returns a new instance of MultiKeySortFixtureQuery.
func (*MultiKeySortFixtureQuery) BatchSize ¶
func (q *MultiKeySortFixtureQuery) BatchSize(size uint64) *MultiKeySortFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*MultiKeySortFixtureQuery) Copy ¶
func (q *MultiKeySortFixtureQuery) Copy() *MultiKeySortFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*MultiKeySortFixtureQuery) Limit ¶
func (q *MultiKeySortFixtureQuery) Limit(n uint64) *MultiKeySortFixtureQuery
Limit sets the max number of items to retrieve.
func (*MultiKeySortFixtureQuery) Offset ¶
func (q *MultiKeySortFixtureQuery) Offset(n uint64) *MultiKeySortFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*MultiKeySortFixtureQuery) Order ¶
func (q *MultiKeySortFixtureQuery) Order(cols ...kallax.ColumnOrder) *MultiKeySortFixtureQuery
Order adds order clauses to the query for the given columns.
func (*MultiKeySortFixtureQuery) Select ¶
func (q *MultiKeySortFixtureQuery) Select(columns ...kallax.SchemaField) *MultiKeySortFixtureQuery
Select adds columns to select in the query.
func (*MultiKeySortFixtureQuery) SelectNot ¶
func (q *MultiKeySortFixtureQuery) SelectNot(columns ...kallax.SchemaField) *MultiKeySortFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*MultiKeySortFixtureQuery) Where ¶
func (q *MultiKeySortFixtureQuery) Where(cond kallax.Condition) *MultiKeySortFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type MultiKeySortFixtureResultSet ¶
type MultiKeySortFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
MultiKeySortFixtureResultSet is the set of results returned by a query to the database.
func NewMultiKeySortFixtureResultSet ¶
func NewMultiKeySortFixtureResultSet(rs *kallax.ResultSet) *MultiKeySortFixtureResultSet
func (*MultiKeySortFixtureResultSet) All ¶
func (rs *MultiKeySortFixtureResultSet) All() ([]*MultiKeySortFixture, error)
All returns all records on the result set and closes the result set.
func (*MultiKeySortFixtureResultSet) ForEach ¶
func (rs *MultiKeySortFixtureResultSet) ForEach(fn func(*MultiKeySortFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*MultiKeySortFixtureResultSet) Get ¶
func (rs *MultiKeySortFixtureResultSet) Get() (*MultiKeySortFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*MultiKeySortFixtureResultSet) Next ¶
func (rs *MultiKeySortFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*MultiKeySortFixtureResultSet) One ¶
func (rs *MultiKeySortFixtureResultSet) One() (*MultiKeySortFixture, error)
One returns the first record on the result set and closes the result set.
type MultiKeySortFixtureStore ¶
type MultiKeySortFixtureStore struct {
*kallax.Store
}
MultiKeySortFixtureStore is the entity to access the records of the type MultiKeySortFixture in the database.
func NewMultiKeySortFixtureStore ¶
func NewMultiKeySortFixtureStore(db *sql.DB) *MultiKeySortFixtureStore
NewMultiKeySortFixtureStore creates a new instance of MultiKeySortFixtureStore using a SQL database.
func (*MultiKeySortFixtureStore) Count ¶
func (s *MultiKeySortFixtureStore) Count(q *MultiKeySortFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*MultiKeySortFixtureStore) Delete ¶
func (s *MultiKeySortFixtureStore) Delete(record *MultiKeySortFixture) error
Delete removes the given record from the database.
func (*MultiKeySortFixtureStore) Find ¶
func (s *MultiKeySortFixtureStore) Find(q *MultiKeySortFixtureQuery) (*MultiKeySortFixtureResultSet, error)
Find returns the set of results for the given query.
func (*MultiKeySortFixtureStore) FindOne ¶
func (s *MultiKeySortFixtureStore) FindOne(q *MultiKeySortFixtureQuery) (*MultiKeySortFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*MultiKeySortFixtureStore) Insert ¶
func (s *MultiKeySortFixtureStore) Insert(record *MultiKeySortFixture) error
Insert inserts a MultiKeySortFixture in the database. A non-persisted object is required for this operation.
func (*MultiKeySortFixtureStore) MustCount ¶
func (s *MultiKeySortFixtureStore) MustCount(q *MultiKeySortFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*MultiKeySortFixtureStore) MustFind ¶
func (s *MultiKeySortFixtureStore) MustFind(q *MultiKeySortFixtureQuery) *MultiKeySortFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*MultiKeySortFixtureStore) MustFindOne ¶
func (s *MultiKeySortFixtureStore) MustFindOne(q *MultiKeySortFixtureQuery) *MultiKeySortFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*MultiKeySortFixtureStore) Reload ¶
func (s *MultiKeySortFixtureStore) Reload(record *MultiKeySortFixture) error
Reload refreshes the MultiKeySortFixture with the data in the database and makes it writable.
func (*MultiKeySortFixtureStore) Save ¶
func (s *MultiKeySortFixtureStore) Save(record *MultiKeySortFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*MultiKeySortFixtureStore) Transaction ¶
func (s *MultiKeySortFixtureStore) Transaction(callback func(*MultiKeySortFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*MultiKeySortFixtureStore) Update ¶
func (s *MultiKeySortFixtureStore) Update(record *MultiKeySortFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type QueryFixture ¶
type QueryFixture struct { kallax.Model `table:"query"` Foo string }
func NewQueryFixture ¶
func NewQueryFixture(f string) (record *QueryFixture)
NewQueryFixture returns a new instance of QueryFixture.
func (*QueryFixture) ColumnAddress ¶
func (r *QueryFixture) ColumnAddress(col string) (interface{}, error)
func (*QueryFixture) NewRelationshipRecord ¶
func (r *QueryFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*QueryFixture) SetRelationship ¶
func (r *QueryFixture) SetRelationship(field string, record kallax.Record) error
func (*QueryFixture) Value ¶
func (r *QueryFixture) Value(col string) (interface{}, error)
type QueryFixtureQuery ¶
type QueryFixtureQuery struct {
*kallax.BaseQuery
}
QueryFixtureQuery is the object used to create queries for the QueryFixture entity.
func NewQueryFixtureQuery ¶
func NewQueryFixtureQuery() *QueryFixtureQuery
NewQueryFixtureQuery returns a new instance of QueryFixtureQuery.
func (*QueryFixtureQuery) BatchSize ¶
func (q *QueryFixtureQuery) BatchSize(size uint64) *QueryFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*QueryFixtureQuery) Copy ¶
func (q *QueryFixtureQuery) Copy() *QueryFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*QueryFixtureQuery) Limit ¶
func (q *QueryFixtureQuery) Limit(n uint64) *QueryFixtureQuery
Limit sets the max number of items to retrieve.
func (*QueryFixtureQuery) Offset ¶
func (q *QueryFixtureQuery) Offset(n uint64) *QueryFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*QueryFixtureQuery) Order ¶
func (q *QueryFixtureQuery) Order(cols ...kallax.ColumnOrder) *QueryFixtureQuery
Order adds order clauses to the query for the given columns.
func (*QueryFixtureQuery) Select ¶
func (q *QueryFixtureQuery) Select(columns ...kallax.SchemaField) *QueryFixtureQuery
Select adds columns to select in the query.
func (*QueryFixtureQuery) SelectNot ¶
func (q *QueryFixtureQuery) SelectNot(columns ...kallax.SchemaField) *QueryFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*QueryFixtureQuery) Where ¶
func (q *QueryFixtureQuery) Where(cond kallax.Condition) *QueryFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type QueryFixtureResultSet ¶
type QueryFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
QueryFixtureResultSet is the set of results returned by a query to the database.
func NewQueryFixtureResultSet ¶
func NewQueryFixtureResultSet(rs *kallax.ResultSet) *QueryFixtureResultSet
func (*QueryFixtureResultSet) All ¶
func (rs *QueryFixtureResultSet) All() ([]*QueryFixture, error)
All returns all records on the result set and closes the result set.
func (*QueryFixtureResultSet) ForEach ¶
func (rs *QueryFixtureResultSet) ForEach(fn func(*QueryFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*QueryFixtureResultSet) Get ¶
func (rs *QueryFixtureResultSet) Get() (*QueryFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*QueryFixtureResultSet) Next ¶
func (rs *QueryFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*QueryFixtureResultSet) One ¶
func (rs *QueryFixtureResultSet) One() (*QueryFixture, error)
One returns the first record on the result set and closes the result set.
type QueryFixtureStore ¶
type QueryFixtureStore struct {
*kallax.Store
}
QueryFixtureStore is the entity to access the records of the type QueryFixture in the database.
func NewQueryFixtureStore ¶
func NewQueryFixtureStore(db *sql.DB) *QueryFixtureStore
NewQueryFixtureStore creates a new instance of QueryFixtureStore using a SQL database.
func (*QueryFixtureStore) Count ¶
func (s *QueryFixtureStore) Count(q *QueryFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*QueryFixtureStore) Delete ¶
func (s *QueryFixtureStore) Delete(record *QueryFixture) error
Delete removes the given record from the database.
func (*QueryFixtureStore) Find ¶
func (s *QueryFixtureStore) Find(q *QueryFixtureQuery) (*QueryFixtureResultSet, error)
Find returns the set of results for the given query.
func (*QueryFixtureStore) FindOne ¶
func (s *QueryFixtureStore) FindOne(q *QueryFixtureQuery) (*QueryFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*QueryFixtureStore) Insert ¶
func (s *QueryFixtureStore) Insert(record *QueryFixture) error
Insert inserts a QueryFixture in the database. A non-persisted object is required for this operation.
func (*QueryFixtureStore) MustCount ¶
func (s *QueryFixtureStore) MustCount(q *QueryFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*QueryFixtureStore) MustFind ¶
func (s *QueryFixtureStore) MustFind(q *QueryFixtureQuery) *QueryFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*QueryFixtureStore) MustFindOne ¶
func (s *QueryFixtureStore) MustFindOne(q *QueryFixtureQuery) *QueryFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*QueryFixtureStore) Reload ¶
func (s *QueryFixtureStore) Reload(record *QueryFixture) error
Reload refreshes the QueryFixture with the data in the database and makes it writable.
func (*QueryFixtureStore) Save ¶
func (s *QueryFixtureStore) Save(record *QueryFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*QueryFixtureStore) Transaction ¶
func (s *QueryFixtureStore) Transaction(callback func(*QueryFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*QueryFixtureStore) Update ¶
func (s *QueryFixtureStore) Update(record *QueryFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type ResultSetFixture ¶
type ResultSetFixture struct { kallax.Model `table:"resultset"` Foo string }
func NewResultSetFixture ¶
func NewResultSetFixture(f string) (record *ResultSetFixture)
NewResultSetFixture returns a new instance of ResultSetFixture.
func (*ResultSetFixture) ColumnAddress ¶
func (r *ResultSetFixture) ColumnAddress(col string) (interface{}, error)
func (*ResultSetFixture) NewRelationshipRecord ¶
func (r *ResultSetFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*ResultSetFixture) SetRelationship ¶
func (r *ResultSetFixture) SetRelationship(field string, record kallax.Record) error
func (*ResultSetFixture) Value ¶
func (r *ResultSetFixture) Value(col string) (interface{}, error)
type ResultSetFixtureQuery ¶
type ResultSetFixtureQuery struct {
*kallax.BaseQuery
}
ResultSetFixtureQuery is the object used to create queries for the ResultSetFixture entity.
func NewResultSetFixtureQuery ¶
func NewResultSetFixtureQuery() *ResultSetFixtureQuery
NewResultSetFixtureQuery returns a new instance of ResultSetFixtureQuery.
func (*ResultSetFixtureQuery) BatchSize ¶
func (q *ResultSetFixtureQuery) BatchSize(size uint64) *ResultSetFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*ResultSetFixtureQuery) Copy ¶
func (q *ResultSetFixtureQuery) Copy() *ResultSetFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*ResultSetFixtureQuery) Limit ¶
func (q *ResultSetFixtureQuery) Limit(n uint64) *ResultSetFixtureQuery
Limit sets the max number of items to retrieve.
func (*ResultSetFixtureQuery) Offset ¶
func (q *ResultSetFixtureQuery) Offset(n uint64) *ResultSetFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*ResultSetFixtureQuery) Order ¶
func (q *ResultSetFixtureQuery) Order(cols ...kallax.ColumnOrder) *ResultSetFixtureQuery
Order adds order clauses to the query for the given columns.
func (*ResultSetFixtureQuery) Select ¶
func (q *ResultSetFixtureQuery) Select(columns ...kallax.SchemaField) *ResultSetFixtureQuery
Select adds columns to select in the query.
func (*ResultSetFixtureQuery) SelectNot ¶
func (q *ResultSetFixtureQuery) SelectNot(columns ...kallax.SchemaField) *ResultSetFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*ResultSetFixtureQuery) Where ¶
func (q *ResultSetFixtureQuery) Where(cond kallax.Condition) *ResultSetFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type ResultSetFixtureResultSet ¶
type ResultSetFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
ResultSetFixtureResultSet is the set of results returned by a query to the database.
func NewResultSetFixtureResultSet ¶
func NewResultSetFixtureResultSet(rs *kallax.ResultSet) *ResultSetFixtureResultSet
func (*ResultSetFixtureResultSet) All ¶
func (rs *ResultSetFixtureResultSet) All() ([]*ResultSetFixture, error)
All returns all records on the result set and closes the result set.
func (*ResultSetFixtureResultSet) ForEach ¶
func (rs *ResultSetFixtureResultSet) ForEach(fn func(*ResultSetFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*ResultSetFixtureResultSet) Get ¶
func (rs *ResultSetFixtureResultSet) Get() (*ResultSetFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*ResultSetFixtureResultSet) Next ¶
func (rs *ResultSetFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*ResultSetFixtureResultSet) One ¶
func (rs *ResultSetFixtureResultSet) One() (*ResultSetFixture, error)
One returns the first record on the result set and closes the result set.
type ResultSetFixtureStore ¶
type ResultSetFixtureStore struct {
*kallax.Store
}
ResultSetFixtureStore is the entity to access the records of the type ResultSetFixture in the database.
func NewResultSetFixtureStore ¶
func NewResultSetFixtureStore(db *sql.DB) *ResultSetFixtureStore
NewResultSetFixtureStore creates a new instance of ResultSetFixtureStore using a SQL database.
func (*ResultSetFixtureStore) Count ¶
func (s *ResultSetFixtureStore) Count(q *ResultSetFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*ResultSetFixtureStore) Delete ¶
func (s *ResultSetFixtureStore) Delete(record *ResultSetFixture) error
Delete removes the given record from the database.
func (*ResultSetFixtureStore) Find ¶
func (s *ResultSetFixtureStore) Find(q *ResultSetFixtureQuery) (*ResultSetFixtureResultSet, error)
Find returns the set of results for the given query.
func (*ResultSetFixtureStore) FindOne ¶
func (s *ResultSetFixtureStore) FindOne(q *ResultSetFixtureQuery) (*ResultSetFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*ResultSetFixtureStore) Insert ¶
func (s *ResultSetFixtureStore) Insert(record *ResultSetFixture) error
Insert inserts a ResultSetFixture in the database. A non-persisted object is required for this operation.
func (*ResultSetFixtureStore) MustCount ¶
func (s *ResultSetFixtureStore) MustCount(q *ResultSetFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*ResultSetFixtureStore) MustFind ¶
func (s *ResultSetFixtureStore) MustFind(q *ResultSetFixtureQuery) *ResultSetFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*ResultSetFixtureStore) MustFindOne ¶
func (s *ResultSetFixtureStore) MustFindOne(q *ResultSetFixtureQuery) *ResultSetFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*ResultSetFixtureStore) Reload ¶
func (s *ResultSetFixtureStore) Reload(record *ResultSetFixture) error
Reload refreshes the ResultSetFixture with the data in the database and makes it writable.
func (*ResultSetFixtureStore) Save ¶
func (s *ResultSetFixtureStore) Save(record *ResultSetFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*ResultSetFixtureStore) Transaction ¶
func (s *ResultSetFixtureStore) Transaction(callback func(*ResultSetFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*ResultSetFixtureStore) Update ¶
func (s *ResultSetFixtureStore) Update(record *ResultSetFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type ResultSetInitFixture ¶
type ResultSetInitFixture struct { kallax.Model `table:"resultset"` Foo string }
func NewResultSetInitFixture ¶
func NewResultSetInitFixture() (record *ResultSetInitFixture)
NewResultSetInitFixture returns a new instance of ResultSetInitFixture.
func (*ResultSetInitFixture) ColumnAddress ¶
func (r *ResultSetInitFixture) ColumnAddress(col string) (interface{}, error)
func (*ResultSetInitFixture) Init ¶
func (r *ResultSetInitFixture) Init(doc kallax.Record) error
func (*ResultSetInitFixture) NewRelationshipRecord ¶
func (r *ResultSetInitFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*ResultSetInitFixture) SetRelationship ¶
func (r *ResultSetInitFixture) SetRelationship(field string, record kallax.Record) error
func (*ResultSetInitFixture) Value ¶
func (r *ResultSetInitFixture) Value(col string) (interface{}, error)
type ResultSetInitFixtureQuery ¶
type ResultSetInitFixtureQuery struct {
*kallax.BaseQuery
}
ResultSetInitFixtureQuery is the object used to create queries for the ResultSetInitFixture entity.
func NewResultSetInitFixtureQuery ¶
func NewResultSetInitFixtureQuery() *ResultSetInitFixtureQuery
NewResultSetInitFixtureQuery returns a new instance of ResultSetInitFixtureQuery.
func (*ResultSetInitFixtureQuery) BatchSize ¶
func (q *ResultSetInitFixtureQuery) BatchSize(size uint64) *ResultSetInitFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*ResultSetInitFixtureQuery) Copy ¶
func (q *ResultSetInitFixtureQuery) Copy() *ResultSetInitFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*ResultSetInitFixtureQuery) Limit ¶
func (q *ResultSetInitFixtureQuery) Limit(n uint64) *ResultSetInitFixtureQuery
Limit sets the max number of items to retrieve.
func (*ResultSetInitFixtureQuery) Offset ¶
func (q *ResultSetInitFixtureQuery) Offset(n uint64) *ResultSetInitFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*ResultSetInitFixtureQuery) Order ¶
func (q *ResultSetInitFixtureQuery) Order(cols ...kallax.ColumnOrder) *ResultSetInitFixtureQuery
Order adds order clauses to the query for the given columns.
func (*ResultSetInitFixtureQuery) Select ¶
func (q *ResultSetInitFixtureQuery) Select(columns ...kallax.SchemaField) *ResultSetInitFixtureQuery
Select adds columns to select in the query.
func (*ResultSetInitFixtureQuery) SelectNot ¶
func (q *ResultSetInitFixtureQuery) SelectNot(columns ...kallax.SchemaField) *ResultSetInitFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*ResultSetInitFixtureQuery) Where ¶
func (q *ResultSetInitFixtureQuery) Where(cond kallax.Condition) *ResultSetInitFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type ResultSetInitFixtureResultSet ¶
type ResultSetInitFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
ResultSetInitFixtureResultSet is the set of results returned by a query to the database.
func NewResultSetInitFixtureResultSet ¶
func NewResultSetInitFixtureResultSet(rs *kallax.ResultSet) *ResultSetInitFixtureResultSet
func (*ResultSetInitFixtureResultSet) All ¶
func (rs *ResultSetInitFixtureResultSet) All() ([]*ResultSetInitFixture, error)
All returns all records on the result set and closes the result set.
func (*ResultSetInitFixtureResultSet) ForEach ¶
func (rs *ResultSetInitFixtureResultSet) ForEach(fn func(*ResultSetInitFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*ResultSetInitFixtureResultSet) Get ¶
func (rs *ResultSetInitFixtureResultSet) Get() (*ResultSetInitFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*ResultSetInitFixtureResultSet) Next ¶
func (rs *ResultSetInitFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*ResultSetInitFixtureResultSet) One ¶
func (rs *ResultSetInitFixtureResultSet) One() (*ResultSetInitFixture, error)
One returns the first record on the result set and closes the result set.
type ResultSetInitFixtureStore ¶
type ResultSetInitFixtureStore struct {
*kallax.Store
}
ResultSetInitFixtureStore is the entity to access the records of the type ResultSetInitFixture in the database.
func NewResultSetInitFixtureStore ¶
func NewResultSetInitFixtureStore(db *sql.DB) *ResultSetInitFixtureStore
NewResultSetInitFixtureStore creates a new instance of ResultSetInitFixtureStore using a SQL database.
func (*ResultSetInitFixtureStore) Count ¶
func (s *ResultSetInitFixtureStore) Count(q *ResultSetInitFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*ResultSetInitFixtureStore) Delete ¶
func (s *ResultSetInitFixtureStore) Delete(record *ResultSetInitFixture) error
Delete removes the given record from the database.
func (*ResultSetInitFixtureStore) Find ¶
func (s *ResultSetInitFixtureStore) Find(q *ResultSetInitFixtureQuery) (*ResultSetInitFixtureResultSet, error)
Find returns the set of results for the given query.
func (*ResultSetInitFixtureStore) FindOne ¶
func (s *ResultSetInitFixtureStore) FindOne(q *ResultSetInitFixtureQuery) (*ResultSetInitFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*ResultSetInitFixtureStore) Insert ¶
func (s *ResultSetInitFixtureStore) Insert(record *ResultSetInitFixture) error
Insert inserts a ResultSetInitFixture in the database. A non-persisted object is required for this operation.
func (*ResultSetInitFixtureStore) MustCount ¶
func (s *ResultSetInitFixtureStore) MustCount(q *ResultSetInitFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*ResultSetInitFixtureStore) MustFind ¶
func (s *ResultSetInitFixtureStore) MustFind(q *ResultSetInitFixtureQuery) *ResultSetInitFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*ResultSetInitFixtureStore) MustFindOne ¶
func (s *ResultSetInitFixtureStore) MustFindOne(q *ResultSetInitFixtureQuery) *ResultSetInitFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*ResultSetInitFixtureStore) Reload ¶
func (s *ResultSetInitFixtureStore) Reload(record *ResultSetInitFixture) error
Reload refreshes the ResultSetInitFixture with the data in the database and makes it writable.
func (*ResultSetInitFixtureStore) Save ¶
func (s *ResultSetInitFixtureStore) Save(record *ResultSetInitFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*ResultSetInitFixtureStore) Transaction ¶
func (s *ResultSetInitFixtureStore) Transaction(callback func(*ResultSetInitFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*ResultSetInitFixtureStore) Update ¶
func (s *ResultSetInitFixtureStore) Update(record *ResultSetInitFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type SchemaFixture ¶
type SchemaFixture struct { kallax.Model `table:"schema"` String string Int int Nested *SchemaFixture Inline struct { Inline string } `kallax:",inline"` MapOfString map[string]string MapOfInterface map[string]interface{} MapOfSomeType map[string]struct { Foo string } }
func NewSchemaFixture ¶
func NewSchemaFixture() (record *SchemaFixture)
NewSchemaFixture returns a new instance of SchemaFixture.
func (*SchemaFixture) ColumnAddress ¶
func (r *SchemaFixture) ColumnAddress(col string) (interface{}, error)
func (*SchemaFixture) NewRelationshipRecord ¶
func (r *SchemaFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*SchemaFixture) SetRelationship ¶
func (r *SchemaFixture) SetRelationship(field string, record kallax.Record) error
func (*SchemaFixture) Value ¶
func (r *SchemaFixture) Value(col string) (interface{}, error)
type SchemaFixtureQuery ¶
type SchemaFixtureQuery struct {
*kallax.BaseQuery
}
SchemaFixtureQuery is the object used to create queries for the SchemaFixture entity.
func NewSchemaFixtureQuery ¶
func NewSchemaFixtureQuery() *SchemaFixtureQuery
NewSchemaFixtureQuery returns a new instance of SchemaFixtureQuery.
func (*SchemaFixtureQuery) BatchSize ¶
func (q *SchemaFixtureQuery) BatchSize(size uint64) *SchemaFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*SchemaFixtureQuery) Copy ¶
func (q *SchemaFixtureQuery) Copy() *SchemaFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*SchemaFixtureQuery) Limit ¶
func (q *SchemaFixtureQuery) Limit(n uint64) *SchemaFixtureQuery
Limit sets the max number of items to retrieve.
func (*SchemaFixtureQuery) Offset ¶
func (q *SchemaFixtureQuery) Offset(n uint64) *SchemaFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*SchemaFixtureQuery) Order ¶
func (q *SchemaFixtureQuery) Order(cols ...kallax.ColumnOrder) *SchemaFixtureQuery
Order adds order clauses to the query for the given columns.
func (*SchemaFixtureQuery) Select ¶
func (q *SchemaFixtureQuery) Select(columns ...kallax.SchemaField) *SchemaFixtureQuery
Select adds columns to select in the query.
func (*SchemaFixtureQuery) SelectNot ¶
func (q *SchemaFixtureQuery) SelectNot(columns ...kallax.SchemaField) *SchemaFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*SchemaFixtureQuery) Where ¶
func (q *SchemaFixtureQuery) Where(cond kallax.Condition) *SchemaFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
func (*SchemaFixtureQuery) WithNested ¶
func (q *SchemaFixtureQuery) WithNested() *SchemaFixtureQuery
type SchemaFixtureResultSet ¶
type SchemaFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
SchemaFixtureResultSet is the set of results returned by a query to the database.
func NewSchemaFixtureResultSet ¶
func NewSchemaFixtureResultSet(rs *kallax.ResultSet) *SchemaFixtureResultSet
func (*SchemaFixtureResultSet) All ¶
func (rs *SchemaFixtureResultSet) All() ([]*SchemaFixture, error)
All returns all records on the result set and closes the result set.
func (*SchemaFixtureResultSet) ForEach ¶
func (rs *SchemaFixtureResultSet) ForEach(fn func(*SchemaFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*SchemaFixtureResultSet) Get ¶
func (rs *SchemaFixtureResultSet) Get() (*SchemaFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*SchemaFixtureResultSet) Next ¶
func (rs *SchemaFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*SchemaFixtureResultSet) One ¶
func (rs *SchemaFixtureResultSet) One() (*SchemaFixture, error)
One returns the first record on the result set and closes the result set.
type SchemaFixtureStore ¶
type SchemaFixtureStore struct {
*kallax.Store
}
SchemaFixtureStore is the entity to access the records of the type SchemaFixture in the database.
func NewSchemaFixtureStore ¶
func NewSchemaFixtureStore(db *sql.DB) *SchemaFixtureStore
NewSchemaFixtureStore creates a new instance of SchemaFixtureStore using a SQL database.
func (*SchemaFixtureStore) Count ¶
func (s *SchemaFixtureStore) Count(q *SchemaFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*SchemaFixtureStore) Delete ¶
func (s *SchemaFixtureStore) Delete(record *SchemaFixture) error
Delete removes the given record from the database.
func (*SchemaFixtureStore) Find ¶
func (s *SchemaFixtureStore) Find(q *SchemaFixtureQuery) (*SchemaFixtureResultSet, error)
Find returns the set of results for the given query.
func (*SchemaFixtureStore) FindOne ¶
func (s *SchemaFixtureStore) FindOne(q *SchemaFixtureQuery) (*SchemaFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*SchemaFixtureStore) Insert ¶
func (s *SchemaFixtureStore) Insert(record *SchemaFixture) error
Insert inserts a SchemaFixture in the database. A non-persisted object is required for this operation.
func (*SchemaFixtureStore) MustCount ¶
func (s *SchemaFixtureStore) MustCount(q *SchemaFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*SchemaFixtureStore) MustFind ¶
func (s *SchemaFixtureStore) MustFind(q *SchemaFixtureQuery) *SchemaFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*SchemaFixtureStore) MustFindOne ¶
func (s *SchemaFixtureStore) MustFindOne(q *SchemaFixtureQuery) *SchemaFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*SchemaFixtureStore) Reload ¶
func (s *SchemaFixtureStore) Reload(record *SchemaFixture) error
Reload refreshes the SchemaFixture with the data in the database and makes it writable.
func (*SchemaFixtureStore) Save ¶
func (s *SchemaFixtureStore) Save(record *SchemaFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*SchemaFixtureStore) Transaction ¶
func (s *SchemaFixtureStore) Transaction(callback func(*SchemaFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*SchemaFixtureStore) Update ¶
func (s *SchemaFixtureStore) Update(record *SchemaFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type StoreFixture ¶
type StoreFixture struct { kallax.Model `table:"store"` Foo string }
func NewStoreFixture ¶
func NewStoreFixture() (record *StoreFixture)
NewStoreFixture returns a new instance of StoreFixture.
func (*StoreFixture) ColumnAddress ¶
func (r *StoreFixture) ColumnAddress(col string) (interface{}, error)
func (*StoreFixture) NewRelationshipRecord ¶
func (r *StoreFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*StoreFixture) SetRelationship ¶
func (r *StoreFixture) SetRelationship(field string, record kallax.Record) error
func (*StoreFixture) Value ¶
func (r *StoreFixture) Value(col string) (interface{}, error)
type StoreFixtureQuery ¶
type StoreFixtureQuery struct {
*kallax.BaseQuery
}
StoreFixtureQuery is the object used to create queries for the StoreFixture entity.
func NewStoreFixtureQuery ¶
func NewStoreFixtureQuery() *StoreFixtureQuery
NewStoreFixtureQuery returns a new instance of StoreFixtureQuery.
func (*StoreFixtureQuery) BatchSize ¶
func (q *StoreFixtureQuery) BatchSize(size uint64) *StoreFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*StoreFixtureQuery) Copy ¶
func (q *StoreFixtureQuery) Copy() *StoreFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*StoreFixtureQuery) Limit ¶
func (q *StoreFixtureQuery) Limit(n uint64) *StoreFixtureQuery
Limit sets the max number of items to retrieve.
func (*StoreFixtureQuery) Offset ¶
func (q *StoreFixtureQuery) Offset(n uint64) *StoreFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*StoreFixtureQuery) Order ¶
func (q *StoreFixtureQuery) Order(cols ...kallax.ColumnOrder) *StoreFixtureQuery
Order adds order clauses to the query for the given columns.
func (*StoreFixtureQuery) Select ¶
func (q *StoreFixtureQuery) Select(columns ...kallax.SchemaField) *StoreFixtureQuery
Select adds columns to select in the query.
func (*StoreFixtureQuery) SelectNot ¶
func (q *StoreFixtureQuery) SelectNot(columns ...kallax.SchemaField) *StoreFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*StoreFixtureQuery) Where ¶
func (q *StoreFixtureQuery) Where(cond kallax.Condition) *StoreFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type StoreFixtureResultSet ¶
type StoreFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
StoreFixtureResultSet is the set of results returned by a query to the database.
func NewStoreFixtureResultSet ¶
func NewStoreFixtureResultSet(rs *kallax.ResultSet) *StoreFixtureResultSet
func (*StoreFixtureResultSet) All ¶
func (rs *StoreFixtureResultSet) All() ([]*StoreFixture, error)
All returns all records on the result set and closes the result set.
func (*StoreFixtureResultSet) ForEach ¶
func (rs *StoreFixtureResultSet) ForEach(fn func(*StoreFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*StoreFixtureResultSet) Get ¶
func (rs *StoreFixtureResultSet) Get() (*StoreFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*StoreFixtureResultSet) Next ¶
func (rs *StoreFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*StoreFixtureResultSet) One ¶
func (rs *StoreFixtureResultSet) One() (*StoreFixture, error)
One returns the first record on the result set and closes the result set.
type StoreFixtureStore ¶
type StoreFixtureStore struct {
*kallax.Store
}
StoreFixtureStore is the entity to access the records of the type StoreFixture in the database.
func NewStoreFixtureStore ¶
func NewStoreFixtureStore(db *sql.DB) *StoreFixtureStore
NewStoreFixtureStore creates a new instance of StoreFixtureStore using a SQL database.
func (*StoreFixtureStore) Count ¶
func (s *StoreFixtureStore) Count(q *StoreFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*StoreFixtureStore) Delete ¶
func (s *StoreFixtureStore) Delete(record *StoreFixture) error
Delete removes the given record from the database.
func (*StoreFixtureStore) Find ¶
func (s *StoreFixtureStore) Find(q *StoreFixtureQuery) (*StoreFixtureResultSet, error)
Find returns the set of results for the given query.
func (*StoreFixtureStore) FindOne ¶
func (s *StoreFixtureStore) FindOne(q *StoreFixtureQuery) (*StoreFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*StoreFixtureStore) Insert ¶
func (s *StoreFixtureStore) Insert(record *StoreFixture) error
Insert inserts a StoreFixture in the database. A non-persisted object is required for this operation.
func (*StoreFixtureStore) MustCount ¶
func (s *StoreFixtureStore) MustCount(q *StoreFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*StoreFixtureStore) MustFind ¶
func (s *StoreFixtureStore) MustFind(q *StoreFixtureQuery) *StoreFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*StoreFixtureStore) MustFindOne ¶
func (s *StoreFixtureStore) MustFindOne(q *StoreFixtureQuery) *StoreFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*StoreFixtureStore) Reload ¶
func (s *StoreFixtureStore) Reload(record *StoreFixture) error
Reload refreshes the StoreFixture with the data in the database and makes it writable.
func (*StoreFixtureStore) Save ¶
func (s *StoreFixtureStore) Save(record *StoreFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*StoreFixtureStore) Transaction ¶
func (s *StoreFixtureStore) Transaction(callback func(*StoreFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*StoreFixtureStore) Update ¶
func (s *StoreFixtureStore) Update(record *StoreFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type StoreWithConstructFixture ¶
type StoreWithConstructFixture struct { kallax.Model `table:"store_construct"` Foo string }
func NewStoreWithConstructFixture ¶
func NewStoreWithConstructFixture(f string) (record *StoreWithConstructFixture)
NewStoreWithConstructFixture returns a new instance of StoreWithConstructFixture.
func (*StoreWithConstructFixture) ColumnAddress ¶
func (r *StoreWithConstructFixture) ColumnAddress(col string) (interface{}, error)
func (*StoreWithConstructFixture) NewRelationshipRecord ¶
func (r *StoreWithConstructFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*StoreWithConstructFixture) SetRelationship ¶
func (r *StoreWithConstructFixture) SetRelationship(field string, record kallax.Record) error
func (*StoreWithConstructFixture) Value ¶
func (r *StoreWithConstructFixture) Value(col string) (interface{}, error)
type StoreWithConstructFixtureQuery ¶
type StoreWithConstructFixtureQuery struct {
*kallax.BaseQuery
}
StoreWithConstructFixtureQuery is the object used to create queries for the StoreWithConstructFixture entity.
func NewStoreWithConstructFixtureQuery ¶
func NewStoreWithConstructFixtureQuery() *StoreWithConstructFixtureQuery
NewStoreWithConstructFixtureQuery returns a new instance of StoreWithConstructFixtureQuery.
func (*StoreWithConstructFixtureQuery) BatchSize ¶
func (q *StoreWithConstructFixtureQuery) BatchSize(size uint64) *StoreWithConstructFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*StoreWithConstructFixtureQuery) Copy ¶
func (q *StoreWithConstructFixtureQuery) Copy() *StoreWithConstructFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*StoreWithConstructFixtureQuery) Limit ¶
func (q *StoreWithConstructFixtureQuery) Limit(n uint64) *StoreWithConstructFixtureQuery
Limit sets the max number of items to retrieve.
func (*StoreWithConstructFixtureQuery) Offset ¶
func (q *StoreWithConstructFixtureQuery) Offset(n uint64) *StoreWithConstructFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*StoreWithConstructFixtureQuery) Order ¶
func (q *StoreWithConstructFixtureQuery) Order(cols ...kallax.ColumnOrder) *StoreWithConstructFixtureQuery
Order adds order clauses to the query for the given columns.
func (*StoreWithConstructFixtureQuery) Select ¶
func (q *StoreWithConstructFixtureQuery) Select(columns ...kallax.SchemaField) *StoreWithConstructFixtureQuery
Select adds columns to select in the query.
func (*StoreWithConstructFixtureQuery) SelectNot ¶
func (q *StoreWithConstructFixtureQuery) SelectNot(columns ...kallax.SchemaField) *StoreWithConstructFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*StoreWithConstructFixtureQuery) Where ¶
func (q *StoreWithConstructFixtureQuery) Where(cond kallax.Condition) *StoreWithConstructFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type StoreWithConstructFixtureResultSet ¶
type StoreWithConstructFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
StoreWithConstructFixtureResultSet is the set of results returned by a query to the database.
func NewStoreWithConstructFixtureResultSet ¶
func NewStoreWithConstructFixtureResultSet(rs *kallax.ResultSet) *StoreWithConstructFixtureResultSet
func (*StoreWithConstructFixtureResultSet) All ¶
func (rs *StoreWithConstructFixtureResultSet) All() ([]*StoreWithConstructFixture, error)
All returns all records on the result set and closes the result set.
func (*StoreWithConstructFixtureResultSet) ForEach ¶
func (rs *StoreWithConstructFixtureResultSet) ForEach(fn func(*StoreWithConstructFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*StoreWithConstructFixtureResultSet) Get ¶
func (rs *StoreWithConstructFixtureResultSet) Get() (*StoreWithConstructFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*StoreWithConstructFixtureResultSet) Next ¶
func (rs *StoreWithConstructFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*StoreWithConstructFixtureResultSet) One ¶
func (rs *StoreWithConstructFixtureResultSet) One() (*StoreWithConstructFixture, error)
One returns the first record on the result set and closes the result set.
type StoreWithConstructFixtureStore ¶
type StoreWithConstructFixtureStore struct {
*kallax.Store
}
StoreWithConstructFixtureStore is the entity to access the records of the type StoreWithConstructFixture in the database.
func NewStoreWithConstructFixtureStore ¶
func NewStoreWithConstructFixtureStore(db *sql.DB) *StoreWithConstructFixtureStore
NewStoreWithConstructFixtureStore creates a new instance of StoreWithConstructFixtureStore using a SQL database.
func (*StoreWithConstructFixtureStore) Count ¶
func (s *StoreWithConstructFixtureStore) Count(q *StoreWithConstructFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*StoreWithConstructFixtureStore) Delete ¶
func (s *StoreWithConstructFixtureStore) Delete(record *StoreWithConstructFixture) error
Delete removes the given record from the database.
func (*StoreWithConstructFixtureStore) Find ¶
func (s *StoreWithConstructFixtureStore) Find(q *StoreWithConstructFixtureQuery) (*StoreWithConstructFixtureResultSet, error)
Find returns the set of results for the given query.
func (*StoreWithConstructFixtureStore) FindOne ¶
func (s *StoreWithConstructFixtureStore) FindOne(q *StoreWithConstructFixtureQuery) (*StoreWithConstructFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*StoreWithConstructFixtureStore) Insert ¶
func (s *StoreWithConstructFixtureStore) Insert(record *StoreWithConstructFixture) error
Insert inserts a StoreWithConstructFixture in the database. A non-persisted object is required for this operation.
func (*StoreWithConstructFixtureStore) MustCount ¶
func (s *StoreWithConstructFixtureStore) MustCount(q *StoreWithConstructFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*StoreWithConstructFixtureStore) MustFind ¶
func (s *StoreWithConstructFixtureStore) MustFind(q *StoreWithConstructFixtureQuery) *StoreWithConstructFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*StoreWithConstructFixtureStore) MustFindOne ¶
func (s *StoreWithConstructFixtureStore) MustFindOne(q *StoreWithConstructFixtureQuery) *StoreWithConstructFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*StoreWithConstructFixtureStore) Reload ¶
func (s *StoreWithConstructFixtureStore) Reload(record *StoreWithConstructFixture) error
Reload refreshes the StoreWithConstructFixture with the data in the database and makes it writable.
func (*StoreWithConstructFixtureStore) Save ¶
func (s *StoreWithConstructFixtureStore) Save(record *StoreWithConstructFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*StoreWithConstructFixtureStore) Transaction ¶
func (s *StoreWithConstructFixtureStore) Transaction(callback func(*StoreWithConstructFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*StoreWithConstructFixtureStore) Update ¶
func (s *StoreWithConstructFixtureStore) Update(record *StoreWithConstructFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type StoreWithNewFixture ¶
func NewStoreWithNewFixture ¶
func NewStoreWithNewFixture() (record *StoreWithNewFixture)
NewStoreWithNewFixture returns a new instance of StoreWithNewFixture.
func (*StoreWithNewFixture) ColumnAddress ¶
func (r *StoreWithNewFixture) ColumnAddress(col string) (interface{}, error)
func (*StoreWithNewFixture) NewRelationshipRecord ¶
func (r *StoreWithNewFixture) NewRelationshipRecord(field string) (kallax.Record, error)
func (*StoreWithNewFixture) SetRelationship ¶
func (r *StoreWithNewFixture) SetRelationship(field string, record kallax.Record) error
func (*StoreWithNewFixture) Value ¶
func (r *StoreWithNewFixture) Value(col string) (interface{}, error)
type StoreWithNewFixtureQuery ¶
type StoreWithNewFixtureQuery struct {
*kallax.BaseQuery
}
StoreWithNewFixtureQuery is the object used to create queries for the StoreWithNewFixture entity.
func NewStoreWithNewFixtureQuery ¶
func NewStoreWithNewFixtureQuery() *StoreWithNewFixtureQuery
NewStoreWithNewFixtureQuery returns a new instance of StoreWithNewFixtureQuery.
func (*StoreWithNewFixtureQuery) BatchSize ¶
func (q *StoreWithNewFixtureQuery) BatchSize(size uint64) *StoreWithNewFixtureQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*StoreWithNewFixtureQuery) Copy ¶
func (q *StoreWithNewFixtureQuery) Copy() *StoreWithNewFixtureQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*StoreWithNewFixtureQuery) Limit ¶
func (q *StoreWithNewFixtureQuery) Limit(n uint64) *StoreWithNewFixtureQuery
Limit sets the max number of items to retrieve.
func (*StoreWithNewFixtureQuery) Offset ¶
func (q *StoreWithNewFixtureQuery) Offset(n uint64) *StoreWithNewFixtureQuery
Offset sets the number of items to skip from the result set of items.
func (*StoreWithNewFixtureQuery) Order ¶
func (q *StoreWithNewFixtureQuery) Order(cols ...kallax.ColumnOrder) *StoreWithNewFixtureQuery
Order adds order clauses to the query for the given columns.
func (*StoreWithNewFixtureQuery) Select ¶
func (q *StoreWithNewFixtureQuery) Select(columns ...kallax.SchemaField) *StoreWithNewFixtureQuery
Select adds columns to select in the query.
func (*StoreWithNewFixtureQuery) SelectNot ¶
func (q *StoreWithNewFixtureQuery) SelectNot(columns ...kallax.SchemaField) *StoreWithNewFixtureQuery
SelectNot excludes columns from being selected in the query.
func (*StoreWithNewFixtureQuery) Where ¶
func (q *StoreWithNewFixtureQuery) Where(cond kallax.Condition) *StoreWithNewFixtureQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type StoreWithNewFixtureResultSet ¶
type StoreWithNewFixtureResultSet struct { *kallax.ResultSet // contains filtered or unexported fields }
StoreWithNewFixtureResultSet is the set of results returned by a query to the database.
func NewStoreWithNewFixtureResultSet ¶
func NewStoreWithNewFixtureResultSet(rs *kallax.ResultSet) *StoreWithNewFixtureResultSet
func (*StoreWithNewFixtureResultSet) All ¶
func (rs *StoreWithNewFixtureResultSet) All() ([]*StoreWithNewFixture, error)
All returns all records on the result set and closes the result set.
func (*StoreWithNewFixtureResultSet) ForEach ¶
func (rs *StoreWithNewFixtureResultSet) ForEach(fn func(*StoreWithNewFixture) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*StoreWithNewFixtureResultSet) Get ¶
func (rs *StoreWithNewFixtureResultSet) Get() (*StoreWithNewFixture, error)
Get retrieves the last fetched item from the result set and the last error.
func (*StoreWithNewFixtureResultSet) Next ¶
func (rs *StoreWithNewFixtureResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*StoreWithNewFixtureResultSet) One ¶
func (rs *StoreWithNewFixtureResultSet) One() (*StoreWithNewFixture, error)
One returns the first record on the result set and closes the result set.
type StoreWithNewFixtureStore ¶
type StoreWithNewFixtureStore struct {
*kallax.Store
}
StoreWithNewFixtureStore is the entity to access the records of the type StoreWithNewFixture in the database.
func NewStoreWithNewFixtureStore ¶
func NewStoreWithNewFixtureStore(db *sql.DB) *StoreWithNewFixtureStore
NewStoreWithNewFixtureStore creates a new instance of StoreWithNewFixtureStore using a SQL database.
func (*StoreWithNewFixtureStore) Count ¶
func (s *StoreWithNewFixtureStore) Count(q *StoreWithNewFixtureQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*StoreWithNewFixtureStore) Delete ¶
func (s *StoreWithNewFixtureStore) Delete(record *StoreWithNewFixture) error
Delete removes the given record from the database.
func (*StoreWithNewFixtureStore) Find ¶
func (s *StoreWithNewFixtureStore) Find(q *StoreWithNewFixtureQuery) (*StoreWithNewFixtureResultSet, error)
Find returns the set of results for the given query.
func (*StoreWithNewFixtureStore) FindOne ¶
func (s *StoreWithNewFixtureStore) FindOne(q *StoreWithNewFixtureQuery) (*StoreWithNewFixture, error)
FindOne returns the first row returned by the given query. `sql.ErrNoRows` is returned if there are no results.
func (*StoreWithNewFixtureStore) Insert ¶
func (s *StoreWithNewFixtureStore) Insert(record *StoreWithNewFixture) error
Insert inserts a StoreWithNewFixture in the database. A non-persisted object is required for this operation.
func (*StoreWithNewFixtureStore) MustCount ¶
func (s *StoreWithNewFixtureStore) MustCount(q *StoreWithNewFixtureQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*StoreWithNewFixtureStore) MustFind ¶
func (s *StoreWithNewFixtureStore) MustFind(q *StoreWithNewFixtureQuery) *StoreWithNewFixtureResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*StoreWithNewFixtureStore) MustFindOne ¶
func (s *StoreWithNewFixtureStore) MustFindOne(q *StoreWithNewFixtureQuery) *StoreWithNewFixture
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*StoreWithNewFixtureStore) New ¶
func (s *StoreWithNewFixtureStore) New(f, b string) *StoreWithNewFixture
func (*StoreWithNewFixtureStore) Reload ¶
func (s *StoreWithNewFixtureStore) Reload(record *StoreWithNewFixture) error
Reload refreshes the StoreWithNewFixture with the data in the database and makes it writable.
func (*StoreWithNewFixtureStore) Save ¶
func (s *StoreWithNewFixtureStore) Save(record *StoreWithNewFixture) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*StoreWithNewFixtureStore) Transaction ¶
func (s *StoreWithNewFixtureStore) Transaction(callback func(*StoreWithNewFixtureStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*StoreWithNewFixtureStore) Update ¶
func (s *StoreWithNewFixtureStore) Update(record *StoreWithNewFixture, cols ...kallax.SchemaField) (int64, error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.