Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Block) predicate.Block
- func ChainID(v uint64) predicate.Block
- func ChainIDEQ(v uint64) predicate.Block
- func ChainIDGT(v uint64) predicate.Block
- func ChainIDGTE(v uint64) predicate.Block
- func ChainIDIn(vs ...uint64) predicate.Block
- func ChainIDLT(v uint64) predicate.Block
- func ChainIDLTE(v uint64) predicate.Block
- func ChainIDNEQ(v uint64) predicate.Block
- func ChainIDNotIn(vs ...uint64) predicate.Block
- func CreatedAt(v time.Time) predicate.Block
- func CreatedAtEQ(v time.Time) predicate.Block
- func CreatedAtGT(v time.Time) predicate.Block
- func CreatedAtGTE(v time.Time) predicate.Block
- func CreatedAtIn(vs ...time.Time) predicate.Block
- func CreatedAtLT(v time.Time) predicate.Block
- func CreatedAtLTE(v time.Time) predicate.Block
- func CreatedAtNEQ(v time.Time) predicate.Block
- func CreatedAtNotIn(vs ...time.Time) predicate.Block
- func HasMsgs() predicate.Block
- func HasMsgsWith(preds ...predicate.Msg) predicate.Block
- func HasReceipts() predicate.Block
- func HasReceiptsWith(preds ...predicate.Receipt) predicate.Block
- func Hash(v []byte) predicate.Block
- func HashEQ(v []byte) predicate.Block
- func HashGT(v []byte) predicate.Block
- func HashGTE(v []byte) predicate.Block
- func HashIn(vs ...[]byte) predicate.Block
- func HashLT(v []byte) predicate.Block
- func HashLTE(v []byte) predicate.Block
- func HashNEQ(v []byte) predicate.Block
- func HashNotIn(vs ...[]byte) predicate.Block
- func Height(v uint64) predicate.Block
- func HeightEQ(v uint64) predicate.Block
- func HeightGT(v uint64) predicate.Block
- func HeightGTE(v uint64) predicate.Block
- func HeightIn(vs ...uint64) predicate.Block
- func HeightLT(v uint64) predicate.Block
- func HeightLTE(v uint64) predicate.Block
- func HeightNEQ(v uint64) predicate.Block
- func HeightNotIn(vs ...uint64) predicate.Block
- func ID(id int) predicate.Block
- func IDEQ(id int) predicate.Block
- func IDGT(id int) predicate.Block
- func IDGTE(id int) predicate.Block
- func IDIn(ids ...int) predicate.Block
- func IDLT(id int) predicate.Block
- func IDLTE(id int) predicate.Block
- func IDNEQ(id int) predicate.Block
- func IDNotIn(ids ...int) predicate.Block
- func Not(p predicate.Block) predicate.Block
- func Offset(v uint64) predicate.Block
- func OffsetEQ(v uint64) predicate.Block
- func OffsetGT(v uint64) predicate.Block
- func OffsetGTE(v uint64) predicate.Block
- func OffsetIn(vs ...uint64) predicate.Block
- func OffsetLT(v uint64) predicate.Block
- func OffsetLTE(v uint64) predicate.Block
- func OffsetNEQ(v uint64) predicate.Block
- func OffsetNotIn(vs ...uint64) predicate.Block
- func Or(predicates ...predicate.Block) predicate.Block
- func Timestamp(v time.Time) predicate.Block
- func TimestampEQ(v time.Time) predicate.Block
- func TimestampGT(v time.Time) predicate.Block
- func TimestampGTE(v time.Time) predicate.Block
- func TimestampIn(vs ...time.Time) predicate.Block
- func TimestampLT(v time.Time) predicate.Block
- func TimestampLTE(v time.Time) predicate.Block
- func TimestampNEQ(v time.Time) predicate.Block
- func TimestampNotIn(vs ...time.Time) predicate.Block
- func ValidColumn(column string) bool
- type OrderOption
- func ByChainID(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByHeight(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMsgs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByMsgsCount(opts ...sql.OrderTermOption) OrderOption
- func ByOffset(opts ...sql.OrderTermOption) OrderOption
- func ByReceipts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByReceiptsCount(opts ...sql.OrderTermOption) OrderOption
- func ByTimestamp(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the block type in the database. Label = "block" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldHash holds the string denoting the hash field in the database. FieldHash = "hash" // FieldChainID holds the string denoting the chain_id field in the database. FieldChainID = "chain_id" // FieldHeight holds the string denoting the height field in the database. FieldHeight = "height" // FieldOffset holds the string denoting the offset field in the database. FieldOffset = "offset" // FieldTimestamp holds the string denoting the timestamp field in the database. FieldTimestamp = "timestamp" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeMsgs holds the string denoting the msgs edge name in mutations. EdgeMsgs = "msgs" // EdgeReceipts holds the string denoting the receipts edge name in mutations. EdgeReceipts = "receipts" // Table holds the table name of the block in the database. Table = "blocks" // MsgsTable is the table that holds the msgs relation/edge. The primary key declared below. MsgsTable = "block_msgs" // MsgsInverseTable is the table name for the Msg entity. // It exists in this package in order to avoid circular dependency with the "msg" package. MsgsInverseTable = "msgs" // ReceiptsTable is the table that holds the receipts relation/edge. The primary key declared below. ReceiptsTable = "block_receipts" // ReceiptsInverseTable is the table name for the Receipt entity. // It exists in this package in order to avoid circular dependency with the "receipt" package. ReceiptsInverseTable = "receipts" )
Variables ¶
var ( // MsgsPrimaryKey and MsgsColumn2 are the table columns denoting the // primary key for the msgs relation (M2M). MsgsPrimaryKey = []string{"block_id", "msg_id"} // ReceiptsPrimaryKey and ReceiptsColumn2 are the table columns denoting the // primary key for the receipts relation (M2M). ReceiptsPrimaryKey = []string{"block_id", "receipt_id"} )
var ( // HashValidator is a validator for the "hash" field. It is called by the builders before save. HashValidator func([]byte) error // DefaultTimestamp holds the default value on creation for the "timestamp" field. DefaultTimestamp time.Time // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt time.Time )
var Columns = []string{ FieldID, FieldHash, FieldChainID, FieldHeight, FieldOffset, FieldTimestamp, FieldCreatedAt, }
Columns holds all SQL columns for block fields.
Functions ¶
func ChainID ¶ added in v0.1.7
ChainID applies equality check predicate on the "chain_id" field. It's identical to ChainIDEQ.
func ChainIDGTE ¶ added in v0.1.7
ChainIDGTE applies the GTE predicate on the "chain_id" field.
func ChainIDLTE ¶ added in v0.1.7
ChainIDLTE applies the LTE predicate on the "chain_id" field.
func ChainIDNEQ ¶ added in v0.1.7
ChainIDNEQ applies the NEQ predicate on the "chain_id" field.
func ChainIDNotIn ¶ added in v0.1.7
ChainIDNotIn applies the NotIn predicate on the "chain_id" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasMsgsWith ¶
HasMsgsWith applies the HasEdge predicate on the "msgs" edge with a given conditions (other predicates).
func HasReceipts ¶
HasReceipts applies the HasEdge predicate on the "receipts" edge.
func HasReceiptsWith ¶
HasReceiptsWith applies the HasEdge predicate on the "receipts" edge with a given conditions (other predicates).
func Hash ¶ added in v0.1.7
Hash applies equality check predicate on the "hash" field. It's identical to HashEQ.
func Height ¶ added in v0.1.7
Height applies equality check predicate on the "height" field. It's identical to HeightEQ.
func HeightNotIn ¶ added in v0.1.7
HeightNotIn applies the NotIn predicate on the "height" field.
func Offset ¶ added in v0.1.7
Offset applies equality check predicate on the "offset" field. It's identical to OffsetEQ.
func OffsetNotIn ¶ added in v0.1.7
OffsetNotIn applies the NotIn predicate on the "offset" field.
func Timestamp ¶
Timestamp applies equality check predicate on the "timestamp" field. It's identical to TimestampEQ.
func TimestampEQ ¶
TimestampEQ applies the EQ predicate on the "timestamp" field.
func TimestampGT ¶
TimestampGT applies the GT predicate on the "timestamp" field.
func TimestampGTE ¶
TimestampGTE applies the GTE predicate on the "timestamp" field.
func TimestampIn ¶
TimestampIn applies the In predicate on the "timestamp" field.
func TimestampLT ¶
TimestampLT applies the LT predicate on the "timestamp" field.
func TimestampLTE ¶
TimestampLTE applies the LTE predicate on the "timestamp" field.
func TimestampNEQ ¶
TimestampNEQ applies the NEQ predicate on the "timestamp" field.
func TimestampNotIn ¶
TimestampNotIn applies the NotIn predicate on the "timestamp" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Block queries.
func ByChainID ¶ added in v0.1.7
func ByChainID(opts ...sql.OrderTermOption) OrderOption
ByChainID orders the results by the chain_id field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByHeight ¶ added in v0.1.7
func ByHeight(opts ...sql.OrderTermOption) OrderOption
ByHeight orders the results by the height field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByMsgs ¶
func ByMsgs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByMsgs orders the results by msgs terms.
func ByMsgsCount ¶
func ByMsgsCount(opts ...sql.OrderTermOption) OrderOption
ByMsgsCount orders the results by msgs count.
func ByOffset ¶ added in v0.1.7
func ByOffset(opts ...sql.OrderTermOption) OrderOption
ByOffset orders the results by the offset field.
func ByReceipts ¶
func ByReceipts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByReceipts orders the results by receipts terms.
func ByReceiptsCount ¶
func ByReceiptsCount(opts ...sql.OrderTermOption) OrderOption
ByReceiptsCount orders the results by receipts count.
func ByTimestamp ¶
func ByTimestamp(opts ...sql.OrderTermOption) OrderOption
ByTimestamp orders the results by the timestamp field.