entity

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the entity type in the database.
	Label = "entity"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldActive holds the string denoting the active field in the database.
	FieldActive = "active"
	// FieldTicker holds the string denoting the ticker field in the database.
	FieldTicker = "ticker"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldListDate holds the string denoting the list_date field in the database.
	FieldListDate = "list_date"
	// FieldDelisted holds the string denoting the delisted field in the database.
	FieldDelisted = "delisted"
	// EdgeExchanges holds the string denoting the exchanges edge name in mutations.
	EdgeExchanges = "exchanges"
	// EdgeIntervals holds the string denoting the intervals edge name in mutations.
	EdgeIntervals = "intervals"
	// EdgeDividends holds the string denoting the dividends edge name in mutations.
	EdgeDividends = "dividends"
	// EdgeSplits holds the string denoting the splits edge name in mutations.
	EdgeSplits = "splits"
	// EdgeFinancials holds the string denoting the financials edge name in mutations.
	EdgeFinancials = "financials"
	// Table holds the table name of the entity in the database.
	Table = "entities"
	// ExchangesTable is the table that holds the exchanges relation/edge. The primary key declared below.
	ExchangesTable = "entity_exchanges"
	// ExchangesInverseTable is the table name for the Exchange entity.
	// It exists in this package in order to avoid circular dependency with the "exchange" package.
	ExchangesInverseTable = "exchanges"
	// IntervalsTable is the table that holds the intervals relation/edge.
	IntervalsTable = "intervals"
	// IntervalsInverseTable is the table name for the Interval entity.
	// It exists in this package in order to avoid circular dependency with the "interval" package.
	IntervalsInverseTable = "intervals"
	// IntervalsColumn is the table column denoting the intervals relation/edge.
	IntervalsColumn = "stock_id"
	// DividendsTable is the table that holds the dividends relation/edge. The primary key declared below.
	DividendsTable = "entity_dividends"
	// DividendsInverseTable is the table name for the Dividend entity.
	// It exists in this package in order to avoid circular dependency with the "dividend" package.
	DividendsInverseTable = "dividends"
	// SplitsTable is the table that holds the splits relation/edge.
	SplitsTable = "splits"
	// SplitsInverseTable is the table name for the Split entity.
	// It exists in this package in order to avoid circular dependency with the "split" package.
	SplitsInverseTable = "splits"
	// SplitsColumn is the table column denoting the splits relation/edge.
	SplitsColumn = "entity_splits"
	// FinancialsTable is the table that holds the financials relation/edge. The primary key declared below.
	FinancialsTable = "entity_financials"
	// FinancialsInverseTable is the table name for the Financial entity.
	// It exists in this package in order to avoid circular dependency with the "financial" package.
	FinancialsInverseTable = "financials"
)

Variables

View Source
var (
	// ExchangesPrimaryKey and ExchangesColumn2 are the table columns denoting the
	// primary key for the exchanges relation (M2M).
	ExchangesPrimaryKey = []string{"entity_id", "exchange_id"}
	// DividendsPrimaryKey and DividendsColumn2 are the table columns denoting the
	// primary key for the dividends relation (M2M).
	DividendsPrimaryKey = []string{"entity_id", "dividend_id"}
	// FinancialsPrimaryKey and FinancialsColumn2 are the table columns denoting the
	// primary key for the financials relation (M2M).
	FinancialsPrimaryKey = []string{"entity_id", "financial_id"}
)
View Source
var (
	// TickerValidator is a validator for the "ticker" field. It is called by the builders before save.
	TickerValidator func(string) error
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
	DescriptionValidator func(string) error
)

Columns holds all SQL columns for entity fields.

Functions

func Active

func Active(v bool) predicate.Entity

Active applies equality check predicate on the "active" field. It's identical to ActiveEQ.

func ActiveEQ

func ActiveEQ(v bool) predicate.Entity

ActiveEQ applies the EQ predicate on the "active" field.

func ActiveNEQ

func ActiveNEQ(v bool) predicate.Entity

ActiveNEQ applies the NEQ predicate on the "active" field.

func And

func And(predicates ...predicate.Entity) predicate.Entity

And groups predicates with the AND operator between them.

func Delisted

func Delisted(v time.Time) predicate.Entity

Delisted applies equality check predicate on the "delisted" field. It's identical to DelistedEQ.

func DelistedEQ

func DelistedEQ(v time.Time) predicate.Entity

DelistedEQ applies the EQ predicate on the "delisted" field.

func DelistedGT

func DelistedGT(v time.Time) predicate.Entity

DelistedGT applies the GT predicate on the "delisted" field.

func DelistedGTE

func DelistedGTE(v time.Time) predicate.Entity

DelistedGTE applies the GTE predicate on the "delisted" field.

func DelistedIn

func DelistedIn(vs ...time.Time) predicate.Entity

DelistedIn applies the In predicate on the "delisted" field.

func DelistedIsNil

func DelistedIsNil() predicate.Entity

DelistedIsNil applies the IsNil predicate on the "delisted" field.

func DelistedLT

func DelistedLT(v time.Time) predicate.Entity

DelistedLT applies the LT predicate on the "delisted" field.

func DelistedLTE

func DelistedLTE(v time.Time) predicate.Entity

DelistedLTE applies the LTE predicate on the "delisted" field.

func DelistedNEQ

func DelistedNEQ(v time.Time) predicate.Entity

DelistedNEQ applies the NEQ predicate on the "delisted" field.

func DelistedNotIn

func DelistedNotIn(vs ...time.Time) predicate.Entity

DelistedNotIn applies the NotIn predicate on the "delisted" field.

func DelistedNotNil

func DelistedNotNil() predicate.Entity

DelistedNotNil applies the NotNil predicate on the "delisted" field.

func Description

func Description(v string) predicate.Entity

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Entity

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Entity

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Entity

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Entity

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Entity

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Entity

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Entity

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Entity

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Entity

DescriptionIn applies the In predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Entity

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Entity

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Entity

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Entity

DescriptionNotIn applies the NotIn predicate on the "description" field.

func HasDividends

func HasDividends() predicate.Entity

HasDividends applies the HasEdge predicate on the "dividends" edge.

func HasDividendsWith

func HasDividendsWith(preds ...predicate.Dividend) predicate.Entity

HasDividendsWith applies the HasEdge predicate on the "dividends" edge with a given conditions (other predicates).

func HasExchanges

func HasExchanges() predicate.Entity

HasExchanges applies the HasEdge predicate on the "exchanges" edge.

func HasExchangesWith

func HasExchangesWith(preds ...predicate.Exchange) predicate.Entity

HasExchangesWith applies the HasEdge predicate on the "exchanges" edge with a given conditions (other predicates).

func HasFinancials

func HasFinancials() predicate.Entity

HasFinancials applies the HasEdge predicate on the "financials" edge.

func HasFinancialsWith

func HasFinancialsWith(preds ...predicate.Financial) predicate.Entity

HasFinancialsWith applies the HasEdge predicate on the "financials" edge with a given conditions (other predicates).

func HasIntervals

func HasIntervals() predicate.Entity

HasIntervals applies the HasEdge predicate on the "intervals" edge.

func HasIntervalsWith

func HasIntervalsWith(preds ...predicate.Interval) predicate.Entity

HasIntervalsWith applies the HasEdge predicate on the "intervals" edge with a given conditions (other predicates).

func HasSplits

func HasSplits() predicate.Entity

HasSplits applies the HasEdge predicate on the "splits" edge.

func HasSplitsWith

func HasSplitsWith(preds ...predicate.Split) predicate.Entity

HasSplitsWith applies the HasEdge predicate on the "splits" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Entity

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Entity

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Entity

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Entity

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Entity

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Entity

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Entity

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Entity

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Entity

IDNotIn applies the NotIn predicate on the ID field.

func ListDate

func ListDate(v time.Time) predicate.Entity

ListDate applies equality check predicate on the "list_date" field. It's identical to ListDateEQ.

func ListDateEQ

func ListDateEQ(v time.Time) predicate.Entity

ListDateEQ applies the EQ predicate on the "list_date" field.

func ListDateGT

func ListDateGT(v time.Time) predicate.Entity

ListDateGT applies the GT predicate on the "list_date" field.

func ListDateGTE

func ListDateGTE(v time.Time) predicate.Entity

ListDateGTE applies the GTE predicate on the "list_date" field.

func ListDateIn

func ListDateIn(vs ...time.Time) predicate.Entity

ListDateIn applies the In predicate on the "list_date" field.

func ListDateLT

func ListDateLT(v time.Time) predicate.Entity

ListDateLT applies the LT predicate on the "list_date" field.

func ListDateLTE

func ListDateLTE(v time.Time) predicate.Entity

ListDateLTE applies the LTE predicate on the "list_date" field.

func ListDateNEQ

func ListDateNEQ(v time.Time) predicate.Entity

ListDateNEQ applies the NEQ predicate on the "list_date" field.

func ListDateNotIn

func ListDateNotIn(vs ...time.Time) predicate.Entity

ListDateNotIn applies the NotIn predicate on the "list_date" field.

func Name

func Name(v string) predicate.Entity

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Entity

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Entity

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Entity

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Entity

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Entity

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Entity

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Entity

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Entity

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Entity

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Entity

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Entity

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Entity

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Entity

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Entity) predicate.Entity

Or groups predicates with the OR operator between them.

func Ticker

func Ticker(v string) predicate.Entity

Ticker applies equality check predicate on the "ticker" field. It's identical to TickerEQ.

func TickerContains

func TickerContains(v string) predicate.Entity

TickerContains applies the Contains predicate on the "ticker" field.

func TickerContainsFold

func TickerContainsFold(v string) predicate.Entity

TickerContainsFold applies the ContainsFold predicate on the "ticker" field.

func TickerEQ

func TickerEQ(v string) predicate.Entity

TickerEQ applies the EQ predicate on the "ticker" field.

func TickerEqualFold

func TickerEqualFold(v string) predicate.Entity

TickerEqualFold applies the EqualFold predicate on the "ticker" field.

func TickerGT

func TickerGT(v string) predicate.Entity

TickerGT applies the GT predicate on the "ticker" field.

func TickerGTE

func TickerGTE(v string) predicate.Entity

TickerGTE applies the GTE predicate on the "ticker" field.

func TickerHasPrefix

func TickerHasPrefix(v string) predicate.Entity

TickerHasPrefix applies the HasPrefix predicate on the "ticker" field.

func TickerHasSuffix

func TickerHasSuffix(v string) predicate.Entity

TickerHasSuffix applies the HasSuffix predicate on the "ticker" field.

func TickerIn

func TickerIn(vs ...string) predicate.Entity

TickerIn applies the In predicate on the "ticker" field.

func TickerLT

func TickerLT(v string) predicate.Entity

TickerLT applies the LT predicate on the "ticker" field.

func TickerLTE

func TickerLTE(v string) predicate.Entity

TickerLTE applies the LTE predicate on the "ticker" field.

func TickerNEQ

func TickerNEQ(v string) predicate.Entity

TickerNEQ applies the NEQ predicate on the "ticker" field.

func TickerNotIn

func TickerNotIn(vs ...string) predicate.Entity

TickerNotIn applies the NotIn predicate on the "ticker" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL