interval

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 interval type in the database.
	Label = "interval"
	// 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"
	// FieldInterval holds the string denoting the interval field in the database.
	FieldInterval = "interval"
	// FieldStockID holds the string denoting the stock_id field in the database.
	FieldStockID = "stock_id"
	// FieldDataSourceID holds the string denoting the data_source_id field in the database.
	FieldDataSourceID = "data_source_id"
	// EdgeDataSource holds the string denoting the data_source edge name in mutations.
	EdgeDataSource = "data_source"
	// EdgeStock holds the string denoting the stock edge name in mutations.
	EdgeStock = "stock"
	// EdgeBars holds the string denoting the bars edge name in mutations.
	EdgeBars = "bars"
	// EdgeTrades holds the string denoting the trades edge name in mutations.
	EdgeTrades = "trades"
	// Table holds the table name of the interval in the database.
	Table = "intervals"
	// DataSourceTable is the table that holds the data_source relation/edge.
	DataSourceTable = "intervals"
	// DataSourceInverseTable is the table name for the DataSource entity.
	// It exists in this package in order to avoid circular dependency with the "datasource" package.
	DataSourceInverseTable = "data_sources"
	// DataSourceColumn is the table column denoting the data_source relation/edge.
	DataSourceColumn = "data_source_id"
	// StockTable is the table that holds the stock relation/edge.
	StockTable = "intervals"
	// StockInverseTable is the table name for the Entity entity.
	// It exists in this package in order to avoid circular dependency with the "entity" package.
	StockInverseTable = "entities"
	// StockColumn is the table column denoting the stock relation/edge.
	StockColumn = "stock_id"
	// BarsTable is the table that holds the bars relation/edge.
	BarsTable = "bar_time_ranges"
	// BarsInverseTable is the table name for the BarTimeRange entity.
	// It exists in this package in order to avoid circular dependency with the "bartimerange" package.
	BarsInverseTable = "bar_time_ranges"
	// BarsColumn is the table column denoting the bars relation/edge.
	BarsColumn = "interval_id"
	// TradesTable is the table that holds the trades relation/edge.
	TradesTable = "trade_time_ranges"
	// TradesInverseTable is the table name for the TradeTimeRange entity.
	// It exists in this package in order to avoid circular dependency with the "tradetimerange" package.
	TradesInverseTable = "trade_time_ranges"
	// TradesColumn is the table column denoting the trades relation/edge.
	TradesColumn = "interval_id"
)

Variables

Columns holds all SQL columns for interval fields.

View Source
var (
	// DefaultActive holds the default value on creation for the "active" field.
	DefaultActive bool
)

Functions

func Active

func Active(v bool) predicate.Interval

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

func ActiveEQ

func ActiveEQ(v bool) predicate.Interval

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

func ActiveNEQ

func ActiveNEQ(v bool) predicate.Interval

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

func And

func And(predicates ...predicate.Interval) predicate.Interval

And groups predicates with the AND operator between them.

func DataSourceID

func DataSourceID(v int) predicate.Interval

DataSourceID applies equality check predicate on the "data_source_id" field. It's identical to DataSourceIDEQ.

func DataSourceIDEQ

func DataSourceIDEQ(v int) predicate.Interval

DataSourceIDEQ applies the EQ predicate on the "data_source_id" field.

func DataSourceIDIn

func DataSourceIDIn(vs ...int) predicate.Interval

DataSourceIDIn applies the In predicate on the "data_source_id" field.

func DataSourceIDNEQ

func DataSourceIDNEQ(v int) predicate.Interval

DataSourceIDNEQ applies the NEQ predicate on the "data_source_id" field.

func DataSourceIDNotIn

func DataSourceIDNotIn(vs ...int) predicate.Interval

DataSourceIDNotIn applies the NotIn predicate on the "data_source_id" field.

func HasBars

func HasBars() predicate.Interval

HasBars applies the HasEdge predicate on the "bars" edge.

func HasBarsWith

func HasBarsWith(preds ...predicate.BarTimeRange) predicate.Interval

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

func HasDataSource

func HasDataSource() predicate.Interval

HasDataSource applies the HasEdge predicate on the "data_source" edge.

func HasDataSourceWith

func HasDataSourceWith(preds ...predicate.DataSource) predicate.Interval

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

func HasStock

func HasStock() predicate.Interval

HasStock applies the HasEdge predicate on the "stock" edge.

func HasStockWith

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

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

func HasTrades

func HasTrades() predicate.Interval

HasTrades applies the HasEdge predicate on the "trades" edge.

func HasTradesWith

func HasTradesWith(preds ...predicate.TradeTimeRange) predicate.Interval

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

func ID

func ID(id int) predicate.Interval

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Interval

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Interval

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Interval

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Interval

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Interval

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Interval

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IntervalEQ

func IntervalEQ(v Interval) predicate.Interval

IntervalEQ applies the EQ predicate on the "interval" field.

func IntervalIn

func IntervalIn(vs ...Interval) predicate.Interval

IntervalIn applies the In predicate on the "interval" field.

func IntervalNEQ

func IntervalNEQ(v Interval) predicate.Interval

IntervalNEQ applies the NEQ predicate on the "interval" field.

func IntervalNotIn

func IntervalNotIn(vs ...Interval) predicate.Interval

IntervalNotIn applies the NotIn predicate on the "interval" field.

func IntervalValidator

func IntervalValidator(i Interval) error

IntervalValidator is a validator for the "interval" field enum values. It is called by the builders before save.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Interval) predicate.Interval

Or groups predicates with the OR operator between them.

func StockID

func StockID(v int) predicate.Interval

StockID applies equality check predicate on the "stock_id" field. It's identical to StockIDEQ.

func StockIDEQ

func StockIDEQ(v int) predicate.Interval

StockIDEQ applies the EQ predicate on the "stock_id" field.

func StockIDIn

func StockIDIn(vs ...int) predicate.Interval

StockIDIn applies the In predicate on the "stock_id" field.

func StockIDNEQ

func StockIDNEQ(v int) predicate.Interval

StockIDNEQ applies the NEQ predicate on the "stock_id" field.

func StockIDNotIn

func StockIDNotIn(vs ...int) predicate.Interval

StockIDNotIn applies the NotIn predicate on the "stock_id" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Interval

type Interval string

Interval defines the type for the "interval" enum field.

const (
	IntervalTrades  Interval = "trades"
	Interval1min    Interval = "1min"
	IntervalDaily   Interval = "daily"
	IntervalMonthly Interval = "monthly"
	IntervalYearly  Interval = "yearly"
)

Interval values.

func (Interval) String

func (i Interval) String() string

Jump to

Keyboard shortcuts

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