Documentation ¶
Index ¶
- Constants
- Variables
- func AppendInt64(ctx context.Context, db models.DB, name string, value interface{}, ...) (int64, error)
- func CountQuery(ctx context.Context, db models.DB, where models.WhereClause) (int, error)
- func Delete(ctx context.Context, db models.DB, id string) (int64, error)
- func DeleteAll(ctx context.Context, db models.DB) (int64, error)
- func DeleteWhere(ctx context.Context, db models.DB, where models.WhereClause) (int64, error)
- func Inc(ctx context.Context, db models.DB, inc models.Where, where models.WhereClause) (int64, error)
- func Insert(ctx context.Context, db models.DB, r *Row) error
- func InsertIgnore(ctx context.Context, db models.DB, r *Row, constraint string) error
- func Set(ctx context.Context, db models.DB, set models.Where, where models.WhereClause) (int64, error)
- func Update(ctx context.Context, db models.DB, r *Row) error
- func Upsert(ctx context.Context, db models.DB, r *Row) error
- type Row
- func All(ctx context.Context, db models.DB) ([]*Row, error)
- func Find(ctx context.Context, db models.DB, id string) (*Row, error)
- func First(ctx context.Context, db models.DB, where models.WhereClause, ...) (*Row, error)
- func One(ctx context.Context, db models.DB, where models.WhereClause) (*Row, error)
- func Query(ctx context.Context, db models.DB, where models.WhereClause) ([]*Row, error)
- func QueryOrder(ctx context.Context, db models.DB, where models.WhereClause, ...) ([]*Row, error)
Constants ¶
View Source
const TableName = "webhooks"
TableName is the primary table that this particular gnormed file deals with.
Variables ¶
View Source
var ( CreatedAtCol models.TimeTimeField = "created_at" IDCol models.StringField = "id" TokenCol models.StringField = "token" UpdatedAtCol models.TimeTimeField = "updated_at" )
Field values for every column in Webhooks.
Functions ¶
func AppendInt64 ¶
func AppendInt64(ctx context.Context, db models.DB, name string, value interface{}, where models.WhereClause) (int64, error)
AppendInt64 adds a value to a field
func CountQuery ¶
CountQuery retrieve one row from 'webhooks'.
func DeleteAll ¶
DeleteAll deletes all Rows from the database and returns the number of rows deleted.
func DeleteWhere ¶
DeleteWhere deletes Rows from the database and returns the number of rows deleted.
func Inc ¶
func Inc(ctx context.Context, db models.DB, inc models.Where, where models.WhereClause) (int64, error)
Inc increments the value of a single column on an existing row in the database.
func InsertIgnore ¶
InsertIgnore inserts the row into the database but ignores conflicts
func Set ¶
func Set(ctx context.Context, db models.DB, set models.Where, where models.WhereClause) (int64, error)
Set sets a single column on an existing row in the database.
Types ¶
type Row ¶
type Row struct { ID string // id (PK) CreatedAt time.Time // created_at Token string // token UpdatedAt time.Time // updated_at }
Row represents a row from 'webhooks'.
func First ¶
func First(ctx context.Context, db models.DB, where models.WhereClause, orderby models.OrderBy) (*Row, error)
First retrieve one row from 'webhooks' when sorted by orderby.
Click to show internal directories.
Click to hide internal directories.