ent

package
v0.0.0-...-8b6722b Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeAccount         = "Account"
	TypeAsset           = "Asset"
	TypeAssetClass      = "AssetClass"
	TypeAuthRole        = "AuthRole"
	TypeAuthType        = "AuthType"
	TypeBlockchain      = "Blockchain"
	TypeConnection      = "Connection"
	TypeCryptocurrency  = "Cryptocurrency"
	TypeDailyAssetPrice = "DailyAssetPrice"
	TypeExchange        = "Exchange"
	TypePortfolio       = "Portfolio"
	TypeSource          = "Source"
	TypeSourceType      = "SourceType"
	TypeStaffAccount    = "StaffAccount"
	TypeTransaction     = "Transaction"
	TypeTransactionType = "TransactionType"
)

Variables

View Source
var (
	// AccountOrderFieldCreatedAt orders Account by created_at.
	AccountOrderFieldCreatedAt = &AccountOrderField{
		field: account.FieldCreatedAt,
		toCursor: func(a *Account) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.CreatedAt,
			}
		},
	}
	// AccountOrderFieldUpdatedAt orders Account by updated_at.
	AccountOrderFieldUpdatedAt = &AccountOrderField{
		field: account.FieldUpdatedAt,
		toCursor: func(a *Account) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.UpdatedAt,
			}
		},
	}
	// AccountOrderFieldDeletedAt orders Account by deleted_at.
	AccountOrderFieldDeletedAt = &AccountOrderField{
		field: account.FieldDeletedAt,
		toCursor: func(a *Account) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.DeletedAt,
			}
		},
	}
	// AccountOrderFieldNickname orders Account by nickname.
	AccountOrderFieldNickname = &AccountOrderField{
		field: account.FieldNickname,
		toCursor: func(a *Account) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.Nickname,
			}
		},
	}
	// AccountOrderFieldEmail orders Account by email.
	AccountOrderFieldEmail = &AccountOrderField{
		field: account.FieldEmail,
		toCursor: func(a *Account) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.Email,
			}
		},
	}
	// AccountOrderFieldPasswordUpdatedAt orders Account by password_updated_at.
	AccountOrderFieldPasswordUpdatedAt = &AccountOrderField{
		field: account.FieldPasswordUpdatedAt,
		toCursor: func(a *Account) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.PasswordUpdatedAt,
			}
		},
	}
)
View Source
var (
	// AssetOrderFieldCreatedAt orders Asset by created_at.
	AssetOrderFieldCreatedAt = &AssetOrderField{
		field: asset.FieldCreatedAt,
		toCursor: func(a *Asset) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.CreatedAt,
			}
		},
	}
	// AssetOrderFieldUpdatedAt orders Asset by updated_at.
	AssetOrderFieldUpdatedAt = &AssetOrderField{
		field: asset.FieldUpdatedAt,
		toCursor: func(a *Asset) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.UpdatedAt,
			}
		},
	}
	// AssetOrderFieldDeletedAt orders Asset by deleted_at.
	AssetOrderFieldDeletedAt = &AssetOrderField{
		field: asset.FieldDeletedAt,
		toCursor: func(a *Asset) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.DeletedAt,
			}
		},
	}
)
View Source
var (
	// AssetClassOrderFieldCreatedAt orders AssetClass by created_at.
	AssetClassOrderFieldCreatedAt = &AssetClassOrderField{
		field: assetclass.FieldCreatedAt,
		toCursor: func(ac *AssetClass) Cursor {
			return Cursor{
				ID:    ac.ID,
				Value: ac.CreatedAt,
			}
		},
	}
	// AssetClassOrderFieldUpdatedAt orders AssetClass by updated_at.
	AssetClassOrderFieldUpdatedAt = &AssetClassOrderField{
		field: assetclass.FieldUpdatedAt,
		toCursor: func(ac *AssetClass) Cursor {
			return Cursor{
				ID:    ac.ID,
				Value: ac.UpdatedAt,
			}
		},
	}
	// AssetClassOrderFieldDeletedAt orders AssetClass by deleted_at.
	AssetClassOrderFieldDeletedAt = &AssetClassOrderField{
		field: assetclass.FieldDeletedAt,
		toCursor: func(ac *AssetClass) Cursor {
			return Cursor{
				ID:    ac.ID,
				Value: ac.DeletedAt,
			}
		},
	}
	// AssetClassOrderFieldValue orders AssetClass by value.
	AssetClassOrderFieldValue = &AssetClassOrderField{
		field: assetclass.FieldValue,
		toCursor: func(ac *AssetClass) Cursor {
			return Cursor{
				ID:    ac.ID,
				Value: ac.Value,
			}
		},
	}
)
View Source
var (
	// AuthRoleOrderFieldCreatedAt orders AuthRole by created_at.
	AuthRoleOrderFieldCreatedAt = &AuthRoleOrderField{
		field: authrole.FieldCreatedAt,
		toCursor: func(ar *AuthRole) Cursor {
			return Cursor{
				ID:    ar.ID,
				Value: ar.CreatedAt,
			}
		},
	}
	// AuthRoleOrderFieldUpdatedAt orders AuthRole by updated_at.
	AuthRoleOrderFieldUpdatedAt = &AuthRoleOrderField{
		field: authrole.FieldUpdatedAt,
		toCursor: func(ar *AuthRole) Cursor {
			return Cursor{
				ID:    ar.ID,
				Value: ar.UpdatedAt,
			}
		},
	}
	// AuthRoleOrderFieldDeletedAt orders AuthRole by deleted_at.
	AuthRoleOrderFieldDeletedAt = &AuthRoleOrderField{
		field: authrole.FieldDeletedAt,
		toCursor: func(ar *AuthRole) Cursor {
			return Cursor{
				ID:    ar.ID,
				Value: ar.DeletedAt,
			}
		},
	}
	// AuthRoleOrderFieldValue orders AuthRole by value.
	AuthRoleOrderFieldValue = &AuthRoleOrderField{
		field: authrole.FieldValue,
		toCursor: func(ar *AuthRole) Cursor {
			return Cursor{
				ID:    ar.ID,
				Value: ar.Value,
			}
		},
	}
)
View Source
var (
	// AuthTypeOrderFieldCreatedAt orders AuthType by created_at.
	AuthTypeOrderFieldCreatedAt = &AuthTypeOrderField{
		field: authtype.FieldCreatedAt,
		toCursor: func(at *AuthType) Cursor {
			return Cursor{
				ID:    at.ID,
				Value: at.CreatedAt,
			}
		},
	}
	// AuthTypeOrderFieldUpdatedAt orders AuthType by updated_at.
	AuthTypeOrderFieldUpdatedAt = &AuthTypeOrderField{
		field: authtype.FieldUpdatedAt,
		toCursor: func(at *AuthType) Cursor {
			return Cursor{
				ID:    at.ID,
				Value: at.UpdatedAt,
			}
		},
	}
	// AuthTypeOrderFieldDeletedAt orders AuthType by deleted_at.
	AuthTypeOrderFieldDeletedAt = &AuthTypeOrderField{
		field: authtype.FieldDeletedAt,
		toCursor: func(at *AuthType) Cursor {
			return Cursor{
				ID:    at.ID,
				Value: at.DeletedAt,
			}
		},
	}
	// AuthTypeOrderFieldValue orders AuthType by value.
	AuthTypeOrderFieldValue = &AuthTypeOrderField{
		field: authtype.FieldValue,
		toCursor: func(at *AuthType) Cursor {
			return Cursor{
				ID:    at.ID,
				Value: at.Value,
			}
		},
	}
)
View Source
var (
	// BlockchainOrderFieldCreatedAt orders Blockchain by created_at.
	BlockchainOrderFieldCreatedAt = &BlockchainOrderField{
		field: blockchain.FieldCreatedAt,
		toCursor: func(b *Blockchain) Cursor {
			return Cursor{
				ID:    b.ID,
				Value: b.CreatedAt,
			}
		},
	}
	// BlockchainOrderFieldUpdatedAt orders Blockchain by updated_at.
	BlockchainOrderFieldUpdatedAt = &BlockchainOrderField{
		field: blockchain.FieldUpdatedAt,
		toCursor: func(b *Blockchain) Cursor {
			return Cursor{
				ID:    b.ID,
				Value: b.UpdatedAt,
			}
		},
	}
	// BlockchainOrderFieldDeletedAt orders Blockchain by deleted_at.
	BlockchainOrderFieldDeletedAt = &BlockchainOrderField{
		field: blockchain.FieldDeletedAt,
		toCursor: func(b *Blockchain) Cursor {
			return Cursor{
				ID:    b.ID,
				Value: b.DeletedAt,
			}
		},
	}
	// BlockchainOrderFieldName orders Blockchain by name.
	BlockchainOrderFieldName = &BlockchainOrderField{
		field: blockchain.FieldName,
		toCursor: func(b *Blockchain) Cursor {
			return Cursor{
				ID:    b.ID,
				Value: b.Name,
			}
		},
	}
	// BlockchainOrderFieldSymbol orders Blockchain by symbol.
	BlockchainOrderFieldSymbol = &BlockchainOrderField{
		field: blockchain.FieldSymbol,
		toCursor: func(b *Blockchain) Cursor {
			return Cursor{
				ID:    b.ID,
				Value: b.Symbol,
			}
		},
	}
	// BlockchainOrderFieldChainID orders Blockchain by chain_id.
	BlockchainOrderFieldChainID = &BlockchainOrderField{
		field: blockchain.FieldChainID,
		toCursor: func(b *Blockchain) Cursor {
			return Cursor{
				ID:    b.ID,
				Value: b.ChainID,
			}
		},
	}
)
View Source
var (
	// ConnectionOrderFieldCreatedAt orders Connection by created_at.
	ConnectionOrderFieldCreatedAt = &ConnectionOrderField{
		field: connection.FieldCreatedAt,
		toCursor: func(c *Connection) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.CreatedAt,
			}
		},
	}
	// ConnectionOrderFieldUpdatedAt orders Connection by updated_at.
	ConnectionOrderFieldUpdatedAt = &ConnectionOrderField{
		field: connection.FieldUpdatedAt,
		toCursor: func(c *Connection) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.UpdatedAt,
			}
		},
	}
	// ConnectionOrderFieldDeletedAt orders Connection by deleted_at.
	ConnectionOrderFieldDeletedAt = &ConnectionOrderField{
		field: connection.FieldDeletedAt,
		toCursor: func(c *Connection) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.DeletedAt,
			}
		},
	}
	// ConnectionOrderFieldName orders Connection by name.
	ConnectionOrderFieldName = &ConnectionOrderField{
		field: connection.FieldName,
		toCursor: func(c *Connection) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.Name,
			}
		},
	}
)
View Source
var (
	// CryptocurrencyOrderFieldCreatedAt orders Cryptocurrency by created_at.
	CryptocurrencyOrderFieldCreatedAt = &CryptocurrencyOrderField{
		field: cryptocurrency.FieldCreatedAt,
		toCursor: func(c *Cryptocurrency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.CreatedAt,
			}
		},
	}
	// CryptocurrencyOrderFieldUpdatedAt orders Cryptocurrency by updated_at.
	CryptocurrencyOrderFieldUpdatedAt = &CryptocurrencyOrderField{
		field: cryptocurrency.FieldUpdatedAt,
		toCursor: func(c *Cryptocurrency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.UpdatedAt,
			}
		},
	}
	// CryptocurrencyOrderFieldDeletedAt orders Cryptocurrency by deleted_at.
	CryptocurrencyOrderFieldDeletedAt = &CryptocurrencyOrderField{
		field: cryptocurrency.FieldDeletedAt,
		toCursor: func(c *Cryptocurrency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.DeletedAt,
			}
		},
	}
	// CryptocurrencyOrderFieldSymbol orders Cryptocurrency by symbol.
	CryptocurrencyOrderFieldSymbol = &CryptocurrencyOrderField{
		field: cryptocurrency.FieldSymbol,
		toCursor: func(c *Cryptocurrency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.Symbol,
			}
		},
	}
	// CryptocurrencyOrderFieldName orders Cryptocurrency by name.
	CryptocurrencyOrderFieldName = &CryptocurrencyOrderField{
		field: cryptocurrency.FieldName,
		toCursor: func(c *Cryptocurrency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.Name,
			}
		},
	}
)
View Source
var (
	// DailyAssetPriceOrderFieldCreatedAt orders DailyAssetPrice by created_at.
	DailyAssetPriceOrderFieldCreatedAt = &DailyAssetPriceOrderField{
		field: dailyassetprice.FieldCreatedAt,
		toCursor: func(dap *DailyAssetPrice) Cursor {
			return Cursor{
				ID:    dap.ID,
				Value: dap.CreatedAt,
			}
		},
	}
	// DailyAssetPriceOrderFieldUpdatedAt orders DailyAssetPrice by updated_at.
	DailyAssetPriceOrderFieldUpdatedAt = &DailyAssetPriceOrderField{
		field: dailyassetprice.FieldUpdatedAt,
		toCursor: func(dap *DailyAssetPrice) Cursor {
			return Cursor{
				ID:    dap.ID,
				Value: dap.UpdatedAt,
			}
		},
	}
	// DailyAssetPriceOrderFieldDeletedAt orders DailyAssetPrice by deleted_at.
	DailyAssetPriceOrderFieldDeletedAt = &DailyAssetPriceOrderField{
		field: dailyassetprice.FieldDeletedAt,
		toCursor: func(dap *DailyAssetPrice) Cursor {
			return Cursor{
				ID:    dap.ID,
				Value: dap.DeletedAt,
			}
		},
	}
	// DailyAssetPriceOrderFieldTime orders DailyAssetPrice by time.
	DailyAssetPriceOrderFieldTime = &DailyAssetPriceOrderField{
		field: dailyassetprice.FieldTime,
		toCursor: func(dap *DailyAssetPrice) Cursor {
			return Cursor{
				ID:    dap.ID,
				Value: dap.Time,
			}
		},
	}
)
View Source
var (
	// ExchangeOrderFieldCreatedAt orders Exchange by created_at.
	ExchangeOrderFieldCreatedAt = &ExchangeOrderField{
		field: exchange.FieldCreatedAt,
		toCursor: func(e *Exchange) Cursor {
			return Cursor{
				ID:    e.ID,
				Value: e.CreatedAt,
			}
		},
	}
	// ExchangeOrderFieldUpdatedAt orders Exchange by updated_at.
	ExchangeOrderFieldUpdatedAt = &ExchangeOrderField{
		field: exchange.FieldUpdatedAt,
		toCursor: func(e *Exchange) Cursor {
			return Cursor{
				ID:    e.ID,
				Value: e.UpdatedAt,
			}
		},
	}
	// ExchangeOrderFieldDeletedAt orders Exchange by deleted_at.
	ExchangeOrderFieldDeletedAt = &ExchangeOrderField{
		field: exchange.FieldDeletedAt,
		toCursor: func(e *Exchange) Cursor {
			return Cursor{
				ID:    e.ID,
				Value: e.DeletedAt,
			}
		},
	}
	// ExchangeOrderFieldName orders Exchange by name.
	ExchangeOrderFieldName = &ExchangeOrderField{
		field: exchange.FieldName,
		toCursor: func(e *Exchange) Cursor {
			return Cursor{
				ID:    e.ID,
				Value: e.Name,
			}
		},
	}
)
View Source
var (
	// PortfolioOrderFieldCreatedAt orders Portfolio by created_at.
	PortfolioOrderFieldCreatedAt = &PortfolioOrderField{
		field: portfolio.FieldCreatedAt,
		toCursor: func(po *Portfolio) Cursor {
			return Cursor{
				ID:    po.ID,
				Value: po.CreatedAt,
			}
		},
	}
	// PortfolioOrderFieldUpdatedAt orders Portfolio by updated_at.
	PortfolioOrderFieldUpdatedAt = &PortfolioOrderField{
		field: portfolio.FieldUpdatedAt,
		toCursor: func(po *Portfolio) Cursor {
			return Cursor{
				ID:    po.ID,
				Value: po.UpdatedAt,
			}
		},
	}
	// PortfolioOrderFieldDeletedAt orders Portfolio by deleted_at.
	PortfolioOrderFieldDeletedAt = &PortfolioOrderField{
		field: portfolio.FieldDeletedAt,
		toCursor: func(po *Portfolio) Cursor {
			return Cursor{
				ID:    po.ID,
				Value: po.DeletedAt,
			}
		},
	}
	// PortfolioOrderFieldName orders Portfolio by name.
	PortfolioOrderFieldName = &PortfolioOrderField{
		field: portfolio.FieldName,
		toCursor: func(po *Portfolio) Cursor {
			return Cursor{
				ID:    po.ID,
				Value: po.Name,
			}
		},
	}
	// PortfolioOrderFieldIsPublic orders Portfolio by is_public.
	PortfolioOrderFieldIsPublic = &PortfolioOrderField{
		field: portfolio.FieldIsPublic,
		toCursor: func(po *Portfolio) Cursor {
			return Cursor{
				ID:    po.ID,
				Value: po.IsPublic,
			}
		},
	}
	// PortfolioOrderFieldIsVisible orders Portfolio by is_visible.
	PortfolioOrderFieldIsVisible = &PortfolioOrderField{
		field: portfolio.FieldIsVisible,
		toCursor: func(po *Portfolio) Cursor {
			return Cursor{
				ID:    po.ID,
				Value: po.IsVisible,
			}
		},
	}
)
View Source
var (
	// SourceOrderFieldCreatedAt orders Source by created_at.
	SourceOrderFieldCreatedAt = &SourceOrderField{
		field: source.FieldCreatedAt,
		toCursor: func(s *Source) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.CreatedAt,
			}
		},
	}
	// SourceOrderFieldUpdatedAt orders Source by updated_at.
	SourceOrderFieldUpdatedAt = &SourceOrderField{
		field: source.FieldUpdatedAt,
		toCursor: func(s *Source) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.UpdatedAt,
			}
		},
	}
	// SourceOrderFieldDeletedAt orders Source by deleted_at.
	SourceOrderFieldDeletedAt = &SourceOrderField{
		field: source.FieldDeletedAt,
		toCursor: func(s *Source) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.DeletedAt,
			}
		},
	}
	// SourceOrderFieldName orders Source by name.
	SourceOrderFieldName = &SourceOrderField{
		field: source.FieldName,
		toCursor: func(s *Source) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.Name,
			}
		},
	}
)
View Source
var (
	// SourceTypeOrderFieldCreatedAt orders SourceType by created_at.
	SourceTypeOrderFieldCreatedAt = &SourceTypeOrderField{
		field: sourcetype.FieldCreatedAt,
		toCursor: func(st *SourceType) Cursor {
			return Cursor{
				ID:    st.ID,
				Value: st.CreatedAt,
			}
		},
	}
	// SourceTypeOrderFieldUpdatedAt orders SourceType by updated_at.
	SourceTypeOrderFieldUpdatedAt = &SourceTypeOrderField{
		field: sourcetype.FieldUpdatedAt,
		toCursor: func(st *SourceType) Cursor {
			return Cursor{
				ID:    st.ID,
				Value: st.UpdatedAt,
			}
		},
	}
	// SourceTypeOrderFieldDeletedAt orders SourceType by deleted_at.
	SourceTypeOrderFieldDeletedAt = &SourceTypeOrderField{
		field: sourcetype.FieldDeletedAt,
		toCursor: func(st *SourceType) Cursor {
			return Cursor{
				ID:    st.ID,
				Value: st.DeletedAt,
			}
		},
	}
	// SourceTypeOrderFieldValue orders SourceType by value.
	SourceTypeOrderFieldValue = &SourceTypeOrderField{
		field: sourcetype.FieldValue,
		toCursor: func(st *SourceType) Cursor {
			return Cursor{
				ID:    st.ID,
				Value: st.Value,
			}
		},
	}
)
View Source
var (
	// StaffAccountOrderFieldCreatedAt orders StaffAccount by created_at.
	StaffAccountOrderFieldCreatedAt = &StaffAccountOrderField{
		field: staffaccount.FieldCreatedAt,
		toCursor: func(sa *StaffAccount) Cursor {
			return Cursor{
				ID:    sa.ID,
				Value: sa.CreatedAt,
			}
		},
	}
	// StaffAccountOrderFieldUpdatedAt orders StaffAccount by updated_at.
	StaffAccountOrderFieldUpdatedAt = &StaffAccountOrderField{
		field: staffaccount.FieldUpdatedAt,
		toCursor: func(sa *StaffAccount) Cursor {
			return Cursor{
				ID:    sa.ID,
				Value: sa.UpdatedAt,
			}
		},
	}
	// StaffAccountOrderFieldDeletedAt orders StaffAccount by deleted_at.
	StaffAccountOrderFieldDeletedAt = &StaffAccountOrderField{
		field: staffaccount.FieldDeletedAt,
		toCursor: func(sa *StaffAccount) Cursor {
			return Cursor{
				ID:    sa.ID,
				Value: sa.DeletedAt,
			}
		},
	}
	// StaffAccountOrderFieldPasswordUpdatedAt orders StaffAccount by password_updated_at.
	StaffAccountOrderFieldPasswordUpdatedAt = &StaffAccountOrderField{
		field: staffaccount.FieldPasswordUpdatedAt,
		toCursor: func(sa *StaffAccount) Cursor {
			return Cursor{
				ID:    sa.ID,
				Value: sa.PasswordUpdatedAt,
			}
		},
	}
)
View Source
var (
	// TransactionOrderFieldCreatedAt orders Transaction by created_at.
	TransactionOrderFieldCreatedAt = &TransactionOrderField{
		field: transaction.FieldCreatedAt,
		toCursor: func(t *Transaction) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.CreatedAt,
			}
		},
	}
	// TransactionOrderFieldUpdatedAt orders Transaction by updated_at.
	TransactionOrderFieldUpdatedAt = &TransactionOrderField{
		field: transaction.FieldUpdatedAt,
		toCursor: func(t *Transaction) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.UpdatedAt,
			}
		},
	}
	// TransactionOrderFieldDeletedAt orders Transaction by deleted_at.
	TransactionOrderFieldDeletedAt = &TransactionOrderField{
		field: transaction.FieldDeletedAt,
		toCursor: func(t *Transaction) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.DeletedAt,
			}
		},
	}
)
View Source
var (
	// TransactionTypeOrderFieldCreatedAt orders TransactionType by created_at.
	TransactionTypeOrderFieldCreatedAt = &TransactionTypeOrderField{
		field: transactiontype.FieldCreatedAt,
		toCursor: func(tt *TransactionType) Cursor {
			return Cursor{
				ID:    tt.ID,
				Value: tt.CreatedAt,
			}
		},
	}
	// TransactionTypeOrderFieldUpdatedAt orders TransactionType by updated_at.
	TransactionTypeOrderFieldUpdatedAt = &TransactionTypeOrderField{
		field: transactiontype.FieldUpdatedAt,
		toCursor: func(tt *TransactionType) Cursor {
			return Cursor{
				ID:    tt.ID,
				Value: tt.UpdatedAt,
			}
		},
	}
	// TransactionTypeOrderFieldDeletedAt orders TransactionType by deleted_at.
	TransactionTypeOrderFieldDeletedAt = &TransactionTypeOrderField{
		field: transactiontype.FieldDeletedAt,
		toCursor: func(tt *TransactionType) Cursor {
			return Cursor{
				ID:    tt.ID,
				Value: tt.DeletedAt,
			}
		},
	}
	// TransactionTypeOrderFieldValue orders TransactionType by value.
	TransactionTypeOrderFieldValue = &TransactionTypeOrderField{
		field: transactiontype.FieldValue,
		toCursor: func(tt *TransactionType) Cursor {
			return Cursor{
				ID:    tt.ID,
				Value: tt.Value,
			}
		},
	}
)
View Source
var DefaultAccountOrder = &AccountOrder{
	Direction: OrderDirectionAsc,
	Field: &AccountOrderField{
		field: account.FieldID,
		toCursor: func(a *Account) Cursor {
			return Cursor{ID: a.ID}
		},
	},
}

DefaultAccountOrder is the default ordering of Account.

View Source
var DefaultAssetClassOrder = &AssetClassOrder{
	Direction: OrderDirectionAsc,
	Field: &AssetClassOrderField{
		field: assetclass.FieldID,
		toCursor: func(ac *AssetClass) Cursor {
			return Cursor{ID: ac.ID}
		},
	},
}

DefaultAssetClassOrder is the default ordering of AssetClass.

View Source
var DefaultAssetOrder = &AssetOrder{
	Direction: OrderDirectionAsc,
	Field: &AssetOrderField{
		field: asset.FieldID,
		toCursor: func(a *Asset) Cursor {
			return Cursor{ID: a.ID}
		},
	},
}

DefaultAssetOrder is the default ordering of Asset.

View Source
var DefaultAuthRoleOrder = &AuthRoleOrder{
	Direction: OrderDirectionAsc,
	Field: &AuthRoleOrderField{
		field: authrole.FieldID,
		toCursor: func(ar *AuthRole) Cursor {
			return Cursor{ID: ar.ID}
		},
	},
}

DefaultAuthRoleOrder is the default ordering of AuthRole.

View Source
var DefaultAuthTypeOrder = &AuthTypeOrder{
	Direction: OrderDirectionAsc,
	Field: &AuthTypeOrderField{
		field: authtype.FieldID,
		toCursor: func(at *AuthType) Cursor {
			return Cursor{ID: at.ID}
		},
	},
}

DefaultAuthTypeOrder is the default ordering of AuthType.

View Source
var DefaultBlockchainOrder = &BlockchainOrder{
	Direction: OrderDirectionAsc,
	Field: &BlockchainOrderField{
		field: blockchain.FieldID,
		toCursor: func(b *Blockchain) Cursor {
			return Cursor{ID: b.ID}
		},
	},
}

DefaultBlockchainOrder is the default ordering of Blockchain.

View Source
var DefaultConnectionOrder = &ConnectionOrder{
	Direction: OrderDirectionAsc,
	Field: &ConnectionOrderField{
		field: connection.FieldID,
		toCursor: func(c *Connection) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultConnectionOrder is the default ordering of Connection.

View Source
var DefaultCryptocurrencyOrder = &CryptocurrencyOrder{
	Direction: OrderDirectionAsc,
	Field: &CryptocurrencyOrderField{
		field: cryptocurrency.FieldID,
		toCursor: func(c *Cryptocurrency) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultCryptocurrencyOrder is the default ordering of Cryptocurrency.

View Source
var DefaultDailyAssetPriceOrder = &DailyAssetPriceOrder{
	Direction: OrderDirectionAsc,
	Field: &DailyAssetPriceOrderField{
		field: dailyassetprice.FieldID,
		toCursor: func(dap *DailyAssetPrice) Cursor {
			return Cursor{ID: dap.ID}
		},
	},
}

DefaultDailyAssetPriceOrder is the default ordering of DailyAssetPrice.

View Source
var DefaultExchangeOrder = &ExchangeOrder{
	Direction: OrderDirectionAsc,
	Field: &ExchangeOrderField{
		field: exchange.FieldID,
		toCursor: func(e *Exchange) Cursor {
			return Cursor{ID: e.ID}
		},
	},
}

DefaultExchangeOrder is the default ordering of Exchange.

View Source
var DefaultPortfolioOrder = &PortfolioOrder{
	Direction: OrderDirectionAsc,
	Field: &PortfolioOrderField{
		field: portfolio.FieldID,
		toCursor: func(po *Portfolio) Cursor {
			return Cursor{ID: po.ID}
		},
	},
}

DefaultPortfolioOrder is the default ordering of Portfolio.

View Source
var DefaultSourceOrder = &SourceOrder{
	Direction: OrderDirectionAsc,
	Field: &SourceOrderField{
		field: source.FieldID,
		toCursor: func(s *Source) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultSourceOrder is the default ordering of Source.

View Source
var DefaultSourceTypeOrder = &SourceTypeOrder{
	Direction: OrderDirectionAsc,
	Field: &SourceTypeOrderField{
		field: sourcetype.FieldID,
		toCursor: func(st *SourceType) Cursor {
			return Cursor{ID: st.ID}
		},
	},
}

DefaultSourceTypeOrder is the default ordering of SourceType.

View Source
var DefaultStaffAccountOrder = &StaffAccountOrder{
	Direction: OrderDirectionAsc,
	Field: &StaffAccountOrderField{
		field: staffaccount.FieldID,
		toCursor: func(sa *StaffAccount) Cursor {
			return Cursor{ID: sa.ID}
		},
	},
}

DefaultStaffAccountOrder is the default ordering of StaffAccount.

View Source
var DefaultTransactionOrder = &TransactionOrder{
	Direction: OrderDirectionAsc,
	Field: &TransactionOrderField{
		field: transaction.FieldID,
		toCursor: func(t *Transaction) Cursor {
			return Cursor{ID: t.ID}
		},
	},
}

DefaultTransactionOrder is the default ordering of Transaction.

View Source
var DefaultTransactionTypeOrder = &TransactionTypeOrder{
	Direction: OrderDirectionAsc,
	Field: &TransactionTypeOrderField{
		field: transactiontype.FieldID,
		toCursor: func(tt *TransactionType) Cursor {
			return Cursor{ID: tt.ID}
		},
	},
}

DefaultTransactionTypeOrder is the default ordering of TransactionType.

View Source
var ErrEmptyAccountWhereInput = errors.New("ent: empty predicate AccountWhereInput")

ErrEmptyAccountWhereInput is returned in case the AccountWhereInput is empty.

View Source
var ErrEmptyAssetClassWhereInput = errors.New("ent: empty predicate AssetClassWhereInput")

ErrEmptyAssetClassWhereInput is returned in case the AssetClassWhereInput is empty.

View Source
var ErrEmptyAssetWhereInput = errors.New("ent: empty predicate AssetWhereInput")

ErrEmptyAssetWhereInput is returned in case the AssetWhereInput is empty.

View Source
var ErrEmptyAuthRoleWhereInput = errors.New("ent: empty predicate AuthRoleWhereInput")

ErrEmptyAuthRoleWhereInput is returned in case the AuthRoleWhereInput is empty.

View Source
var ErrEmptyAuthTypeWhereInput = errors.New("ent: empty predicate AuthTypeWhereInput")

ErrEmptyAuthTypeWhereInput is returned in case the AuthTypeWhereInput is empty.

View Source
var ErrEmptyBlockchainWhereInput = errors.New("ent: empty predicate BlockchainWhereInput")

ErrEmptyBlockchainWhereInput is returned in case the BlockchainWhereInput is empty.

View Source
var ErrEmptyConnectionWhereInput = errors.New("ent: empty predicate ConnectionWhereInput")

ErrEmptyConnectionWhereInput is returned in case the ConnectionWhereInput is empty.

View Source
var ErrEmptyCryptocurrencyWhereInput = errors.New("ent: empty predicate CryptocurrencyWhereInput")

ErrEmptyCryptocurrencyWhereInput is returned in case the CryptocurrencyWhereInput is empty.

View Source
var ErrEmptyDailyAssetPriceWhereInput = errors.New("ent: empty predicate DailyAssetPriceWhereInput")

ErrEmptyDailyAssetPriceWhereInput is returned in case the DailyAssetPriceWhereInput is empty.

View Source
var ErrEmptyExchangeWhereInput = errors.New("ent: empty predicate ExchangeWhereInput")

ErrEmptyExchangeWhereInput is returned in case the ExchangeWhereInput is empty.

View Source
var ErrEmptyPortfolioWhereInput = errors.New("ent: empty predicate PortfolioWhereInput")

ErrEmptyPortfolioWhereInput is returned in case the PortfolioWhereInput is empty.

View Source
var ErrEmptySourceTypeWhereInput = errors.New("ent: empty predicate SourceTypeWhereInput")

ErrEmptySourceTypeWhereInput is returned in case the SourceTypeWhereInput is empty.

View Source
var ErrEmptySourceWhereInput = errors.New("ent: empty predicate SourceWhereInput")

ErrEmptySourceWhereInput is returned in case the SourceWhereInput is empty.

View Source
var ErrEmptyStaffAccountWhereInput = errors.New("ent: empty predicate StaffAccountWhereInput")

ErrEmptyStaffAccountWhereInput is returned in case the StaffAccountWhereInput is empty.

View Source
var ErrEmptyTransactionTypeWhereInput = errors.New("ent: empty predicate TransactionTypeWhereInput")

ErrEmptyTransactionTypeWhereInput is returned in case the TransactionTypeWhereInput is empty.

View Source
var ErrEmptyTransactionWhereInput = errors.New("ent: empty predicate TransactionWhereInput")

ErrEmptyTransactionWhereInput is returned in case the TransactionWhereInput is empty.

Functions

func IDToType

func IDToType(ctx context.Context, id pulid.PULID) (string, error)

IDToType maps a pulid.PULID to the underlying table.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

Types

type Account

type Account struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Nickname holds the value of the "nickname" field.
	Nickname string `json:"nickname,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// EmailConfirmed holds the value of the "email_confirmed" field.
	EmailConfirmed bool `json:"emailConfirmed,omitempty"`
	// Password holds the value of the "password" field.
	Password *string `json:"-"`
	// PasswordUpdatedAt holds the value of the "password_updated_at" field.
	PasswordUpdatedAt *time.Time `json:"passwordUpdatedAt,omitempty"`
	// ProfilePictureURL holds the value of the "profile_picture_url" field.
	ProfilePictureURL *string `json:"profilePictureUrl,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AccountQuery when eager-loading is set.
	Edges AccountEdges `json:"edges"`
	// contains filtered or unexported fields
}

Account is the model entity for the Account schema.

func (*Account) AuthRoles

func (a *Account) AuthRoles(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AuthRoleOrder, where *AuthRoleWhereInput,
) (*AuthRoleConnection, error)

func (*Account) AuthType

func (a *Account) AuthType(ctx context.Context) (*AuthType, error)

func (*Account) Connections

func (a *Account) Connections(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *ConnectionOrder,
) (*ConnectionConnection, error)

func (*Account) Friends

func (a *Account) Friends(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AccountOrder, where *AccountWhereInput,
) (*AccountConnection, error)

func (*Account) NamedAuthRoles

func (a *Account) NamedAuthRoles(name string) ([]*AuthRole, error)

NamedAuthRoles returns the AuthRoles named value or an error if the edge was not loaded in eager-loading with this name.

func (*Account) NamedConnections

func (a *Account) NamedConnections(name string) ([]*Connection, error)

NamedConnections returns the Connections named value or an error if the edge was not loaded in eager-loading with this name.

func (*Account) NamedFriends

func (a *Account) NamedFriends(name string) ([]*Account, error)

NamedFriends returns the Friends named value or an error if the edge was not loaded in eager-loading with this name.

func (*Account) NamedPortfolios

func (a *Account) NamedPortfolios(name string) ([]*Portfolio, error)

NamedPortfolios returns the Portfolios named value or an error if the edge was not loaded in eager-loading with this name.

func (*Account) Node

func (a *Account) Node(ctx context.Context) (node *Node, err error)

func (*Account) Portfolios

func (a *Account) Portfolios(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *PortfolioOrder, where *PortfolioWhereInput,
) (*PortfolioConnection, error)

func (*Account) QueryAuthRoles

func (a *Account) QueryAuthRoles() *AuthRoleQuery

QueryAuthRoles queries the "auth_roles" edge of the Account entity.

func (*Account) QueryAuthType

func (a *Account) QueryAuthType() *AuthTypeQuery

QueryAuthType queries the "auth_type" edge of the Account entity.

func (*Account) QueryConnections

func (a *Account) QueryConnections() *ConnectionQuery

QueryConnections queries the "connections" edge of the Account entity.

func (*Account) QueryFriends

func (a *Account) QueryFriends() *AccountQuery

QueryFriends queries the "friends" edge of the Account entity.

func (*Account) QueryPortfolios

func (a *Account) QueryPortfolios() *PortfolioQuery

QueryPortfolios queries the "portfolios" edge of the Account entity.

func (*Account) String

func (a *Account) String() string

String implements the fmt.Stringer.

func (*Account) ToEdge

func (a *Account) ToEdge(order *AccountOrder) *AccountEdge

ToEdge converts Account into AccountEdge.

func (*Account) Unwrap

func (a *Account) Unwrap() *Account

Unwrap unwraps the Account entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Account) Update

func (a *Account) Update() *AccountUpdateOne

Update returns a builder for updating this Account. Note that you need to call Account.Unwrap() before calling this method if this Account was returned from a transaction, and the transaction was committed or rolled back.

type AccountClient

type AccountClient struct {
	// contains filtered or unexported fields
}

AccountClient is a client for the Account schema.

func NewAccountClient

func NewAccountClient(c config) *AccountClient

NewAccountClient returns a client for the Account from the given config.

func (*AccountClient) Create

func (c *AccountClient) Create() *AccountCreate

Create returns a builder for creating a Account entity.

func (*AccountClient) CreateBulk

func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk

CreateBulk returns a builder for creating a bulk of Account entities.

func (*AccountClient) Delete

func (c *AccountClient) Delete() *AccountDelete

Delete returns a delete builder for Account.

func (*AccountClient) DeleteOne

func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AccountClient) DeleteOneID

func (c *AccountClient) DeleteOneID(id pulid.PULID) *AccountDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*AccountClient) Get

func (c *AccountClient) Get(ctx context.Context, id pulid.PULID) (*Account, error)

Get returns a Account entity by its id.

func (*AccountClient) GetX

func (c *AccountClient) GetX(ctx context.Context, id pulid.PULID) *Account

GetX is like Get, but panics if an error occurs.

func (*AccountClient) Hooks

func (c *AccountClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AccountClient) Query

func (c *AccountClient) Query() *AccountQuery

Query returns a query builder for Account.

func (*AccountClient) QueryAuthRoles

func (c *AccountClient) QueryAuthRoles(a *Account) *AuthRoleQuery

QueryAuthRoles queries the auth_roles edge of a Account.

func (*AccountClient) QueryAuthType

func (c *AccountClient) QueryAuthType(a *Account) *AuthTypeQuery

QueryAuthType queries the auth_type edge of a Account.

func (*AccountClient) QueryConnections

func (c *AccountClient) QueryConnections(a *Account) *ConnectionQuery

QueryConnections queries the connections edge of a Account.

func (*AccountClient) QueryFriends

func (c *AccountClient) QueryFriends(a *Account) *AccountQuery

QueryFriends queries the friends edge of a Account.

func (*AccountClient) QueryPortfolios

func (c *AccountClient) QueryPortfolios(a *Account) *PortfolioQuery

QueryPortfolios queries the portfolios edge of a Account.

func (*AccountClient) Update

func (c *AccountClient) Update() *AccountUpdate

Update returns an update builder for Account.

func (*AccountClient) UpdateOne

func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AccountClient) UpdateOneID

func (c *AccountClient) UpdateOneID(id pulid.PULID) *AccountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AccountClient) Use

func (c *AccountClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `account.Hooks(f(g(h())))`.

type AccountConnection

type AccountConnection struct {
	Edges      []*AccountEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

AccountConnection is the connection containing edges to Account.

type AccountCreate

type AccountCreate struct {
	// contains filtered or unexported fields
}

AccountCreate is the builder for creating a Account entity.

func (*AccountCreate) AddAuthRoleIDs

func (ac *AccountCreate) AddAuthRoleIDs(ids ...pulid.PULID) *AccountCreate

AddAuthRoleIDs adds the "auth_roles" edge to the AuthRole entity by IDs.

func (*AccountCreate) AddAuthRoles

func (ac *AccountCreate) AddAuthRoles(a ...*AuthRole) *AccountCreate

AddAuthRoles adds the "auth_roles" edges to the AuthRole entity.

func (*AccountCreate) AddConnectionIDs

func (ac *AccountCreate) AddConnectionIDs(ids ...pulid.PULID) *AccountCreate

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*AccountCreate) AddConnections

func (ac *AccountCreate) AddConnections(c ...*Connection) *AccountCreate

AddConnections adds the "connections" edges to the Connection entity.

func (*AccountCreate) AddFriendIDs

func (ac *AccountCreate) AddFriendIDs(ids ...pulid.PULID) *AccountCreate

AddFriendIDs adds the "friends" edge to the Account entity by IDs.

func (*AccountCreate) AddFriends

func (ac *AccountCreate) AddFriends(a ...*Account) *AccountCreate

AddFriends adds the "friends" edges to the Account entity.

func (*AccountCreate) AddPortfolioIDs

func (ac *AccountCreate) AddPortfolioIDs(ids ...pulid.PULID) *AccountCreate

AddPortfolioIDs adds the "portfolios" edge to the Portfolio entity by IDs.

func (*AccountCreate) AddPortfolios

func (ac *AccountCreate) AddPortfolios(p ...*Portfolio) *AccountCreate

AddPortfolios adds the "portfolios" edges to the Portfolio entity.

func (*AccountCreate) Exec

func (ac *AccountCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountCreate) ExecX

func (ac *AccountCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AccountCreate) Mutation

func (ac *AccountCreate) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountCreate) Save

func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)

Save creates the Account in the database.

func (*AccountCreate) SaveX

func (ac *AccountCreate) SaveX(ctx context.Context) *Account

SaveX calls Save and panics if Save returns an error.

func (*AccountCreate) SetAuthType

func (ac *AccountCreate) SetAuthType(a *AuthType) *AccountCreate

SetAuthType sets the "auth_type" edge to the AuthType entity.

func (*AccountCreate) SetAuthTypeID

func (ac *AccountCreate) SetAuthTypeID(id pulid.PULID) *AccountCreate

SetAuthTypeID sets the "auth_type" edge to the AuthType entity by ID.

func (*AccountCreate) SetCreatedAt

func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate

SetCreatedAt sets the "created_at" field.

func (*AccountCreate) SetDeletedAt

func (ac *AccountCreate) SetDeletedAt(t time.Time) *AccountCreate

SetDeletedAt sets the "deleted_at" field.

func (*AccountCreate) SetEmail

func (ac *AccountCreate) SetEmail(s string) *AccountCreate

SetEmail sets the "email" field.

func (*AccountCreate) SetEmailConfirmed

func (ac *AccountCreate) SetEmailConfirmed(b bool) *AccountCreate

SetEmailConfirmed sets the "email_confirmed" field.

func (*AccountCreate) SetID

func (ac *AccountCreate) SetID(pu pulid.PULID) *AccountCreate

SetID sets the "id" field.

func (*AccountCreate) SetInput

SetInput applies the change-set in the CreateAccountInput on the AccountCreate builder.

func (*AccountCreate) SetNickname

func (ac *AccountCreate) SetNickname(s string) *AccountCreate

SetNickname sets the "nickname" field.

func (*AccountCreate) SetNillableCreatedAt

func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountCreate) SetNillableDeletedAt

func (ac *AccountCreate) SetNillableDeletedAt(t *time.Time) *AccountCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*AccountCreate) SetNillableEmailConfirmed

func (ac *AccountCreate) SetNillableEmailConfirmed(b *bool) *AccountCreate

SetNillableEmailConfirmed sets the "email_confirmed" field if the given value is not nil.

func (*AccountCreate) SetNillableID

func (ac *AccountCreate) SetNillableID(pu *pulid.PULID) *AccountCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AccountCreate) SetNillablePassword

func (ac *AccountCreate) SetNillablePassword(s *string) *AccountCreate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*AccountCreate) SetNillablePasswordUpdatedAt

func (ac *AccountCreate) SetNillablePasswordUpdatedAt(t *time.Time) *AccountCreate

SetNillablePasswordUpdatedAt sets the "password_updated_at" field if the given value is not nil.

func (*AccountCreate) SetNillableProfilePictureURL

func (ac *AccountCreate) SetNillableProfilePictureURL(s *string) *AccountCreate

SetNillableProfilePictureURL sets the "profile_picture_url" field if the given value is not nil.

func (*AccountCreate) SetNillableUpdatedAt

func (ac *AccountCreate) SetNillableUpdatedAt(t *time.Time) *AccountCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AccountCreate) SetPassword

func (ac *AccountCreate) SetPassword(s string) *AccountCreate

SetPassword sets the "password" field.

func (*AccountCreate) SetPasswordUpdatedAt

func (ac *AccountCreate) SetPasswordUpdatedAt(t time.Time) *AccountCreate

SetPasswordUpdatedAt sets the "password_updated_at" field.

func (*AccountCreate) SetProfilePictureURL

func (ac *AccountCreate) SetProfilePictureURL(s string) *AccountCreate

SetProfilePictureURL sets the "profile_picture_url" field.

func (*AccountCreate) SetUpdatedAt

func (ac *AccountCreate) SetUpdatedAt(t time.Time) *AccountCreate

SetUpdatedAt sets the "updated_at" field.

type AccountCreateBulk

type AccountCreateBulk struct {
	// contains filtered or unexported fields
}

AccountCreateBulk is the builder for creating many Account entities in bulk.

func (*AccountCreateBulk) Exec

func (acb *AccountCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountCreateBulk) ExecX

func (acb *AccountCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AccountCreateBulk) Save

func (acb *AccountCreateBulk) Save(ctx context.Context) ([]*Account, error)

Save creates the Account entities in the database.

func (*AccountCreateBulk) SaveX

func (acb *AccountCreateBulk) SaveX(ctx context.Context) []*Account

SaveX is like Save, but panics if an error occurs.

type AccountDelete

type AccountDelete struct {
	// contains filtered or unexported fields
}

AccountDelete is the builder for deleting a Account entity.

func (*AccountDelete) Exec

func (ad *AccountDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AccountDelete) ExecX

func (ad *AccountDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AccountDelete) Where

func (ad *AccountDelete) Where(ps ...predicate.Account) *AccountDelete

Where appends a list predicates to the AccountDelete builder.

type AccountDeleteOne

type AccountDeleteOne struct {
	// contains filtered or unexported fields
}

AccountDeleteOne is the builder for deleting a single Account entity.

func (*AccountDeleteOne) Exec

func (ado *AccountDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AccountDeleteOne) ExecX

func (ado *AccountDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type AccountEdge

type AccountEdge struct {
	Node   *Account `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

AccountEdge is the edge representation of Account.

type AccountEdges

type AccountEdges struct {
	// Friends holds the value of the friends edge.
	Friends []*Account `json:"friends,omitempty"`
	// AuthRoles holds the value of the auth_roles edge.
	AuthRoles []*AuthRole `json:"authRoles,omitempty"`
	// Portfolios holds the value of the portfolios edge.
	Portfolios []*Portfolio `json:"portfolios,omitempty"`
	// AuthType holds the value of the auth_type edge.
	AuthType *AuthType `json:"authType,omitempty"`
	// Connections holds the value of the connections edge.
	Connections []*Connection `json:"connections,omitempty"`
	// contains filtered or unexported fields
}

AccountEdges holds the relations/edges for other nodes in the graph.

func (AccountEdges) AuthRolesOrErr

func (e AccountEdges) AuthRolesOrErr() ([]*AuthRole, error)

AuthRolesOrErr returns the AuthRoles value or an error if the edge was not loaded in eager-loading.

func (AccountEdges) AuthTypeOrErr

func (e AccountEdges) AuthTypeOrErr() (*AuthType, error)

AuthTypeOrErr returns the AuthType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AccountEdges) ConnectionsOrErr

func (e AccountEdges) ConnectionsOrErr() ([]*Connection, error)

ConnectionsOrErr returns the Connections value or an error if the edge was not loaded in eager-loading.

func (AccountEdges) FriendsOrErr

func (e AccountEdges) FriendsOrErr() ([]*Account, error)

FriendsOrErr returns the Friends value or an error if the edge was not loaded in eager-loading.

func (AccountEdges) PortfoliosOrErr

func (e AccountEdges) PortfoliosOrErr() ([]*Portfolio, error)

PortfoliosOrErr returns the Portfolios value or an error if the edge was not loaded in eager-loading.

type AccountGroupBy

type AccountGroupBy struct {
	// contains filtered or unexported fields
}

AccountGroupBy is the group-by builder for Account entities.

func (*AccountGroupBy) Aggregate

func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AccountGroupBy) Bool

func (s *AccountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AccountGroupBy) BoolX

func (s *AccountGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AccountGroupBy) Bools

func (s *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AccountGroupBy) BoolsX

func (s *AccountGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AccountGroupBy) Float64

func (s *AccountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AccountGroupBy) Float64X

func (s *AccountGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AccountGroupBy) Float64s

func (s *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AccountGroupBy) Float64sX

func (s *AccountGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AccountGroupBy) Int

func (s *AccountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AccountGroupBy) IntX

func (s *AccountGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AccountGroupBy) Ints

func (s *AccountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AccountGroupBy) IntsX

func (s *AccountGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AccountGroupBy) Scan

func (agb *AccountGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*AccountGroupBy) ScanX

func (s *AccountGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AccountGroupBy) String

func (s *AccountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AccountGroupBy) StringX

func (s *AccountGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AccountGroupBy) Strings

func (s *AccountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AccountGroupBy) StringsX

func (s *AccountGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AccountMutation

type AccountMutation struct {
	// contains filtered or unexported fields
}

AccountMutation represents an operation that mutates the Account nodes in the graph.

func (*AccountMutation) AddAuthRoleIDs

func (m *AccountMutation) AddAuthRoleIDs(ids ...pulid.PULID)

AddAuthRoleIDs adds the "auth_roles" edge to the AuthRole entity by ids.

func (*AccountMutation) AddConnectionIDs

func (m *AccountMutation) AddConnectionIDs(ids ...pulid.PULID)

AddConnectionIDs adds the "connections" edge to the Connection entity by ids.

func (*AccountMutation) AddField

func (m *AccountMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AccountMutation) AddFriendIDs

func (m *AccountMutation) AddFriendIDs(ids ...pulid.PULID)

AddFriendIDs adds the "friends" edge to the Account entity by ids.

func (*AccountMutation) AddPortfolioIDs

func (m *AccountMutation) AddPortfolioIDs(ids ...pulid.PULID)

AddPortfolioIDs adds the "portfolios" edge to the Portfolio entity by ids.

func (*AccountMutation) AddedEdges

func (m *AccountMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AccountMutation) AddedField

func (m *AccountMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AccountMutation) AddedFields

func (m *AccountMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AccountMutation) AddedIDs

func (m *AccountMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AccountMutation) AuthRolesCleared

func (m *AccountMutation) AuthRolesCleared() bool

AuthRolesCleared reports if the "auth_roles" edge to the AuthRole entity was cleared.

func (*AccountMutation) AuthRolesIDs

func (m *AccountMutation) AuthRolesIDs() (ids []pulid.PULID)

AuthRolesIDs returns the "auth_roles" edge IDs in the mutation.

func (*AccountMutation) AuthTypeCleared

func (m *AccountMutation) AuthTypeCleared() bool

AuthTypeCleared reports if the "auth_type" edge to the AuthType entity was cleared.

func (*AccountMutation) AuthTypeID

func (m *AccountMutation) AuthTypeID() (id pulid.PULID, exists bool)

AuthTypeID returns the "auth_type" edge ID in the mutation.

func (*AccountMutation) AuthTypeIDs

func (m *AccountMutation) AuthTypeIDs() (ids []pulid.PULID)

AuthTypeIDs returns the "auth_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthTypeID instead. It exists only for internal usage by the builders.

func (*AccountMutation) ClearAuthRoles

func (m *AccountMutation) ClearAuthRoles()

ClearAuthRoles clears the "auth_roles" edge to the AuthRole entity.

func (*AccountMutation) ClearAuthType

func (m *AccountMutation) ClearAuthType()

ClearAuthType clears the "auth_type" edge to the AuthType entity.

func (*AccountMutation) ClearConnections

func (m *AccountMutation) ClearConnections()

ClearConnections clears the "connections" edge to the Connection entity.

func (*AccountMutation) ClearDeletedAt

func (m *AccountMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccountMutation) ClearEdge

func (m *AccountMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AccountMutation) ClearField

func (m *AccountMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AccountMutation) ClearFriends

func (m *AccountMutation) ClearFriends()

ClearFriends clears the "friends" edge to the Account entity.

func (*AccountMutation) ClearPassword

func (m *AccountMutation) ClearPassword()

ClearPassword clears the value of the "password" field.

func (*AccountMutation) ClearPasswordUpdatedAt

func (m *AccountMutation) ClearPasswordUpdatedAt()

ClearPasswordUpdatedAt clears the value of the "password_updated_at" field.

func (*AccountMutation) ClearPortfolios

func (m *AccountMutation) ClearPortfolios()

ClearPortfolios clears the "portfolios" edge to the Portfolio entity.

func (*AccountMutation) ClearProfilePictureURL

func (m *AccountMutation) ClearProfilePictureURL()

ClearProfilePictureURL clears the value of the "profile_picture_url" field.

func (*AccountMutation) ClearedEdges

func (m *AccountMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AccountMutation) ClearedFields

func (m *AccountMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AccountMutation) Client

func (m AccountMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AccountMutation) ConnectionsCleared

func (m *AccountMutation) ConnectionsCleared() bool

ConnectionsCleared reports if the "connections" edge to the Connection entity was cleared.

func (*AccountMutation) ConnectionsIDs

func (m *AccountMutation) ConnectionsIDs() (ids []pulid.PULID)

ConnectionsIDs returns the "connections" edge IDs in the mutation.

func (*AccountMutation) CreatedAt

func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AccountMutation) DeletedAt

func (m *AccountMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*AccountMutation) DeletedAtCleared

func (m *AccountMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*AccountMutation) EdgeCleared

func (m *AccountMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AccountMutation) Email

func (m *AccountMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*AccountMutation) EmailConfirmed

func (m *AccountMutation) EmailConfirmed() (r bool, exists bool)

EmailConfirmed returns the value of the "email_confirmed" field in the mutation.

func (*AccountMutation) Field

func (m *AccountMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AccountMutation) FieldCleared

func (m *AccountMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AccountMutation) Fields

func (m *AccountMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AccountMutation) FriendsCleared

func (m *AccountMutation) FriendsCleared() bool

FriendsCleared reports if the "friends" edge to the Account entity was cleared.

func (*AccountMutation) FriendsIDs

func (m *AccountMutation) FriendsIDs() (ids []pulid.PULID)

FriendsIDs returns the "friends" edge IDs in the mutation.

func (*AccountMutation) ID

func (m *AccountMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AccountMutation) IDs

func (m *AccountMutation) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AccountMutation) Nickname

func (m *AccountMutation) Nickname() (r string, exists bool)

Nickname returns the value of the "nickname" field in the mutation.

func (*AccountMutation) OldCreatedAt

func (m *AccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) OldDeletedAt

func (m *AccountMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) OldEmail

func (m *AccountMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) OldEmailConfirmed

func (m *AccountMutation) OldEmailConfirmed(ctx context.Context) (v bool, err error)

OldEmailConfirmed returns the old "email_confirmed" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) OldField

func (m *AccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AccountMutation) OldNickname

func (m *AccountMutation) OldNickname(ctx context.Context) (v string, err error)

OldNickname returns the old "nickname" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) OldPassword

func (m *AccountMutation) OldPassword(ctx context.Context) (v *string, err error)

OldPassword returns the old "password" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) OldPasswordUpdatedAt

func (m *AccountMutation) OldPasswordUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldPasswordUpdatedAt returns the old "password_updated_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) OldProfilePictureURL

func (m *AccountMutation) OldProfilePictureURL(ctx context.Context) (v *string, err error)

OldProfilePictureURL returns the old "profile_picture_url" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) OldUpdatedAt

func (m *AccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AccountMutation) Op

func (m *AccountMutation) Op() Op

Op returns the operation name.

func (*AccountMutation) Password

func (m *AccountMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*AccountMutation) PasswordCleared

func (m *AccountMutation) PasswordCleared() bool

PasswordCleared returns if the "password" field was cleared in this mutation.

func (*AccountMutation) PasswordUpdatedAt

func (m *AccountMutation) PasswordUpdatedAt() (r time.Time, exists bool)

PasswordUpdatedAt returns the value of the "password_updated_at" field in the mutation.

func (*AccountMutation) PasswordUpdatedAtCleared

func (m *AccountMutation) PasswordUpdatedAtCleared() bool

PasswordUpdatedAtCleared returns if the "password_updated_at" field was cleared in this mutation.

func (*AccountMutation) PortfoliosCleared

func (m *AccountMutation) PortfoliosCleared() bool

PortfoliosCleared reports if the "portfolios" edge to the Portfolio entity was cleared.

func (*AccountMutation) PortfoliosIDs

func (m *AccountMutation) PortfoliosIDs() (ids []pulid.PULID)

PortfoliosIDs returns the "portfolios" edge IDs in the mutation.

func (*AccountMutation) ProfilePictureURL

func (m *AccountMutation) ProfilePictureURL() (r string, exists bool)

ProfilePictureURL returns the value of the "profile_picture_url" field in the mutation.

func (*AccountMutation) ProfilePictureURLCleared

func (m *AccountMutation) ProfilePictureURLCleared() bool

ProfilePictureURLCleared returns if the "profile_picture_url" field was cleared in this mutation.

func (*AccountMutation) RemoveAuthRoleIDs

func (m *AccountMutation) RemoveAuthRoleIDs(ids ...pulid.PULID)

RemoveAuthRoleIDs removes the "auth_roles" edge to the AuthRole entity by IDs.

func (*AccountMutation) RemoveConnectionIDs

func (m *AccountMutation) RemoveConnectionIDs(ids ...pulid.PULID)

RemoveConnectionIDs removes the "connections" edge to the Connection entity by IDs.

func (*AccountMutation) RemoveFriendIDs

func (m *AccountMutation) RemoveFriendIDs(ids ...pulid.PULID)

RemoveFriendIDs removes the "friends" edge to the Account entity by IDs.

func (*AccountMutation) RemovePortfolioIDs

func (m *AccountMutation) RemovePortfolioIDs(ids ...pulid.PULID)

RemovePortfolioIDs removes the "portfolios" edge to the Portfolio entity by IDs.

func (*AccountMutation) RemovedAuthRolesIDs

func (m *AccountMutation) RemovedAuthRolesIDs() (ids []pulid.PULID)

RemovedAuthRoles returns the removed IDs of the "auth_roles" edge to the AuthRole entity.

func (*AccountMutation) RemovedConnectionsIDs

func (m *AccountMutation) RemovedConnectionsIDs() (ids []pulid.PULID)

RemovedConnections returns the removed IDs of the "connections" edge to the Connection entity.

func (*AccountMutation) RemovedEdges

func (m *AccountMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AccountMutation) RemovedFriendsIDs

func (m *AccountMutation) RemovedFriendsIDs() (ids []pulid.PULID)

RemovedFriends returns the removed IDs of the "friends" edge to the Account entity.

func (*AccountMutation) RemovedIDs

func (m *AccountMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AccountMutation) RemovedPortfoliosIDs

func (m *AccountMutation) RemovedPortfoliosIDs() (ids []pulid.PULID)

RemovedPortfolios returns the removed IDs of the "portfolios" edge to the Portfolio entity.

func (*AccountMutation) ResetAuthRoles

func (m *AccountMutation) ResetAuthRoles()

ResetAuthRoles resets all changes to the "auth_roles" edge.

func (*AccountMutation) ResetAuthType

func (m *AccountMutation) ResetAuthType()

ResetAuthType resets all changes to the "auth_type" edge.

func (*AccountMutation) ResetConnections

func (m *AccountMutation) ResetConnections()

ResetConnections resets all changes to the "connections" edge.

func (*AccountMutation) ResetCreatedAt

func (m *AccountMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AccountMutation) ResetDeletedAt

func (m *AccountMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*AccountMutation) ResetEdge

func (m *AccountMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AccountMutation) ResetEmail

func (m *AccountMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*AccountMutation) ResetEmailConfirmed

func (m *AccountMutation) ResetEmailConfirmed()

ResetEmailConfirmed resets all changes to the "email_confirmed" field.

func (*AccountMutation) ResetField

func (m *AccountMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AccountMutation) ResetFriends

func (m *AccountMutation) ResetFriends()

ResetFriends resets all changes to the "friends" edge.

func (*AccountMutation) ResetNickname

func (m *AccountMutation) ResetNickname()

ResetNickname resets all changes to the "nickname" field.

func (*AccountMutation) ResetPassword

func (m *AccountMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*AccountMutation) ResetPasswordUpdatedAt

func (m *AccountMutation) ResetPasswordUpdatedAt()

ResetPasswordUpdatedAt resets all changes to the "password_updated_at" field.

func (*AccountMutation) ResetPortfolios

func (m *AccountMutation) ResetPortfolios()

ResetPortfolios resets all changes to the "portfolios" edge.

func (*AccountMutation) ResetProfilePictureURL

func (m *AccountMutation) ResetProfilePictureURL()

ResetProfilePictureURL resets all changes to the "profile_picture_url" field.

func (*AccountMutation) ResetUpdatedAt

func (m *AccountMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AccountMutation) SetAuthTypeID

func (m *AccountMutation) SetAuthTypeID(id pulid.PULID)

SetAuthTypeID sets the "auth_type" edge to the AuthType entity by id.

func (*AccountMutation) SetCreatedAt

func (m *AccountMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AccountMutation) SetDeletedAt

func (m *AccountMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*AccountMutation) SetEmail

func (m *AccountMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*AccountMutation) SetEmailConfirmed

func (m *AccountMutation) SetEmailConfirmed(b bool)

SetEmailConfirmed sets the "email_confirmed" field.

func (*AccountMutation) SetField

func (m *AccountMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AccountMutation) SetID

func (m *AccountMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Account entities.

func (*AccountMutation) SetNickname

func (m *AccountMutation) SetNickname(s string)

SetNickname sets the "nickname" field.

func (*AccountMutation) SetPassword

func (m *AccountMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*AccountMutation) SetPasswordUpdatedAt

func (m *AccountMutation) SetPasswordUpdatedAt(t time.Time)

SetPasswordUpdatedAt sets the "password_updated_at" field.

func (*AccountMutation) SetProfilePictureURL

func (m *AccountMutation) SetProfilePictureURL(s string)

SetProfilePictureURL sets the "profile_picture_url" field.

func (*AccountMutation) SetUpdatedAt

func (m *AccountMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (AccountMutation) Tx

func (m AccountMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AccountMutation) Type

func (m *AccountMutation) Type() string

Type returns the node type of this mutation (Account).

func (*AccountMutation) UpdatedAt

func (m *AccountMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AccountMutation) Where

func (m *AccountMutation) Where(ps ...predicate.Account)

Where appends a list predicates to the AccountMutation builder.

type AccountOrder

type AccountOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *AccountOrderField `json:"field"`
}

AccountOrder defines the ordering of Account.

type AccountOrderField

type AccountOrderField struct {
	// contains filtered or unexported fields
}

AccountOrderField defines the ordering field of Account.

func (AccountOrderField) MarshalGQL

func (f AccountOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AccountOrderField) String

func (f AccountOrderField) String() string

String implement fmt.Stringer interface.

func (*AccountOrderField) UnmarshalGQL

func (f *AccountOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AccountPaginateOption

type AccountPaginateOption func(*accountPager) error

AccountPaginateOption enables pagination customization.

func WithAccountFilter

func WithAccountFilter(filter func(*AccountQuery) (*AccountQuery, error)) AccountPaginateOption

WithAccountFilter configures pagination filter.

func WithAccountOrder

func WithAccountOrder(order *AccountOrder) AccountPaginateOption

WithAccountOrder configures pagination ordering.

type AccountQuery

type AccountQuery struct {
	// contains filtered or unexported fields
}

AccountQuery is the builder for querying Account entities.

func (*AccountQuery) All

func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)

All executes the query and returns a list of Accounts.

func (*AccountQuery) AllX

func (aq *AccountQuery) AllX(ctx context.Context) []*Account

AllX is like All, but panics if an error occurs.

func (*AccountQuery) Clone

func (aq *AccountQuery) Clone() *AccountQuery

Clone returns a duplicate of the AccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AccountQuery) CollectFields

func (a *AccountQuery) CollectFields(ctx context.Context, satisfies ...string) (*AccountQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AccountQuery) Count

func (aq *AccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AccountQuery) CountX

func (aq *AccountQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AccountQuery) Exist

func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AccountQuery) ExistX

func (aq *AccountQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AccountQuery) First

func (aq *AccountQuery) First(ctx context.Context) (*Account, error)

First returns the first Account entity from the query. Returns a *NotFoundError when no Account was found.

func (*AccountQuery) FirstID

func (aq *AccountQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Account ID from the query. Returns a *NotFoundError when no Account ID was found.

func (*AccountQuery) FirstIDX

func (aq *AccountQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*AccountQuery) FirstX

func (aq *AccountQuery) FirstX(ctx context.Context) *Account

FirstX is like First, but panics if an error occurs.

func (*AccountQuery) GroupBy

func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Account.Query().
	GroupBy(account.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AccountQuery) IDs

func (aq *AccountQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Account IDs.

func (*AccountQuery) IDsX

func (aq *AccountQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*AccountQuery) Limit

func (aq *AccountQuery) Limit(limit int) *AccountQuery

Limit adds a limit step to the query.

func (*AccountQuery) Offset

func (aq *AccountQuery) Offset(offset int) *AccountQuery

Offset adds an offset step to the query.

func (*AccountQuery) Only

func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)

Only returns a single Account entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Account entity is found. Returns a *NotFoundError when no Account entities are found.

func (*AccountQuery) OnlyID

func (aq *AccountQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Account ID in the query. Returns a *NotSingularError when more than one Account ID is found. Returns a *NotFoundError when no entities are found.

func (*AccountQuery) OnlyIDX

func (aq *AccountQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AccountQuery) OnlyX

func (aq *AccountQuery) OnlyX(ctx context.Context) *Account

OnlyX is like Only, but panics if an error occurs.

func (*AccountQuery) Order

func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery

Order adds an order step to the query.

func (*AccountQuery) Paginate

func (a *AccountQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AccountPaginateOption,
) (*AccountConnection, error)

Paginate executes the query and returns a relay based cursor connection to Account.

func (*AccountQuery) QueryAuthRoles

func (aq *AccountQuery) QueryAuthRoles() *AuthRoleQuery

QueryAuthRoles chains the current query on the "auth_roles" edge.

func (*AccountQuery) QueryAuthType

func (aq *AccountQuery) QueryAuthType() *AuthTypeQuery

QueryAuthType chains the current query on the "auth_type" edge.

func (*AccountQuery) QueryConnections

func (aq *AccountQuery) QueryConnections() *ConnectionQuery

QueryConnections chains the current query on the "connections" edge.

func (*AccountQuery) QueryFriends

func (aq *AccountQuery) QueryFriends() *AccountQuery

QueryFriends chains the current query on the "friends" edge.

func (*AccountQuery) QueryPortfolios

func (aq *AccountQuery) QueryPortfolios() *PortfolioQuery

QueryPortfolios chains the current query on the "portfolios" edge.

func (*AccountQuery) Select

func (aq *AccountQuery) Select(fields ...string) *AccountSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Account.Query().
	Select(account.FieldCreatedAt).
	Scan(ctx, &v)

func (*AccountQuery) Unique

func (aq *AccountQuery) Unique(unique bool) *AccountQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AccountQuery) Where

func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery

Where adds a new predicate for the AccountQuery builder.

func (*AccountQuery) WithAuthRoles

func (aq *AccountQuery) WithAuthRoles(opts ...func(*AuthRoleQuery)) *AccountQuery

WithAuthRoles tells the query-builder to eager-load the nodes that are connected to the "auth_roles" edge. The optional arguments are used to configure the query builder of the edge.

func (*AccountQuery) WithAuthType

func (aq *AccountQuery) WithAuthType(opts ...func(*AuthTypeQuery)) *AccountQuery

WithAuthType tells the query-builder to eager-load the nodes that are connected to the "auth_type" edge. The optional arguments are used to configure the query builder of the edge.

func (*AccountQuery) WithConnections

func (aq *AccountQuery) WithConnections(opts ...func(*ConnectionQuery)) *AccountQuery

WithConnections tells the query-builder to eager-load the nodes that are connected to the "connections" edge. The optional arguments are used to configure the query builder of the edge.

func (*AccountQuery) WithFriends

func (aq *AccountQuery) WithFriends(opts ...func(*AccountQuery)) *AccountQuery

WithFriends tells the query-builder to eager-load the nodes that are connected to the "friends" edge. The optional arguments are used to configure the query builder of the edge.

func (*AccountQuery) WithNamedAuthRoles

func (aq *AccountQuery) WithNamedAuthRoles(name string, opts ...func(*AuthRoleQuery)) *AccountQuery

WithNamedAuthRoles tells the query-builder to eager-load the nodes that are connected to the "auth_roles" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AccountQuery) WithNamedConnections

func (aq *AccountQuery) WithNamedConnections(name string, opts ...func(*ConnectionQuery)) *AccountQuery

WithNamedConnections tells the query-builder to eager-load the nodes that are connected to the "connections" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AccountQuery) WithNamedFriends

func (aq *AccountQuery) WithNamedFriends(name string, opts ...func(*AccountQuery)) *AccountQuery

WithNamedFriends tells the query-builder to eager-load the nodes that are connected to the "friends" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AccountQuery) WithNamedPortfolios

func (aq *AccountQuery) WithNamedPortfolios(name string, opts ...func(*PortfolioQuery)) *AccountQuery

WithNamedPortfolios tells the query-builder to eager-load the nodes that are connected to the "portfolios" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AccountQuery) WithPortfolios

func (aq *AccountQuery) WithPortfolios(opts ...func(*PortfolioQuery)) *AccountQuery

WithPortfolios tells the query-builder to eager-load the nodes that are connected to the "portfolios" edge. The optional arguments are used to configure the query builder of the edge.

type AccountSelect

type AccountSelect struct {
	*AccountQuery
	// contains filtered or unexported fields
}

AccountSelect is the builder for selecting fields of Account entities.

func (*AccountSelect) Bool

func (s *AccountSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AccountSelect) BoolX

func (s *AccountSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AccountSelect) Bools

func (s *AccountSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AccountSelect) BoolsX

func (s *AccountSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AccountSelect) Float64

func (s *AccountSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AccountSelect) Float64X

func (s *AccountSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AccountSelect) Float64s

func (s *AccountSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AccountSelect) Float64sX

func (s *AccountSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AccountSelect) Int

func (s *AccountSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AccountSelect) IntX

func (s *AccountSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AccountSelect) Ints

func (s *AccountSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AccountSelect) IntsX

func (s *AccountSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AccountSelect) Scan

func (as *AccountSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AccountSelect) ScanX

func (s *AccountSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AccountSelect) String

func (s *AccountSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AccountSelect) StringX

func (s *AccountSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AccountSelect) Strings

func (s *AccountSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AccountSelect) StringsX

func (s *AccountSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AccountUpdate

type AccountUpdate struct {
	// contains filtered or unexported fields
}

AccountUpdate is the builder for updating Account entities.

func (*AccountUpdate) AddAuthRoleIDs

func (au *AccountUpdate) AddAuthRoleIDs(ids ...pulid.PULID) *AccountUpdate

AddAuthRoleIDs adds the "auth_roles" edge to the AuthRole entity by IDs.

func (*AccountUpdate) AddAuthRoles

func (au *AccountUpdate) AddAuthRoles(a ...*AuthRole) *AccountUpdate

AddAuthRoles adds the "auth_roles" edges to the AuthRole entity.

func (*AccountUpdate) AddConnectionIDs

func (au *AccountUpdate) AddConnectionIDs(ids ...pulid.PULID) *AccountUpdate

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*AccountUpdate) AddConnections

func (au *AccountUpdate) AddConnections(c ...*Connection) *AccountUpdate

AddConnections adds the "connections" edges to the Connection entity.

func (*AccountUpdate) AddFriendIDs

func (au *AccountUpdate) AddFriendIDs(ids ...pulid.PULID) *AccountUpdate

AddFriendIDs adds the "friends" edge to the Account entity by IDs.

func (*AccountUpdate) AddFriends

func (au *AccountUpdate) AddFriends(a ...*Account) *AccountUpdate

AddFriends adds the "friends" edges to the Account entity.

func (*AccountUpdate) AddPortfolioIDs

func (au *AccountUpdate) AddPortfolioIDs(ids ...pulid.PULID) *AccountUpdate

AddPortfolioIDs adds the "portfolios" edge to the Portfolio entity by IDs.

func (*AccountUpdate) AddPortfolios

func (au *AccountUpdate) AddPortfolios(p ...*Portfolio) *AccountUpdate

AddPortfolios adds the "portfolios" edges to the Portfolio entity.

func (*AccountUpdate) ClearAuthRoles

func (au *AccountUpdate) ClearAuthRoles() *AccountUpdate

ClearAuthRoles clears all "auth_roles" edges to the AuthRole entity.

func (*AccountUpdate) ClearAuthType

func (au *AccountUpdate) ClearAuthType() *AccountUpdate

ClearAuthType clears the "auth_type" edge to the AuthType entity.

func (*AccountUpdate) ClearConnections

func (au *AccountUpdate) ClearConnections() *AccountUpdate

ClearConnections clears all "connections" edges to the Connection entity.

func (*AccountUpdate) ClearDeletedAt

func (au *AccountUpdate) ClearDeletedAt() *AccountUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccountUpdate) ClearFriends

func (au *AccountUpdate) ClearFriends() *AccountUpdate

ClearFriends clears all "friends" edges to the Account entity.

func (*AccountUpdate) ClearPassword

func (au *AccountUpdate) ClearPassword() *AccountUpdate

ClearPassword clears the value of the "password" field.

func (*AccountUpdate) ClearPasswordUpdatedAt

func (au *AccountUpdate) ClearPasswordUpdatedAt() *AccountUpdate

ClearPasswordUpdatedAt clears the value of the "password_updated_at" field.

func (*AccountUpdate) ClearPortfolios

func (au *AccountUpdate) ClearPortfolios() *AccountUpdate

ClearPortfolios clears all "portfolios" edges to the Portfolio entity.

func (*AccountUpdate) ClearProfilePictureURL

func (au *AccountUpdate) ClearProfilePictureURL() *AccountUpdate

ClearProfilePictureURL clears the value of the "profile_picture_url" field.

func (*AccountUpdate) Exec

func (au *AccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountUpdate) ExecX

func (au *AccountUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AccountUpdate) Mutation

func (au *AccountUpdate) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountUpdate) RemoveAuthRoleIDs

func (au *AccountUpdate) RemoveAuthRoleIDs(ids ...pulid.PULID) *AccountUpdate

RemoveAuthRoleIDs removes the "auth_roles" edge to AuthRole entities by IDs.

func (*AccountUpdate) RemoveAuthRoles

func (au *AccountUpdate) RemoveAuthRoles(a ...*AuthRole) *AccountUpdate

RemoveAuthRoles removes "auth_roles" edges to AuthRole entities.

func (*AccountUpdate) RemoveConnectionIDs

func (au *AccountUpdate) RemoveConnectionIDs(ids ...pulid.PULID) *AccountUpdate

RemoveConnectionIDs removes the "connections" edge to Connection entities by IDs.

func (*AccountUpdate) RemoveConnections

func (au *AccountUpdate) RemoveConnections(c ...*Connection) *AccountUpdate

RemoveConnections removes "connections" edges to Connection entities.

func (*AccountUpdate) RemoveFriendIDs

func (au *AccountUpdate) RemoveFriendIDs(ids ...pulid.PULID) *AccountUpdate

RemoveFriendIDs removes the "friends" edge to Account entities by IDs.

func (*AccountUpdate) RemoveFriends

func (au *AccountUpdate) RemoveFriends(a ...*Account) *AccountUpdate

RemoveFriends removes "friends" edges to Account entities.

func (*AccountUpdate) RemovePortfolioIDs

func (au *AccountUpdate) RemovePortfolioIDs(ids ...pulid.PULID) *AccountUpdate

RemovePortfolioIDs removes the "portfolios" edge to Portfolio entities by IDs.

func (*AccountUpdate) RemovePortfolios

func (au *AccountUpdate) RemovePortfolios(p ...*Portfolio) *AccountUpdate

RemovePortfolios removes "portfolios" edges to Portfolio entities.

func (*AccountUpdate) Save

func (au *AccountUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AccountUpdate) SaveX

func (au *AccountUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AccountUpdate) SetAuthType

func (au *AccountUpdate) SetAuthType(a *AuthType) *AccountUpdate

SetAuthType sets the "auth_type" edge to the AuthType entity.

func (*AccountUpdate) SetAuthTypeID

func (au *AccountUpdate) SetAuthTypeID(id pulid.PULID) *AccountUpdate

SetAuthTypeID sets the "auth_type" edge to the AuthType entity by ID.

func (*AccountUpdate) SetDeletedAt

func (au *AccountUpdate) SetDeletedAt(t time.Time) *AccountUpdate

SetDeletedAt sets the "deleted_at" field.

func (*AccountUpdate) SetEmail

func (au *AccountUpdate) SetEmail(s string) *AccountUpdate

SetEmail sets the "email" field.

func (*AccountUpdate) SetEmailConfirmed

func (au *AccountUpdate) SetEmailConfirmed(b bool) *AccountUpdate

SetEmailConfirmed sets the "email_confirmed" field.

func (*AccountUpdate) SetInput

SetInput applies the change-set in the UpdateAccountInput on the AccountUpdate builder.

func (*AccountUpdate) SetNickname

func (au *AccountUpdate) SetNickname(s string) *AccountUpdate

SetNickname sets the "nickname" field.

func (*AccountUpdate) SetNillableEmailConfirmed

func (au *AccountUpdate) SetNillableEmailConfirmed(b *bool) *AccountUpdate

SetNillableEmailConfirmed sets the "email_confirmed" field if the given value is not nil.

func (*AccountUpdate) SetNillablePassword

func (au *AccountUpdate) SetNillablePassword(s *string) *AccountUpdate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*AccountUpdate) SetNillableProfilePictureURL

func (au *AccountUpdate) SetNillableProfilePictureURL(s *string) *AccountUpdate

SetNillableProfilePictureURL sets the "profile_picture_url" field if the given value is not nil.

func (*AccountUpdate) SetPassword

func (au *AccountUpdate) SetPassword(s string) *AccountUpdate

SetPassword sets the "password" field.

func (*AccountUpdate) SetPasswordUpdatedAt

func (au *AccountUpdate) SetPasswordUpdatedAt(t time.Time) *AccountUpdate

SetPasswordUpdatedAt sets the "password_updated_at" field.

func (*AccountUpdate) SetProfilePictureURL

func (au *AccountUpdate) SetProfilePictureURL(s string) *AccountUpdate

SetProfilePictureURL sets the "profile_picture_url" field.

func (*AccountUpdate) SetUpdatedAt

func (au *AccountUpdate) SetUpdatedAt(t time.Time) *AccountUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AccountUpdate) Where

func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate

Where appends a list predicates to the AccountUpdate builder.

type AccountUpdateOne

type AccountUpdateOne struct {
	// contains filtered or unexported fields
}

AccountUpdateOne is the builder for updating a single Account entity.

func (*AccountUpdateOne) AddAuthRoleIDs

func (auo *AccountUpdateOne) AddAuthRoleIDs(ids ...pulid.PULID) *AccountUpdateOne

AddAuthRoleIDs adds the "auth_roles" edge to the AuthRole entity by IDs.

func (*AccountUpdateOne) AddAuthRoles

func (auo *AccountUpdateOne) AddAuthRoles(a ...*AuthRole) *AccountUpdateOne

AddAuthRoles adds the "auth_roles" edges to the AuthRole entity.

func (*AccountUpdateOne) AddConnectionIDs

func (auo *AccountUpdateOne) AddConnectionIDs(ids ...pulid.PULID) *AccountUpdateOne

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*AccountUpdateOne) AddConnections

func (auo *AccountUpdateOne) AddConnections(c ...*Connection) *AccountUpdateOne

AddConnections adds the "connections" edges to the Connection entity.

func (*AccountUpdateOne) AddFriendIDs

func (auo *AccountUpdateOne) AddFriendIDs(ids ...pulid.PULID) *AccountUpdateOne

AddFriendIDs adds the "friends" edge to the Account entity by IDs.

func (*AccountUpdateOne) AddFriends

func (auo *AccountUpdateOne) AddFriends(a ...*Account) *AccountUpdateOne

AddFriends adds the "friends" edges to the Account entity.

func (*AccountUpdateOne) AddPortfolioIDs

func (auo *AccountUpdateOne) AddPortfolioIDs(ids ...pulid.PULID) *AccountUpdateOne

AddPortfolioIDs adds the "portfolios" edge to the Portfolio entity by IDs.

func (*AccountUpdateOne) AddPortfolios

func (auo *AccountUpdateOne) AddPortfolios(p ...*Portfolio) *AccountUpdateOne

AddPortfolios adds the "portfolios" edges to the Portfolio entity.

func (*AccountUpdateOne) ClearAuthRoles

func (auo *AccountUpdateOne) ClearAuthRoles() *AccountUpdateOne

ClearAuthRoles clears all "auth_roles" edges to the AuthRole entity.

func (*AccountUpdateOne) ClearAuthType

func (auo *AccountUpdateOne) ClearAuthType() *AccountUpdateOne

ClearAuthType clears the "auth_type" edge to the AuthType entity.

func (*AccountUpdateOne) ClearConnections

func (auo *AccountUpdateOne) ClearConnections() *AccountUpdateOne

ClearConnections clears all "connections" edges to the Connection entity.

func (*AccountUpdateOne) ClearDeletedAt

func (auo *AccountUpdateOne) ClearDeletedAt() *AccountUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccountUpdateOne) ClearFriends

func (auo *AccountUpdateOne) ClearFriends() *AccountUpdateOne

ClearFriends clears all "friends" edges to the Account entity.

func (*AccountUpdateOne) ClearPassword

func (auo *AccountUpdateOne) ClearPassword() *AccountUpdateOne

ClearPassword clears the value of the "password" field.

func (*AccountUpdateOne) ClearPasswordUpdatedAt

func (auo *AccountUpdateOne) ClearPasswordUpdatedAt() *AccountUpdateOne

ClearPasswordUpdatedAt clears the value of the "password_updated_at" field.

func (*AccountUpdateOne) ClearPortfolios

func (auo *AccountUpdateOne) ClearPortfolios() *AccountUpdateOne

ClearPortfolios clears all "portfolios" edges to the Portfolio entity.

func (*AccountUpdateOne) ClearProfilePictureURL

func (auo *AccountUpdateOne) ClearProfilePictureURL() *AccountUpdateOne

ClearProfilePictureURL clears the value of the "profile_picture_url" field.

func (*AccountUpdateOne) Exec

func (auo *AccountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AccountUpdateOne) ExecX

func (auo *AccountUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AccountUpdateOne) Mutation

func (auo *AccountUpdateOne) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountUpdateOne) RemoveAuthRoleIDs

func (auo *AccountUpdateOne) RemoveAuthRoleIDs(ids ...pulid.PULID) *AccountUpdateOne

RemoveAuthRoleIDs removes the "auth_roles" edge to AuthRole entities by IDs.

func (*AccountUpdateOne) RemoveAuthRoles

func (auo *AccountUpdateOne) RemoveAuthRoles(a ...*AuthRole) *AccountUpdateOne

RemoveAuthRoles removes "auth_roles" edges to AuthRole entities.

func (*AccountUpdateOne) RemoveConnectionIDs

func (auo *AccountUpdateOne) RemoveConnectionIDs(ids ...pulid.PULID) *AccountUpdateOne

RemoveConnectionIDs removes the "connections" edge to Connection entities by IDs.

func (*AccountUpdateOne) RemoveConnections

func (auo *AccountUpdateOne) RemoveConnections(c ...*Connection) *AccountUpdateOne

RemoveConnections removes "connections" edges to Connection entities.

func (*AccountUpdateOne) RemoveFriendIDs

func (auo *AccountUpdateOne) RemoveFriendIDs(ids ...pulid.PULID) *AccountUpdateOne

RemoveFriendIDs removes the "friends" edge to Account entities by IDs.

func (*AccountUpdateOne) RemoveFriends

func (auo *AccountUpdateOne) RemoveFriends(a ...*Account) *AccountUpdateOne

RemoveFriends removes "friends" edges to Account entities.

func (*AccountUpdateOne) RemovePortfolioIDs

func (auo *AccountUpdateOne) RemovePortfolioIDs(ids ...pulid.PULID) *AccountUpdateOne

RemovePortfolioIDs removes the "portfolios" edge to Portfolio entities by IDs.

func (*AccountUpdateOne) RemovePortfolios

func (auo *AccountUpdateOne) RemovePortfolios(p ...*Portfolio) *AccountUpdateOne

RemovePortfolios removes "portfolios" edges to Portfolio entities.

func (*AccountUpdateOne) Save

func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)

Save executes the query and returns the updated Account entity.

func (*AccountUpdateOne) SaveX

func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account

SaveX is like Save, but panics if an error occurs.

func (*AccountUpdateOne) Select

func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AccountUpdateOne) SetAuthType

func (auo *AccountUpdateOne) SetAuthType(a *AuthType) *AccountUpdateOne

SetAuthType sets the "auth_type" edge to the AuthType entity.

func (*AccountUpdateOne) SetAuthTypeID

func (auo *AccountUpdateOne) SetAuthTypeID(id pulid.PULID) *AccountUpdateOne

SetAuthTypeID sets the "auth_type" edge to the AuthType entity by ID.

func (*AccountUpdateOne) SetDeletedAt

func (auo *AccountUpdateOne) SetDeletedAt(t time.Time) *AccountUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*AccountUpdateOne) SetEmail

func (auo *AccountUpdateOne) SetEmail(s string) *AccountUpdateOne

SetEmail sets the "email" field.

func (*AccountUpdateOne) SetEmailConfirmed

func (auo *AccountUpdateOne) SetEmailConfirmed(b bool) *AccountUpdateOne

SetEmailConfirmed sets the "email_confirmed" field.

func (*AccountUpdateOne) SetInput

SetInput applies the change-set in the UpdateAccountInput on the AccountUpdateOne builder.

func (*AccountUpdateOne) SetNickname

func (auo *AccountUpdateOne) SetNickname(s string) *AccountUpdateOne

SetNickname sets the "nickname" field.

func (*AccountUpdateOne) SetNillableEmailConfirmed

func (auo *AccountUpdateOne) SetNillableEmailConfirmed(b *bool) *AccountUpdateOne

SetNillableEmailConfirmed sets the "email_confirmed" field if the given value is not nil.

func (*AccountUpdateOne) SetNillablePassword

func (auo *AccountUpdateOne) SetNillablePassword(s *string) *AccountUpdateOne

SetNillablePassword sets the "password" field if the given value is not nil.

func (*AccountUpdateOne) SetNillableProfilePictureURL

func (auo *AccountUpdateOne) SetNillableProfilePictureURL(s *string) *AccountUpdateOne

SetNillableProfilePictureURL sets the "profile_picture_url" field if the given value is not nil.

func (*AccountUpdateOne) SetPassword

func (auo *AccountUpdateOne) SetPassword(s string) *AccountUpdateOne

SetPassword sets the "password" field.

func (*AccountUpdateOne) SetPasswordUpdatedAt

func (auo *AccountUpdateOne) SetPasswordUpdatedAt(t time.Time) *AccountUpdateOne

SetPasswordUpdatedAt sets the "password_updated_at" field.

func (*AccountUpdateOne) SetProfilePictureURL

func (auo *AccountUpdateOne) SetProfilePictureURL(s string) *AccountUpdateOne

SetProfilePictureURL sets the "profile_picture_url" field.

func (*AccountUpdateOne) SetUpdatedAt

func (auo *AccountUpdateOne) SetUpdatedAt(t time.Time) *AccountUpdateOne

SetUpdatedAt sets the "updated_at" field.

type AccountWhereInput

type AccountWhereInput struct {
	Predicates []predicate.Account  `json:"-"`
	Not        *AccountWhereInput   `json:"not,omitempty"`
	Or         []*AccountWhereInput `json:"or,omitempty"`
	And        []*AccountWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "nickname" field predicates.
	Nickname             *string  `json:"nickname,omitempty"`
	NicknameNEQ          *string  `json:"nicknameNEQ,omitempty"`
	NicknameIn           []string `json:"nicknameIn,omitempty"`
	NicknameNotIn        []string `json:"nicknameNotIn,omitempty"`
	NicknameGT           *string  `json:"nicknameGT,omitempty"`
	NicknameGTE          *string  `json:"nicknameGTE,omitempty"`
	NicknameLT           *string  `json:"nicknameLT,omitempty"`
	NicknameLTE          *string  `json:"nicknameLTE,omitempty"`
	NicknameContains     *string  `json:"nicknameContains,omitempty"`
	NicknameHasPrefix    *string  `json:"nicknameHasPrefix,omitempty"`
	NicknameHasSuffix    *string  `json:"nicknameHasSuffix,omitempty"`
	NicknameEqualFold    *string  `json:"nicknameEqualFold,omitempty"`
	NicknameContainsFold *string  `json:"nicknameContainsFold,omitempty"`

	// "email" field predicates.
	Email             *string  `json:"email,omitempty"`
	EmailNEQ          *string  `json:"emailNEQ,omitempty"`
	EmailIn           []string `json:"emailIn,omitempty"`
	EmailNotIn        []string `json:"emailNotIn,omitempty"`
	EmailGT           *string  `json:"emailGT,omitempty"`
	EmailGTE          *string  `json:"emailGTE,omitempty"`
	EmailLT           *string  `json:"emailLT,omitempty"`
	EmailLTE          *string  `json:"emailLTE,omitempty"`
	EmailContains     *string  `json:"emailContains,omitempty"`
	EmailHasPrefix    *string  `json:"emailHasPrefix,omitempty"`
	EmailHasSuffix    *string  `json:"emailHasSuffix,omitempty"`
	EmailEqualFold    *string  `json:"emailEqualFold,omitempty"`
	EmailContainsFold *string  `json:"emailContainsFold,omitempty"`

	// "email_confirmed" field predicates.
	EmailConfirmed    *bool `json:"emailConfirmed,omitempty"`
	EmailConfirmedNEQ *bool `json:"emailConfirmedNEQ,omitempty"`

	// "password_updated_at" field predicates.
	PasswordUpdatedAt       *time.Time  `json:"passwordUpdatedAt,omitempty"`
	PasswordUpdatedAtNEQ    *time.Time  `json:"passwordUpdatedAtNEQ,omitempty"`
	PasswordUpdatedAtIn     []time.Time `json:"passwordUpdatedAtIn,omitempty"`
	PasswordUpdatedAtNotIn  []time.Time `json:"passwordUpdatedAtNotIn,omitempty"`
	PasswordUpdatedAtGT     *time.Time  `json:"passwordUpdatedAtGT,omitempty"`
	PasswordUpdatedAtGTE    *time.Time  `json:"passwordUpdatedAtGTE,omitempty"`
	PasswordUpdatedAtLT     *time.Time  `json:"passwordUpdatedAtLT,omitempty"`
	PasswordUpdatedAtLTE    *time.Time  `json:"passwordUpdatedAtLTE,omitempty"`
	PasswordUpdatedAtIsNil  bool        `json:"passwordUpdatedAtIsNil,omitempty"`
	PasswordUpdatedAtNotNil bool        `json:"passwordUpdatedAtNotNil,omitempty"`

	// "friends" edge predicates.
	HasFriends     *bool                `json:"hasFriends,omitempty"`
	HasFriendsWith []*AccountWhereInput `json:"hasFriendsWith,omitempty"`

	// "auth_roles" edge predicates.
	HasAuthRoles     *bool                 `json:"hasAuthRoles,omitempty"`
	HasAuthRolesWith []*AuthRoleWhereInput `json:"hasAuthRolesWith,omitempty"`

	// "portfolios" edge predicates.
	HasPortfolios     *bool                  `json:"hasPortfolios,omitempty"`
	HasPortfoliosWith []*PortfolioWhereInput `json:"hasPortfoliosWith,omitempty"`

	// "auth_type" edge predicates.
	HasAuthType     *bool                 `json:"hasAuthType,omitempty"`
	HasAuthTypeWith []*AuthTypeWhereInput `json:"hasAuthTypeWith,omitempty"`
}

AccountWhereInput represents a where input for filtering Account queries.

func (*AccountWhereInput) AddPredicates

func (i *AccountWhereInput) AddPredicates(predicates ...predicate.Account)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AccountWhereInput) Filter

Filter applies the AccountWhereInput filter on the AccountQuery builder.

func (*AccountWhereInput) P

P returns a predicate for filtering accounts. An error is returned if the input is empty or invalid.

type Accounts

type Accounts []*Account

Accounts is a parsable slice of Account.

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Asset

type Asset struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AssetQuery when eager-loading is set.
	Edges AssetEdges `json:"edges"`
	// contains filtered or unexported fields
}

Asset is the model entity for the Asset schema.

func (*Asset) AssetClass

func (a *Asset) AssetClass(ctx context.Context) (*AssetClass, error)

func (*Asset) Cryptocurrency

func (a *Asset) Cryptocurrency(ctx context.Context) (*Cryptocurrency, error)

func (*Asset) DailyAssetPrices

func (a *Asset) DailyAssetPrices(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *DailyAssetPriceOrder,
) (*DailyAssetPriceConnection, error)

func (*Asset) NamedDailyAssetPrices

func (a *Asset) NamedDailyAssetPrices(name string) ([]*DailyAssetPrice, error)

NamedDailyAssetPrices returns the DailyAssetPrices named value or an error if the edge was not loaded in eager-loading with this name.

func (*Asset) Node

func (a *Asset) Node(ctx context.Context) (node *Node, err error)

func (*Asset) QueryAssetClass

func (a *Asset) QueryAssetClass() *AssetClassQuery

QueryAssetClass queries the "asset_class" edge of the Asset entity.

func (*Asset) QueryCryptocurrency

func (a *Asset) QueryCryptocurrency() *CryptocurrencyQuery

QueryCryptocurrency queries the "cryptocurrency" edge of the Asset entity.

func (*Asset) QueryDailyAssetPrices

func (a *Asset) QueryDailyAssetPrices() *DailyAssetPriceQuery

QueryDailyAssetPrices queries the "daily_asset_prices" edge of the Asset entity.

func (*Asset) String

func (a *Asset) String() string

String implements the fmt.Stringer.

func (*Asset) ToEdge

func (a *Asset) ToEdge(order *AssetOrder) *AssetEdge

ToEdge converts Asset into AssetEdge.

func (*Asset) Unwrap

func (a *Asset) Unwrap() *Asset

Unwrap unwraps the Asset entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Asset) Update

func (a *Asset) Update() *AssetUpdateOne

Update returns a builder for updating this Asset. Note that you need to call Asset.Unwrap() before calling this method if this Asset was returned from a transaction, and the transaction was committed or rolled back.

type AssetClass

type AssetClass struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Value holds the value of the "value" field.
	Value assetclass.Value `json:"value,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// contains filtered or unexported fields
}

AssetClass is the model entity for the AssetClass schema.

func (*AssetClass) Node

func (ac *AssetClass) Node(ctx context.Context) (node *Node, err error)

func (*AssetClass) String

func (ac *AssetClass) String() string

String implements the fmt.Stringer.

func (*AssetClass) ToEdge

func (ac *AssetClass) ToEdge(order *AssetClassOrder) *AssetClassEdge

ToEdge converts AssetClass into AssetClassEdge.

func (*AssetClass) Unwrap

func (ac *AssetClass) Unwrap() *AssetClass

Unwrap unwraps the AssetClass entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AssetClass) Update

func (ac *AssetClass) Update() *AssetClassUpdateOne

Update returns a builder for updating this AssetClass. Note that you need to call AssetClass.Unwrap() before calling this method if this AssetClass was returned from a transaction, and the transaction was committed or rolled back.

type AssetClassClient

type AssetClassClient struct {
	// contains filtered or unexported fields
}

AssetClassClient is a client for the AssetClass schema.

func NewAssetClassClient

func NewAssetClassClient(c config) *AssetClassClient

NewAssetClassClient returns a client for the AssetClass from the given config.

func (*AssetClassClient) Create

func (c *AssetClassClient) Create() *AssetClassCreate

Create returns a builder for creating a AssetClass entity.

func (*AssetClassClient) CreateBulk

func (c *AssetClassClient) CreateBulk(builders ...*AssetClassCreate) *AssetClassCreateBulk

CreateBulk returns a builder for creating a bulk of AssetClass entities.

func (*AssetClassClient) Delete

func (c *AssetClassClient) Delete() *AssetClassDelete

Delete returns a delete builder for AssetClass.

func (*AssetClassClient) DeleteOne

func (c *AssetClassClient) DeleteOne(ac *AssetClass) *AssetClassDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AssetClassClient) DeleteOneID

func (c *AssetClassClient) DeleteOneID(id pulid.PULID) *AssetClassDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*AssetClassClient) Get

Get returns a AssetClass entity by its id.

func (*AssetClassClient) GetX

GetX is like Get, but panics if an error occurs.

func (*AssetClassClient) Hooks

func (c *AssetClassClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AssetClassClient) Query

func (c *AssetClassClient) Query() *AssetClassQuery

Query returns a query builder for AssetClass.

func (*AssetClassClient) Update

func (c *AssetClassClient) Update() *AssetClassUpdate

Update returns an update builder for AssetClass.

func (*AssetClassClient) UpdateOne

func (c *AssetClassClient) UpdateOne(ac *AssetClass) *AssetClassUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AssetClassClient) UpdateOneID

func (c *AssetClassClient) UpdateOneID(id pulid.PULID) *AssetClassUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AssetClassClient) Use

func (c *AssetClassClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `assetclass.Hooks(f(g(h())))`.

type AssetClassConnection

type AssetClassConnection struct {
	Edges      []*AssetClassEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

AssetClassConnection is the connection containing edges to AssetClass.

type AssetClassCreate

type AssetClassCreate struct {
	// contains filtered or unexported fields
}

AssetClassCreate is the builder for creating a AssetClass entity.

func (*AssetClassCreate) Exec

func (acc *AssetClassCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AssetClassCreate) ExecX

func (acc *AssetClassCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AssetClassCreate) Mutation

func (acc *AssetClassCreate) Mutation() *AssetClassMutation

Mutation returns the AssetClassMutation object of the builder.

func (*AssetClassCreate) Save

func (acc *AssetClassCreate) Save(ctx context.Context) (*AssetClass, error)

Save creates the AssetClass in the database.

func (*AssetClassCreate) SaveX

func (acc *AssetClassCreate) SaveX(ctx context.Context) *AssetClass

SaveX calls Save and panics if Save returns an error.

func (*AssetClassCreate) SetCreatedAt

func (acc *AssetClassCreate) SetCreatedAt(t time.Time) *AssetClassCreate

SetCreatedAt sets the "created_at" field.

func (*AssetClassCreate) SetDeletedAt

func (acc *AssetClassCreate) SetDeletedAt(t time.Time) *AssetClassCreate

SetDeletedAt sets the "deleted_at" field.

func (*AssetClassCreate) SetDescription

func (acc *AssetClassCreate) SetDescription(s string) *AssetClassCreate

SetDescription sets the "description" field.

func (*AssetClassCreate) SetID

func (acc *AssetClassCreate) SetID(pu pulid.PULID) *AssetClassCreate

SetID sets the "id" field.

func (*AssetClassCreate) SetInput

SetInput applies the change-set in the CreateAssetClassInput on the AssetClassCreate builder.

func (*AssetClassCreate) SetNillableCreatedAt

func (acc *AssetClassCreate) SetNillableCreatedAt(t *time.Time) *AssetClassCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AssetClassCreate) SetNillableDeletedAt

func (acc *AssetClassCreate) SetNillableDeletedAt(t *time.Time) *AssetClassCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*AssetClassCreate) SetNillableDescription

func (acc *AssetClassCreate) SetNillableDescription(s *string) *AssetClassCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AssetClassCreate) SetNillableID

func (acc *AssetClassCreate) SetNillableID(pu *pulid.PULID) *AssetClassCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AssetClassCreate) SetNillableUpdatedAt

func (acc *AssetClassCreate) SetNillableUpdatedAt(t *time.Time) *AssetClassCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AssetClassCreate) SetUpdatedAt

func (acc *AssetClassCreate) SetUpdatedAt(t time.Time) *AssetClassCreate

SetUpdatedAt sets the "updated_at" field.

func (*AssetClassCreate) SetValue

SetValue sets the "value" field.

type AssetClassCreateBulk

type AssetClassCreateBulk struct {
	// contains filtered or unexported fields
}

AssetClassCreateBulk is the builder for creating many AssetClass entities in bulk.

func (*AssetClassCreateBulk) Exec

func (accb *AssetClassCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AssetClassCreateBulk) ExecX

func (accb *AssetClassCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AssetClassCreateBulk) Save

func (accb *AssetClassCreateBulk) Save(ctx context.Context) ([]*AssetClass, error)

Save creates the AssetClass entities in the database.

func (*AssetClassCreateBulk) SaveX

func (accb *AssetClassCreateBulk) SaveX(ctx context.Context) []*AssetClass

SaveX is like Save, but panics if an error occurs.

type AssetClassDelete

type AssetClassDelete struct {
	// contains filtered or unexported fields
}

AssetClassDelete is the builder for deleting a AssetClass entity.

func (*AssetClassDelete) Exec

func (acd *AssetClassDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AssetClassDelete) ExecX

func (acd *AssetClassDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AssetClassDelete) Where

Where appends a list predicates to the AssetClassDelete builder.

type AssetClassDeleteOne

type AssetClassDeleteOne struct {
	// contains filtered or unexported fields
}

AssetClassDeleteOne is the builder for deleting a single AssetClass entity.

func (*AssetClassDeleteOne) Exec

func (acdo *AssetClassDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AssetClassDeleteOne) ExecX

func (acdo *AssetClassDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type AssetClassEdge

type AssetClassEdge struct {
	Node   *AssetClass `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

AssetClassEdge is the edge representation of AssetClass.

type AssetClassGroupBy

type AssetClassGroupBy struct {
	// contains filtered or unexported fields
}

AssetClassGroupBy is the group-by builder for AssetClass entities.

func (*AssetClassGroupBy) Aggregate

func (acgb *AssetClassGroupBy) Aggregate(fns ...AggregateFunc) *AssetClassGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AssetClassGroupBy) Bool

func (s *AssetClassGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AssetClassGroupBy) BoolX

func (s *AssetClassGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AssetClassGroupBy) Bools

func (s *AssetClassGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AssetClassGroupBy) BoolsX

func (s *AssetClassGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AssetClassGroupBy) Float64

func (s *AssetClassGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AssetClassGroupBy) Float64X

func (s *AssetClassGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AssetClassGroupBy) Float64s

func (s *AssetClassGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AssetClassGroupBy) Float64sX

func (s *AssetClassGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AssetClassGroupBy) Int

func (s *AssetClassGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AssetClassGroupBy) IntX

func (s *AssetClassGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AssetClassGroupBy) Ints

func (s *AssetClassGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AssetClassGroupBy) IntsX

func (s *AssetClassGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AssetClassGroupBy) Scan

func (acgb *AssetClassGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*AssetClassGroupBy) ScanX

func (s *AssetClassGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AssetClassGroupBy) String

func (s *AssetClassGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AssetClassGroupBy) StringX

func (s *AssetClassGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AssetClassGroupBy) Strings

func (s *AssetClassGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AssetClassGroupBy) StringsX

func (s *AssetClassGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AssetClassMutation

type AssetClassMutation struct {
	// contains filtered or unexported fields
}

AssetClassMutation represents an operation that mutates the AssetClass nodes in the graph.

func (*AssetClassMutation) AddField

func (m *AssetClassMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AssetClassMutation) AddedEdges

func (m *AssetClassMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AssetClassMutation) AddedField

func (m *AssetClassMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AssetClassMutation) AddedFields

func (m *AssetClassMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AssetClassMutation) AddedIDs

func (m *AssetClassMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AssetClassMutation) ClearDeletedAt

func (m *AssetClassMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AssetClassMutation) ClearDescription

func (m *AssetClassMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*AssetClassMutation) ClearEdge

func (m *AssetClassMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AssetClassMutation) ClearField

func (m *AssetClassMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AssetClassMutation) ClearedEdges

func (m *AssetClassMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AssetClassMutation) ClearedFields

func (m *AssetClassMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AssetClassMutation) Client

func (m AssetClassMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AssetClassMutation) CreatedAt

func (m *AssetClassMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AssetClassMutation) DeletedAt

func (m *AssetClassMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*AssetClassMutation) DeletedAtCleared

func (m *AssetClassMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*AssetClassMutation) Description

func (m *AssetClassMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*AssetClassMutation) DescriptionCleared

func (m *AssetClassMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*AssetClassMutation) EdgeCleared

func (m *AssetClassMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AssetClassMutation) Field

func (m *AssetClassMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AssetClassMutation) FieldCleared

func (m *AssetClassMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AssetClassMutation) Fields

func (m *AssetClassMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AssetClassMutation) ID

func (m *AssetClassMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AssetClassMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AssetClassMutation) OldCreatedAt

func (m *AssetClassMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AssetClass entity. If the AssetClass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AssetClassMutation) OldDeletedAt

func (m *AssetClassMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the AssetClass entity. If the AssetClass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AssetClassMutation) OldDescription

func (m *AssetClassMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" field's value of the AssetClass entity. If the AssetClass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AssetClassMutation) OldField

func (m *AssetClassMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AssetClassMutation) OldUpdatedAt

func (m *AssetClassMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AssetClass entity. If the AssetClass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AssetClassMutation) OldValue

func (m *AssetClassMutation) OldValue(ctx context.Context) (v assetclass.Value, err error)

OldValue returns the old "value" field's value of the AssetClass entity. If the AssetClass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AssetClassMutation) Op

func (m *AssetClassMutation) Op() Op

Op returns the operation name.

func (*AssetClassMutation) RemovedEdges

func (m *AssetClassMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AssetClassMutation) RemovedIDs

func (m *AssetClassMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AssetClassMutation) ResetCreatedAt

func (m *AssetClassMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AssetClassMutation) ResetDeletedAt

func (m *AssetClassMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*AssetClassMutation) ResetDescription

func (m *AssetClassMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*AssetClassMutation) ResetEdge

func (m *AssetClassMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AssetClassMutation) ResetField

func (m *AssetClassMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AssetClassMutation) ResetUpdatedAt

func (m *AssetClassMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AssetClassMutation) ResetValue

func (m *AssetClassMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*AssetClassMutation) SetCreatedAt

func (m *AssetClassMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AssetClassMutation) SetDeletedAt

func (m *AssetClassMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*AssetClassMutation) SetDescription

func (m *AssetClassMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*AssetClassMutation) SetField

func (m *AssetClassMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AssetClassMutation) SetID

func (m *AssetClassMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AssetClass entities.

func (*AssetClassMutation) SetUpdatedAt

func (m *AssetClassMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AssetClassMutation) SetValue

func (m *AssetClassMutation) SetValue(a assetclass.Value)

SetValue sets the "value" field.

func (AssetClassMutation) Tx

func (m AssetClassMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AssetClassMutation) Type

func (m *AssetClassMutation) Type() string

Type returns the node type of this mutation (AssetClass).

func (*AssetClassMutation) UpdatedAt

func (m *AssetClassMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AssetClassMutation) Value

func (m *AssetClassMutation) Value() (r assetclass.Value, exists bool)

Value returns the value of the "value" field in the mutation.

func (*AssetClassMutation) Where

func (m *AssetClassMutation) Where(ps ...predicate.AssetClass)

Where appends a list predicates to the AssetClassMutation builder.

type AssetClassOrder

type AssetClassOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *AssetClassOrderField `json:"field"`
}

AssetClassOrder defines the ordering of AssetClass.

type AssetClassOrderField

type AssetClassOrderField struct {
	// contains filtered or unexported fields
}

AssetClassOrderField defines the ordering field of AssetClass.

func (AssetClassOrderField) MarshalGQL

func (f AssetClassOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AssetClassOrderField) String

func (f AssetClassOrderField) String() string

String implement fmt.Stringer interface.

func (*AssetClassOrderField) UnmarshalGQL

func (f *AssetClassOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AssetClassPaginateOption

type AssetClassPaginateOption func(*assetclassPager) error

AssetClassPaginateOption enables pagination customization.

func WithAssetClassFilter

func WithAssetClassFilter(filter func(*AssetClassQuery) (*AssetClassQuery, error)) AssetClassPaginateOption

WithAssetClassFilter configures pagination filter.

func WithAssetClassOrder

func WithAssetClassOrder(order *AssetClassOrder) AssetClassPaginateOption

WithAssetClassOrder configures pagination ordering.

type AssetClassQuery

type AssetClassQuery struct {
	// contains filtered or unexported fields
}

AssetClassQuery is the builder for querying AssetClass entities.

func (*AssetClassQuery) All

func (acq *AssetClassQuery) All(ctx context.Context) ([]*AssetClass, error)

All executes the query and returns a list of AssetClasses.

func (*AssetClassQuery) AllX

func (acq *AssetClassQuery) AllX(ctx context.Context) []*AssetClass

AllX is like All, but panics if an error occurs.

func (*AssetClassQuery) Clone

func (acq *AssetClassQuery) Clone() *AssetClassQuery

Clone returns a duplicate of the AssetClassQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AssetClassQuery) CollectFields

func (ac *AssetClassQuery) CollectFields(ctx context.Context, satisfies ...string) (*AssetClassQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AssetClassQuery) Count

func (acq *AssetClassQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AssetClassQuery) CountX

func (acq *AssetClassQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AssetClassQuery) Exist

func (acq *AssetClassQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AssetClassQuery) ExistX

func (acq *AssetClassQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AssetClassQuery) First

func (acq *AssetClassQuery) First(ctx context.Context) (*AssetClass, error)

First returns the first AssetClass entity from the query. Returns a *NotFoundError when no AssetClass was found.

func (*AssetClassQuery) FirstID

func (acq *AssetClassQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first AssetClass ID from the query. Returns a *NotFoundError when no AssetClass ID was found.

func (*AssetClassQuery) FirstIDX

func (acq *AssetClassQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*AssetClassQuery) FirstX

func (acq *AssetClassQuery) FirstX(ctx context.Context) *AssetClass

FirstX is like First, but panics if an error occurs.

func (*AssetClassQuery) GroupBy

func (acq *AssetClassQuery) GroupBy(field string, fields ...string) *AssetClassGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AssetClass.Query().
	GroupBy(assetclass.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AssetClassQuery) IDs

func (acq *AssetClassQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of AssetClass IDs.

func (*AssetClassQuery) IDsX

func (acq *AssetClassQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*AssetClassQuery) Limit

func (acq *AssetClassQuery) Limit(limit int) *AssetClassQuery

Limit adds a limit step to the query.

func (*AssetClassQuery) Offset

func (acq *AssetClassQuery) Offset(offset int) *AssetClassQuery

Offset adds an offset step to the query.

func (*AssetClassQuery) Only

func (acq *AssetClassQuery) Only(ctx context.Context) (*AssetClass, error)

Only returns a single AssetClass entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AssetClass entity is found. Returns a *NotFoundError when no AssetClass entities are found.

func (*AssetClassQuery) OnlyID

func (acq *AssetClassQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only AssetClass ID in the query. Returns a *NotSingularError when more than one AssetClass ID is found. Returns a *NotFoundError when no entities are found.

func (*AssetClassQuery) OnlyIDX

func (acq *AssetClassQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AssetClassQuery) OnlyX

func (acq *AssetClassQuery) OnlyX(ctx context.Context) *AssetClass

OnlyX is like Only, but panics if an error occurs.

func (*AssetClassQuery) Order

func (acq *AssetClassQuery) Order(o ...OrderFunc) *AssetClassQuery

Order adds an order step to the query.

func (*AssetClassQuery) Paginate

func (ac *AssetClassQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AssetClassPaginateOption,
) (*AssetClassConnection, error)

Paginate executes the query and returns a relay based cursor connection to AssetClass.

func (*AssetClassQuery) Select

func (acq *AssetClassQuery) Select(fields ...string) *AssetClassSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.AssetClass.Query().
	Select(assetclass.FieldCreatedAt).
	Scan(ctx, &v)

func (*AssetClassQuery) Unique

func (acq *AssetClassQuery) Unique(unique bool) *AssetClassQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AssetClassQuery) Where

Where adds a new predicate for the AssetClassQuery builder.

type AssetClassSelect

type AssetClassSelect struct {
	*AssetClassQuery
	// contains filtered or unexported fields
}

AssetClassSelect is the builder for selecting fields of AssetClass entities.

func (*AssetClassSelect) Bool

func (s *AssetClassSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AssetClassSelect) BoolX

func (s *AssetClassSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AssetClassSelect) Bools

func (s *AssetClassSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AssetClassSelect) BoolsX

func (s *AssetClassSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AssetClassSelect) Float64

func (s *AssetClassSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AssetClassSelect) Float64X

func (s *AssetClassSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AssetClassSelect) Float64s

func (s *AssetClassSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AssetClassSelect) Float64sX

func (s *AssetClassSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AssetClassSelect) Int

func (s *AssetClassSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AssetClassSelect) IntX

func (s *AssetClassSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AssetClassSelect) Ints

func (s *AssetClassSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AssetClassSelect) IntsX

func (s *AssetClassSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AssetClassSelect) Scan

func (acs *AssetClassSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AssetClassSelect) ScanX

func (s *AssetClassSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AssetClassSelect) String

func (s *AssetClassSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AssetClassSelect) StringX

func (s *AssetClassSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AssetClassSelect) Strings

func (s *AssetClassSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AssetClassSelect) StringsX

func (s *AssetClassSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AssetClassUpdate

type AssetClassUpdate struct {
	// contains filtered or unexported fields
}

AssetClassUpdate is the builder for updating AssetClass entities.

func (*AssetClassUpdate) ClearDeletedAt

func (acu *AssetClassUpdate) ClearDeletedAt() *AssetClassUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AssetClassUpdate) ClearDescription

func (acu *AssetClassUpdate) ClearDescription() *AssetClassUpdate

ClearDescription clears the value of the "description" field.

func (*AssetClassUpdate) Exec

func (acu *AssetClassUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AssetClassUpdate) ExecX

func (acu *AssetClassUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AssetClassUpdate) Mutation

func (acu *AssetClassUpdate) Mutation() *AssetClassMutation

Mutation returns the AssetClassMutation object of the builder.

func (*AssetClassUpdate) Save

func (acu *AssetClassUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AssetClassUpdate) SaveX

func (acu *AssetClassUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AssetClassUpdate) SetDeletedAt

func (acu *AssetClassUpdate) SetDeletedAt(t time.Time) *AssetClassUpdate

SetDeletedAt sets the "deleted_at" field.

func (*AssetClassUpdate) SetDescription

func (acu *AssetClassUpdate) SetDescription(s string) *AssetClassUpdate

SetDescription sets the "description" field.

func (*AssetClassUpdate) SetInput

SetInput applies the change-set in the UpdateAssetClassInput on the AssetClassUpdate builder.

func (*AssetClassUpdate) SetNillableDescription

func (acu *AssetClassUpdate) SetNillableDescription(s *string) *AssetClassUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AssetClassUpdate) SetUpdatedAt

func (acu *AssetClassUpdate) SetUpdatedAt(t time.Time) *AssetClassUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AssetClassUpdate) SetValue

SetValue sets the "value" field.

func (*AssetClassUpdate) Where

Where appends a list predicates to the AssetClassUpdate builder.

type AssetClassUpdateOne

type AssetClassUpdateOne struct {
	// contains filtered or unexported fields
}

AssetClassUpdateOne is the builder for updating a single AssetClass entity.

func (*AssetClassUpdateOne) ClearDeletedAt

func (acuo *AssetClassUpdateOne) ClearDeletedAt() *AssetClassUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AssetClassUpdateOne) ClearDescription

func (acuo *AssetClassUpdateOne) ClearDescription() *AssetClassUpdateOne

ClearDescription clears the value of the "description" field.

func (*AssetClassUpdateOne) Exec

func (acuo *AssetClassUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AssetClassUpdateOne) ExecX

func (acuo *AssetClassUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AssetClassUpdateOne) Mutation

func (acuo *AssetClassUpdateOne) Mutation() *AssetClassMutation

Mutation returns the AssetClassMutation object of the builder.

func (*AssetClassUpdateOne) Save

func (acuo *AssetClassUpdateOne) Save(ctx context.Context) (*AssetClass, error)

Save executes the query and returns the updated AssetClass entity.

func (*AssetClassUpdateOne) SaveX

func (acuo *AssetClassUpdateOne) SaveX(ctx context.Context) *AssetClass

SaveX is like Save, but panics if an error occurs.

func (*AssetClassUpdateOne) Select

func (acuo *AssetClassUpdateOne) Select(field string, fields ...string) *AssetClassUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AssetClassUpdateOne) SetDeletedAt

func (acuo *AssetClassUpdateOne) SetDeletedAt(t time.Time) *AssetClassUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*AssetClassUpdateOne) SetDescription

func (acuo *AssetClassUpdateOne) SetDescription(s string) *AssetClassUpdateOne

SetDescription sets the "description" field.

func (*AssetClassUpdateOne) SetInput

SetInput applies the change-set in the UpdateAssetClassInput on the AssetClassUpdateOne builder.

func (*AssetClassUpdateOne) SetNillableDescription

func (acuo *AssetClassUpdateOne) SetNillableDescription(s *string) *AssetClassUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AssetClassUpdateOne) SetUpdatedAt

func (acuo *AssetClassUpdateOne) SetUpdatedAt(t time.Time) *AssetClassUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AssetClassUpdateOne) SetValue

SetValue sets the "value" field.

type AssetClassWhereInput

type AssetClassWhereInput struct {
	Predicates []predicate.AssetClass  `json:"-"`
	Not        *AssetClassWhereInput   `json:"not,omitempty"`
	Or         []*AssetClassWhereInput `json:"or,omitempty"`
	And        []*AssetClassWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "value" field predicates.
	Value      *assetclass.Value  `json:"value,omitempty"`
	ValueNEQ   *assetclass.Value  `json:"valueNEQ,omitempty"`
	ValueIn    []assetclass.Value `json:"valueIn,omitempty"`
	ValueNotIn []assetclass.Value `json:"valueNotIn,omitempty"`

	// "description" field predicates.
	Description             *string  `json:"description,omitempty"`
	DescriptionNEQ          *string  `json:"descriptionNEQ,omitempty"`
	DescriptionIn           []string `json:"descriptionIn,omitempty"`
	DescriptionNotIn        []string `json:"descriptionNotIn,omitempty"`
	DescriptionGT           *string  `json:"descriptionGT,omitempty"`
	DescriptionGTE          *string  `json:"descriptionGTE,omitempty"`
	DescriptionLT           *string  `json:"descriptionLT,omitempty"`
	DescriptionLTE          *string  `json:"descriptionLTE,omitempty"`
	DescriptionContains     *string  `json:"descriptionContains,omitempty"`
	DescriptionHasPrefix    *string  `json:"descriptionHasPrefix,omitempty"`
	DescriptionHasSuffix    *string  `json:"descriptionHasSuffix,omitempty"`
	DescriptionIsNil        bool     `json:"descriptionIsNil,omitempty"`
	DescriptionNotNil       bool     `json:"descriptionNotNil,omitempty"`
	DescriptionEqualFold    *string  `json:"descriptionEqualFold,omitempty"`
	DescriptionContainsFold *string  `json:"descriptionContainsFold,omitempty"`
}

AssetClassWhereInput represents a where input for filtering AssetClass queries.

func (*AssetClassWhereInput) AddPredicates

func (i *AssetClassWhereInput) AddPredicates(predicates ...predicate.AssetClass)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AssetClassWhereInput) Filter

Filter applies the AssetClassWhereInput filter on the AssetClassQuery builder.

func (*AssetClassWhereInput) P

P returns a predicate for filtering assetclasses. An error is returned if the input is empty or invalid.

type AssetClasses

type AssetClasses []*AssetClass

AssetClasses is a parsable slice of AssetClass.

type AssetClient

type AssetClient struct {
	// contains filtered or unexported fields
}

AssetClient is a client for the Asset schema.

func NewAssetClient

func NewAssetClient(c config) *AssetClient

NewAssetClient returns a client for the Asset from the given config.

func (*AssetClient) Create

func (c *AssetClient) Create() *AssetCreate

Create returns a builder for creating a Asset entity.

func (*AssetClient) CreateBulk

func (c *AssetClient) CreateBulk(builders ...*AssetCreate) *AssetCreateBulk

CreateBulk returns a builder for creating a bulk of Asset entities.

func (*AssetClient) Delete

func (c *AssetClient) Delete() *AssetDelete

Delete returns a delete builder for Asset.

func (*AssetClient) DeleteOne

func (c *AssetClient) DeleteOne(a *Asset) *AssetDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AssetClient) DeleteOneID

func (c *AssetClient) DeleteOneID(id pulid.PULID) *AssetDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*AssetClient) Get

func (c *AssetClient) Get(ctx context.Context, id pulid.PULID) (*Asset, error)

Get returns a Asset entity by its id.

func (*AssetClient) GetX

func (c *AssetClient) GetX(ctx context.Context, id pulid.PULID) *Asset

GetX is like Get, but panics if an error occurs.

func (*AssetClient) Hooks

func (c *AssetClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AssetClient) Query

func (c *AssetClient) Query() *AssetQuery

Query returns a query builder for Asset.

func (*AssetClient) QueryAssetClass

func (c *AssetClient) QueryAssetClass(a *Asset) *AssetClassQuery

QueryAssetClass queries the asset_class edge of a Asset.

func (*AssetClient) QueryCryptocurrency

func (c *AssetClient) QueryCryptocurrency(a *Asset) *CryptocurrencyQuery

QueryCryptocurrency queries the cryptocurrency edge of a Asset.

func (*AssetClient) QueryDailyAssetPrices

func (c *AssetClient) QueryDailyAssetPrices(a *Asset) *DailyAssetPriceQuery

QueryDailyAssetPrices queries the daily_asset_prices edge of a Asset.

func (*AssetClient) Update

func (c *AssetClient) Update() *AssetUpdate

Update returns an update builder for Asset.

func (*AssetClient) UpdateOne

func (c *AssetClient) UpdateOne(a *Asset) *AssetUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AssetClient) UpdateOneID

func (c *AssetClient) UpdateOneID(id pulid.PULID) *AssetUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AssetClient) Use

func (c *AssetClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `asset.Hooks(f(g(h())))`.

type AssetConnection

type AssetConnection struct {
	Edges      []*AssetEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

AssetConnection is the connection containing edges to Asset.

type AssetCreate

type AssetCreate struct {
	// contains filtered or unexported fields
}

AssetCreate is the builder for creating a Asset entity.

func (*AssetCreate) AddDailyAssetPriceIDs

func (ac *AssetCreate) AddDailyAssetPriceIDs(ids ...pulid.PULID) *AssetCreate

AddDailyAssetPriceIDs adds the "daily_asset_prices" edge to the DailyAssetPrice entity by IDs.

func (*AssetCreate) AddDailyAssetPrices

func (ac *AssetCreate) AddDailyAssetPrices(d ...*DailyAssetPrice) *AssetCreate

AddDailyAssetPrices adds the "daily_asset_prices" edges to the DailyAssetPrice entity.

func (*AssetCreate) Exec

func (ac *AssetCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AssetCreate) ExecX

func (ac *AssetCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AssetCreate) Mutation

func (ac *AssetCreate) Mutation() *AssetMutation

Mutation returns the AssetMutation object of the builder.

func (*AssetCreate) Save

func (ac *AssetCreate) Save(ctx context.Context) (*Asset, error)

Save creates the Asset in the database.

func (*AssetCreate) SaveX

func (ac *AssetCreate) SaveX(ctx context.Context) *Asset

SaveX calls Save and panics if Save returns an error.

func (*AssetCreate) SetAssetClass

func (ac *AssetCreate) SetAssetClass(a *AssetClass) *AssetCreate

SetAssetClass sets the "asset_class" edge to the AssetClass entity.

func (*AssetCreate) SetAssetClassID

func (ac *AssetCreate) SetAssetClassID(id pulid.PULID) *AssetCreate

SetAssetClassID sets the "asset_class" edge to the AssetClass entity by ID.

func (*AssetCreate) SetCreatedAt

func (ac *AssetCreate) SetCreatedAt(t time.Time) *AssetCreate

SetCreatedAt sets the "created_at" field.

func (*AssetCreate) SetCryptocurrency

func (ac *AssetCreate) SetCryptocurrency(c *Cryptocurrency) *AssetCreate

SetCryptocurrency sets the "cryptocurrency" edge to the Cryptocurrency entity.

func (*AssetCreate) SetCryptocurrencyID

func (ac *AssetCreate) SetCryptocurrencyID(id pulid.PULID) *AssetCreate

SetCryptocurrencyID sets the "cryptocurrency" edge to the Cryptocurrency entity by ID.

func (*AssetCreate) SetDeletedAt

func (ac *AssetCreate) SetDeletedAt(t time.Time) *AssetCreate

SetDeletedAt sets the "deleted_at" field.

func (*AssetCreate) SetID

func (ac *AssetCreate) SetID(pu pulid.PULID) *AssetCreate

SetID sets the "id" field.

func (*AssetCreate) SetNillableCreatedAt

func (ac *AssetCreate) SetNillableCreatedAt(t *time.Time) *AssetCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AssetCreate) SetNillableCryptocurrencyID

func (ac *AssetCreate) SetNillableCryptocurrencyID(id *pulid.PULID) *AssetCreate

SetNillableCryptocurrencyID sets the "cryptocurrency" edge to the Cryptocurrency entity by ID if the given value is not nil.

func (*AssetCreate) SetNillableDeletedAt

func (ac *AssetCreate) SetNillableDeletedAt(t *time.Time) *AssetCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*AssetCreate) SetNillableID

func (ac *AssetCreate) SetNillableID(pu *pulid.PULID) *AssetCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AssetCreate) SetNillableUpdatedAt

func (ac *AssetCreate) SetNillableUpdatedAt(t *time.Time) *AssetCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AssetCreate) SetUpdatedAt

func (ac *AssetCreate) SetUpdatedAt(t time.Time) *AssetCreate

SetUpdatedAt sets the "updated_at" field.

type AssetCreateBulk

type AssetCreateBulk struct {
	// contains filtered or unexported fields
}

AssetCreateBulk is the builder for creating many Asset entities in bulk.

func (*AssetCreateBulk) Exec

func (acb *AssetCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AssetCreateBulk) ExecX

func (acb *AssetCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AssetCreateBulk) Save

func (acb *AssetCreateBulk) Save(ctx context.Context) ([]*Asset, error)

Save creates the Asset entities in the database.

func (*AssetCreateBulk) SaveX

func (acb *AssetCreateBulk) SaveX(ctx context.Context) []*Asset

SaveX is like Save, but panics if an error occurs.

type AssetDelete

type AssetDelete struct {
	// contains filtered or unexported fields
}

AssetDelete is the builder for deleting a Asset entity.

func (*AssetDelete) Exec

func (ad *AssetDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AssetDelete) ExecX

func (ad *AssetDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AssetDelete) Where

func (ad *AssetDelete) Where(ps ...predicate.Asset) *AssetDelete

Where appends a list predicates to the AssetDelete builder.

type AssetDeleteOne

type AssetDeleteOne struct {
	// contains filtered or unexported fields
}

AssetDeleteOne is the builder for deleting a single Asset entity.

func (*AssetDeleteOne) Exec

func (ado *AssetDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AssetDeleteOne) ExecX

func (ado *AssetDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type AssetEdge

type AssetEdge struct {
	Node   *Asset `json:"node"`
	Cursor Cursor `json:"cursor"`
}

AssetEdge is the edge representation of Asset.

type AssetEdges

type AssetEdges struct {
	// AssetClass holds the value of the asset_class edge.
	AssetClass *AssetClass `json:"assetClass,omitempty"`
	// Cryptocurrency holds the value of the cryptocurrency edge.
	Cryptocurrency *Cryptocurrency `json:"cryptocurrency,omitempty"`
	// DailyAssetPrices holds the value of the daily_asset_prices edge.
	DailyAssetPrices []*DailyAssetPrice `json:"dailyAssetPrices,omitempty"`
	// contains filtered or unexported fields
}

AssetEdges holds the relations/edges for other nodes in the graph.

func (AssetEdges) AssetClassOrErr

func (e AssetEdges) AssetClassOrErr() (*AssetClass, error)

AssetClassOrErr returns the AssetClass value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AssetEdges) CryptocurrencyOrErr

func (e AssetEdges) CryptocurrencyOrErr() (*Cryptocurrency, error)

CryptocurrencyOrErr returns the Cryptocurrency value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AssetEdges) DailyAssetPricesOrErr

func (e AssetEdges) DailyAssetPricesOrErr() ([]*DailyAssetPrice, error)

DailyAssetPricesOrErr returns the DailyAssetPrices value or an error if the edge was not loaded in eager-loading.

type AssetGroupBy

type AssetGroupBy struct {
	// contains filtered or unexported fields
}

AssetGroupBy is the group-by builder for Asset entities.

func (*AssetGroupBy) Aggregate

func (agb *AssetGroupBy) Aggregate(fns ...AggregateFunc) *AssetGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AssetGroupBy) Bool

func (s *AssetGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AssetGroupBy) BoolX

func (s *AssetGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AssetGroupBy) Bools

func (s *AssetGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AssetGroupBy) BoolsX

func (s *AssetGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AssetGroupBy) Float64

func (s *AssetGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AssetGroupBy) Float64X

func (s *AssetGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AssetGroupBy) Float64s

func (s *AssetGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AssetGroupBy) Float64sX

func (s *AssetGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AssetGroupBy) Int

func (s *AssetGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AssetGroupBy) IntX

func (s *AssetGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AssetGroupBy) Ints

func (s *AssetGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AssetGroupBy) IntsX

func (s *AssetGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AssetGroupBy) Scan

func (agb *AssetGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*AssetGroupBy) ScanX

func (s *AssetGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AssetGroupBy) String

func (s *AssetGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AssetGroupBy) StringX

func (s *AssetGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AssetGroupBy) Strings

func (s *AssetGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AssetGroupBy) StringsX

func (s *AssetGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AssetMutation

type AssetMutation struct {
	// contains filtered or unexported fields
}

AssetMutation represents an operation that mutates the Asset nodes in the graph.

func (*AssetMutation) AddDailyAssetPriceIDs

func (m *AssetMutation) AddDailyAssetPriceIDs(ids ...pulid.PULID)

AddDailyAssetPriceIDs adds the "daily_asset_prices" edge to the DailyAssetPrice entity by ids.

func (*AssetMutation) AddField

func (m *AssetMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AssetMutation) AddedEdges

func (m *AssetMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AssetMutation) AddedField

func (m *AssetMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AssetMutation) AddedFields

func (m *AssetMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AssetMutation) AddedIDs

func (m *AssetMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AssetMutation) AssetClassCleared

func (m *AssetMutation) AssetClassCleared() bool

AssetClassCleared reports if the "asset_class" edge to the AssetClass entity was cleared.

func (*AssetMutation) AssetClassID

func (m *AssetMutation) AssetClassID() (id pulid.PULID, exists bool)

AssetClassID returns the "asset_class" edge ID in the mutation.

func (*AssetMutation) AssetClassIDs

func (m *AssetMutation) AssetClassIDs() (ids []pulid.PULID)

AssetClassIDs returns the "asset_class" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AssetClassID instead. It exists only for internal usage by the builders.

func (*AssetMutation) ClearAssetClass

func (m *AssetMutation) ClearAssetClass()

ClearAssetClass clears the "asset_class" edge to the AssetClass entity.

func (*AssetMutation) ClearCryptocurrency

func (m *AssetMutation) ClearCryptocurrency()

ClearCryptocurrency clears the "cryptocurrency" edge to the Cryptocurrency entity.

func (*AssetMutation) ClearDailyAssetPrices

func (m *AssetMutation) ClearDailyAssetPrices()

ClearDailyAssetPrices clears the "daily_asset_prices" edge to the DailyAssetPrice entity.

func (*AssetMutation) ClearDeletedAt

func (m *AssetMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AssetMutation) ClearEdge

func (m *AssetMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AssetMutation) ClearField

func (m *AssetMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AssetMutation) ClearedEdges

func (m *AssetMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AssetMutation) ClearedFields

func (m *AssetMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AssetMutation) Client

func (m AssetMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AssetMutation) CreatedAt

func (m *AssetMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AssetMutation) CryptocurrencyCleared

func (m *AssetMutation) CryptocurrencyCleared() bool

CryptocurrencyCleared reports if the "cryptocurrency" edge to the Cryptocurrency entity was cleared.

func (*AssetMutation) CryptocurrencyID

func (m *AssetMutation) CryptocurrencyID() (id pulid.PULID, exists bool)

CryptocurrencyID returns the "cryptocurrency" edge ID in the mutation.

func (*AssetMutation) CryptocurrencyIDs

func (m *AssetMutation) CryptocurrencyIDs() (ids []pulid.PULID)

CryptocurrencyIDs returns the "cryptocurrency" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CryptocurrencyID instead. It exists only for internal usage by the builders.

func (*AssetMutation) DailyAssetPricesCleared

func (m *AssetMutation) DailyAssetPricesCleared() bool

DailyAssetPricesCleared reports if the "daily_asset_prices" edge to the DailyAssetPrice entity was cleared.

func (*AssetMutation) DailyAssetPricesIDs

func (m *AssetMutation) DailyAssetPricesIDs() (ids []pulid.PULID)

DailyAssetPricesIDs returns the "daily_asset_prices" edge IDs in the mutation.

func (*AssetMutation) DeletedAt

func (m *AssetMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*AssetMutation) DeletedAtCleared

func (m *AssetMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*AssetMutation) EdgeCleared

func (m *AssetMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AssetMutation) Field

func (m *AssetMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AssetMutation) FieldCleared

func (m *AssetMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AssetMutation) Fields

func (m *AssetMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AssetMutation) ID

func (m *AssetMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AssetMutation) IDs

func (m *AssetMutation) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AssetMutation) OldCreatedAt

func (m *AssetMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Asset entity. If the Asset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AssetMutation) OldDeletedAt

func (m *AssetMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Asset entity. If the Asset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AssetMutation) OldField

func (m *AssetMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AssetMutation) OldUpdatedAt

func (m *AssetMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Asset entity. If the Asset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AssetMutation) Op

func (m *AssetMutation) Op() Op

Op returns the operation name.

func (*AssetMutation) RemoveDailyAssetPriceIDs

func (m *AssetMutation) RemoveDailyAssetPriceIDs(ids ...pulid.PULID)

RemoveDailyAssetPriceIDs removes the "daily_asset_prices" edge to the DailyAssetPrice entity by IDs.

func (*AssetMutation) RemovedDailyAssetPricesIDs

func (m *AssetMutation) RemovedDailyAssetPricesIDs() (ids []pulid.PULID)

RemovedDailyAssetPrices returns the removed IDs of the "daily_asset_prices" edge to the DailyAssetPrice entity.

func (*AssetMutation) RemovedEdges

func (m *AssetMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AssetMutation) RemovedIDs

func (m *AssetMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AssetMutation) ResetAssetClass

func (m *AssetMutation) ResetAssetClass()

ResetAssetClass resets all changes to the "asset_class" edge.

func (*AssetMutation) ResetCreatedAt

func (m *AssetMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AssetMutation) ResetCryptocurrency

func (m *AssetMutation) ResetCryptocurrency()

ResetCryptocurrency resets all changes to the "cryptocurrency" edge.

func (*AssetMutation) ResetDailyAssetPrices

func (m *AssetMutation) ResetDailyAssetPrices()

ResetDailyAssetPrices resets all changes to the "daily_asset_prices" edge.

func (*AssetMutation) ResetDeletedAt

func (m *AssetMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*AssetMutation) ResetEdge

func (m *AssetMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AssetMutation) ResetField

func (m *AssetMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AssetMutation) ResetUpdatedAt

func (m *AssetMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AssetMutation) SetAssetClassID

func (m *AssetMutation) SetAssetClassID(id pulid.PULID)

SetAssetClassID sets the "asset_class" edge to the AssetClass entity by id.

func (*AssetMutation) SetCreatedAt

func (m *AssetMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AssetMutation) SetCryptocurrencyID

func (m *AssetMutation) SetCryptocurrencyID(id pulid.PULID)

SetCryptocurrencyID sets the "cryptocurrency" edge to the Cryptocurrency entity by id.

func (*AssetMutation) SetDeletedAt

func (m *AssetMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*AssetMutation) SetField

func (m *AssetMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AssetMutation) SetID

func (m *AssetMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Asset entities.

func (*AssetMutation) SetUpdatedAt

func (m *AssetMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (AssetMutation) Tx

func (m AssetMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AssetMutation) Type

func (m *AssetMutation) Type() string

Type returns the node type of this mutation (Asset).

func (*AssetMutation) UpdatedAt

func (m *AssetMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AssetMutation) Where

func (m *AssetMutation) Where(ps ...predicate.Asset)

Where appends a list predicates to the AssetMutation builder.

type AssetOrder

type AssetOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *AssetOrderField `json:"field"`
}

AssetOrder defines the ordering of Asset.

type AssetOrderField

type AssetOrderField struct {
	// contains filtered or unexported fields
}

AssetOrderField defines the ordering field of Asset.

func (AssetOrderField) MarshalGQL

func (f AssetOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AssetOrderField) String

func (f AssetOrderField) String() string

String implement fmt.Stringer interface.

func (*AssetOrderField) UnmarshalGQL

func (f *AssetOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AssetPaginateOption

type AssetPaginateOption func(*assetPager) error

AssetPaginateOption enables pagination customization.

func WithAssetFilter

func WithAssetFilter(filter func(*AssetQuery) (*AssetQuery, error)) AssetPaginateOption

WithAssetFilter configures pagination filter.

func WithAssetOrder

func WithAssetOrder(order *AssetOrder) AssetPaginateOption

WithAssetOrder configures pagination ordering.

type AssetQuery

type AssetQuery struct {
	// contains filtered or unexported fields
}

AssetQuery is the builder for querying Asset entities.

func (*AssetQuery) All

func (aq *AssetQuery) All(ctx context.Context) ([]*Asset, error)

All executes the query and returns a list of Assets.

func (*AssetQuery) AllX

func (aq *AssetQuery) AllX(ctx context.Context) []*Asset

AllX is like All, but panics if an error occurs.

func (*AssetQuery) Clone

func (aq *AssetQuery) Clone() *AssetQuery

Clone returns a duplicate of the AssetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AssetQuery) CollectFields

func (a *AssetQuery) CollectFields(ctx context.Context, satisfies ...string) (*AssetQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AssetQuery) Count

func (aq *AssetQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AssetQuery) CountX

func (aq *AssetQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AssetQuery) Exist

func (aq *AssetQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AssetQuery) ExistX

func (aq *AssetQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AssetQuery) First

func (aq *AssetQuery) First(ctx context.Context) (*Asset, error)

First returns the first Asset entity from the query. Returns a *NotFoundError when no Asset was found.

func (*AssetQuery) FirstID

func (aq *AssetQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Asset ID from the query. Returns a *NotFoundError when no Asset ID was found.

func (*AssetQuery) FirstIDX

func (aq *AssetQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*AssetQuery) FirstX

func (aq *AssetQuery) FirstX(ctx context.Context) *Asset

FirstX is like First, but panics if an error occurs.

func (*AssetQuery) GroupBy

func (aq *AssetQuery) GroupBy(field string, fields ...string) *AssetGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Asset.Query().
	GroupBy(asset.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AssetQuery) IDs

func (aq *AssetQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Asset IDs.

func (*AssetQuery) IDsX

func (aq *AssetQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*AssetQuery) Limit

func (aq *AssetQuery) Limit(limit int) *AssetQuery

Limit adds a limit step to the query.

func (*AssetQuery) Offset

func (aq *AssetQuery) Offset(offset int) *AssetQuery

Offset adds an offset step to the query.

func (*AssetQuery) Only

func (aq *AssetQuery) Only(ctx context.Context) (*Asset, error)

Only returns a single Asset entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Asset entity is found. Returns a *NotFoundError when no Asset entities are found.

func (*AssetQuery) OnlyID

func (aq *AssetQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Asset ID in the query. Returns a *NotSingularError when more than one Asset ID is found. Returns a *NotFoundError when no entities are found.

func (*AssetQuery) OnlyIDX

func (aq *AssetQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AssetQuery) OnlyX

func (aq *AssetQuery) OnlyX(ctx context.Context) *Asset

OnlyX is like Only, but panics if an error occurs.

func (*AssetQuery) Order

func (aq *AssetQuery) Order(o ...OrderFunc) *AssetQuery

Order adds an order step to the query.

func (*AssetQuery) Paginate

func (a *AssetQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AssetPaginateOption,
) (*AssetConnection, error)

Paginate executes the query and returns a relay based cursor connection to Asset.

func (*AssetQuery) QueryAssetClass

func (aq *AssetQuery) QueryAssetClass() *AssetClassQuery

QueryAssetClass chains the current query on the "asset_class" edge.

func (*AssetQuery) QueryCryptocurrency

func (aq *AssetQuery) QueryCryptocurrency() *CryptocurrencyQuery

QueryCryptocurrency chains the current query on the "cryptocurrency" edge.

func (*AssetQuery) QueryDailyAssetPrices

func (aq *AssetQuery) QueryDailyAssetPrices() *DailyAssetPriceQuery

QueryDailyAssetPrices chains the current query on the "daily_asset_prices" edge.

func (*AssetQuery) Select

func (aq *AssetQuery) Select(fields ...string) *AssetSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Asset.Query().
	Select(asset.FieldCreatedAt).
	Scan(ctx, &v)

func (*AssetQuery) Unique

func (aq *AssetQuery) Unique(unique bool) *AssetQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AssetQuery) Where

func (aq *AssetQuery) Where(ps ...predicate.Asset) *AssetQuery

Where adds a new predicate for the AssetQuery builder.

func (*AssetQuery) WithAssetClass

func (aq *AssetQuery) WithAssetClass(opts ...func(*AssetClassQuery)) *AssetQuery

WithAssetClass tells the query-builder to eager-load the nodes that are connected to the "asset_class" edge. The optional arguments are used to configure the query builder of the edge.

func (*AssetQuery) WithCryptocurrency

func (aq *AssetQuery) WithCryptocurrency(opts ...func(*CryptocurrencyQuery)) *AssetQuery

WithCryptocurrency tells the query-builder to eager-load the nodes that are connected to the "cryptocurrency" edge. The optional arguments are used to configure the query builder of the edge.

func (*AssetQuery) WithDailyAssetPrices

func (aq *AssetQuery) WithDailyAssetPrices(opts ...func(*DailyAssetPriceQuery)) *AssetQuery

WithDailyAssetPrices tells the query-builder to eager-load the nodes that are connected to the "daily_asset_prices" edge. The optional arguments are used to configure the query builder of the edge.

func (*AssetQuery) WithNamedDailyAssetPrices

func (aq *AssetQuery) WithNamedDailyAssetPrices(name string, opts ...func(*DailyAssetPriceQuery)) *AssetQuery

WithNamedDailyAssetPrices tells the query-builder to eager-load the nodes that are connected to the "daily_asset_prices" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type AssetSelect

type AssetSelect struct {
	*AssetQuery
	// contains filtered or unexported fields
}

AssetSelect is the builder for selecting fields of Asset entities.

func (*AssetSelect) Bool

func (s *AssetSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AssetSelect) BoolX

func (s *AssetSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AssetSelect) Bools

func (s *AssetSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AssetSelect) BoolsX

func (s *AssetSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AssetSelect) Float64

func (s *AssetSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AssetSelect) Float64X

func (s *AssetSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AssetSelect) Float64s

func (s *AssetSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AssetSelect) Float64sX

func (s *AssetSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AssetSelect) Int

func (s *AssetSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AssetSelect) IntX

func (s *AssetSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AssetSelect) Ints

func (s *AssetSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AssetSelect) IntsX

func (s *AssetSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AssetSelect) Scan

func (as *AssetSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AssetSelect) ScanX

func (s *AssetSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AssetSelect) String

func (s *AssetSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AssetSelect) StringX

func (s *AssetSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AssetSelect) Strings

func (s *AssetSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AssetSelect) StringsX

func (s *AssetSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AssetUpdate

type AssetUpdate struct {
	// contains filtered or unexported fields
}

AssetUpdate is the builder for updating Asset entities.

func (*AssetUpdate) AddDailyAssetPriceIDs

func (au *AssetUpdate) AddDailyAssetPriceIDs(ids ...pulid.PULID) *AssetUpdate

AddDailyAssetPriceIDs adds the "daily_asset_prices" edge to the DailyAssetPrice entity by IDs.

func (*AssetUpdate) AddDailyAssetPrices

func (au *AssetUpdate) AddDailyAssetPrices(d ...*DailyAssetPrice) *AssetUpdate

AddDailyAssetPrices adds the "daily_asset_prices" edges to the DailyAssetPrice entity.

func (*AssetUpdate) ClearAssetClass

func (au *AssetUpdate) ClearAssetClass() *AssetUpdate

ClearAssetClass clears the "asset_class" edge to the AssetClass entity.

func (*AssetUpdate) ClearCryptocurrency

func (au *AssetUpdate) ClearCryptocurrency() *AssetUpdate

ClearCryptocurrency clears the "cryptocurrency" edge to the Cryptocurrency entity.

func (*AssetUpdate) ClearDailyAssetPrices

func (au *AssetUpdate) ClearDailyAssetPrices() *AssetUpdate

ClearDailyAssetPrices clears all "daily_asset_prices" edges to the DailyAssetPrice entity.

func (*AssetUpdate) ClearDeletedAt

func (au *AssetUpdate) ClearDeletedAt() *AssetUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AssetUpdate) Exec

func (au *AssetUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AssetUpdate) ExecX

func (au *AssetUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AssetUpdate) Mutation

func (au *AssetUpdate) Mutation() *AssetMutation

Mutation returns the AssetMutation object of the builder.

func (*AssetUpdate) RemoveDailyAssetPriceIDs

func (au *AssetUpdate) RemoveDailyAssetPriceIDs(ids ...pulid.PULID) *AssetUpdate

RemoveDailyAssetPriceIDs removes the "daily_asset_prices" edge to DailyAssetPrice entities by IDs.

func (*AssetUpdate) RemoveDailyAssetPrices

func (au *AssetUpdate) RemoveDailyAssetPrices(d ...*DailyAssetPrice) *AssetUpdate

RemoveDailyAssetPrices removes "daily_asset_prices" edges to DailyAssetPrice entities.

func (*AssetUpdate) Save

func (au *AssetUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AssetUpdate) SaveX

func (au *AssetUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AssetUpdate) SetAssetClass

func (au *AssetUpdate) SetAssetClass(a *AssetClass) *AssetUpdate

SetAssetClass sets the "asset_class" edge to the AssetClass entity.

func (*AssetUpdate) SetAssetClassID

func (au *AssetUpdate) SetAssetClassID(id pulid.PULID) *AssetUpdate

SetAssetClassID sets the "asset_class" edge to the AssetClass entity by ID.

func (*AssetUpdate) SetCryptocurrency

func (au *AssetUpdate) SetCryptocurrency(c *Cryptocurrency) *AssetUpdate

SetCryptocurrency sets the "cryptocurrency" edge to the Cryptocurrency entity.

func (*AssetUpdate) SetCryptocurrencyID

func (au *AssetUpdate) SetCryptocurrencyID(id pulid.PULID) *AssetUpdate

SetCryptocurrencyID sets the "cryptocurrency" edge to the Cryptocurrency entity by ID.

func (*AssetUpdate) SetDeletedAt

func (au *AssetUpdate) SetDeletedAt(t time.Time) *AssetUpdate

SetDeletedAt sets the "deleted_at" field.

func (*AssetUpdate) SetInput

func (c *AssetUpdate) SetInput(i UpdateAssetInput) *AssetUpdate

SetInput applies the change-set in the UpdateAssetInput on the AssetUpdate builder.

func (*AssetUpdate) SetNillableCryptocurrencyID

func (au *AssetUpdate) SetNillableCryptocurrencyID(id *pulid.PULID) *AssetUpdate

SetNillableCryptocurrencyID sets the "cryptocurrency" edge to the Cryptocurrency entity by ID if the given value is not nil.

func (*AssetUpdate) SetUpdatedAt

func (au *AssetUpdate) SetUpdatedAt(t time.Time) *AssetUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AssetUpdate) Where

func (au *AssetUpdate) Where(ps ...predicate.Asset) *AssetUpdate

Where appends a list predicates to the AssetUpdate builder.

type AssetUpdateOne

type AssetUpdateOne struct {
	// contains filtered or unexported fields
}

AssetUpdateOne is the builder for updating a single Asset entity.

func (*AssetUpdateOne) AddDailyAssetPriceIDs

func (auo *AssetUpdateOne) AddDailyAssetPriceIDs(ids ...pulid.PULID) *AssetUpdateOne

AddDailyAssetPriceIDs adds the "daily_asset_prices" edge to the DailyAssetPrice entity by IDs.

func (*AssetUpdateOne) AddDailyAssetPrices

func (auo *AssetUpdateOne) AddDailyAssetPrices(d ...*DailyAssetPrice) *AssetUpdateOne

AddDailyAssetPrices adds the "daily_asset_prices" edges to the DailyAssetPrice entity.

func (*AssetUpdateOne) ClearAssetClass

func (auo *AssetUpdateOne) ClearAssetClass() *AssetUpdateOne

ClearAssetClass clears the "asset_class" edge to the AssetClass entity.

func (*AssetUpdateOne) ClearCryptocurrency

func (auo *AssetUpdateOne) ClearCryptocurrency() *AssetUpdateOne

ClearCryptocurrency clears the "cryptocurrency" edge to the Cryptocurrency entity.

func (*AssetUpdateOne) ClearDailyAssetPrices

func (auo *AssetUpdateOne) ClearDailyAssetPrices() *AssetUpdateOne

ClearDailyAssetPrices clears all "daily_asset_prices" edges to the DailyAssetPrice entity.

func (*AssetUpdateOne) ClearDeletedAt

func (auo *AssetUpdateOne) ClearDeletedAt() *AssetUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AssetUpdateOne) Exec

func (auo *AssetUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AssetUpdateOne) ExecX

func (auo *AssetUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AssetUpdateOne) Mutation

func (auo *AssetUpdateOne) Mutation() *AssetMutation

Mutation returns the AssetMutation object of the builder.

func (*AssetUpdateOne) RemoveDailyAssetPriceIDs

func (auo *AssetUpdateOne) RemoveDailyAssetPriceIDs(ids ...pulid.PULID) *AssetUpdateOne

RemoveDailyAssetPriceIDs removes the "daily_asset_prices" edge to DailyAssetPrice entities by IDs.

func (*AssetUpdateOne) RemoveDailyAssetPrices

func (auo *AssetUpdateOne) RemoveDailyAssetPrices(d ...*DailyAssetPrice) *AssetUpdateOne

RemoveDailyAssetPrices removes "daily_asset_prices" edges to DailyAssetPrice entities.

func (*AssetUpdateOne) Save

func (auo *AssetUpdateOne) Save(ctx context.Context) (*Asset, error)

Save executes the query and returns the updated Asset entity.

func (*AssetUpdateOne) SaveX

func (auo *AssetUpdateOne) SaveX(ctx context.Context) *Asset

SaveX is like Save, but panics if an error occurs.

func (*AssetUpdateOne) Select

func (auo *AssetUpdateOne) Select(field string, fields ...string) *AssetUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AssetUpdateOne) SetAssetClass

func (auo *AssetUpdateOne) SetAssetClass(a *AssetClass) *AssetUpdateOne

SetAssetClass sets the "asset_class" edge to the AssetClass entity.

func (*AssetUpdateOne) SetAssetClassID

func (auo *AssetUpdateOne) SetAssetClassID(id pulid.PULID) *AssetUpdateOne

SetAssetClassID sets the "asset_class" edge to the AssetClass entity by ID.

func (*AssetUpdateOne) SetCryptocurrency

func (auo *AssetUpdateOne) SetCryptocurrency(c *Cryptocurrency) *AssetUpdateOne

SetCryptocurrency sets the "cryptocurrency" edge to the Cryptocurrency entity.

func (*AssetUpdateOne) SetCryptocurrencyID

func (auo *AssetUpdateOne) SetCryptocurrencyID(id pulid.PULID) *AssetUpdateOne

SetCryptocurrencyID sets the "cryptocurrency" edge to the Cryptocurrency entity by ID.

func (*AssetUpdateOne) SetDeletedAt

func (auo *AssetUpdateOne) SetDeletedAt(t time.Time) *AssetUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*AssetUpdateOne) SetInput

SetInput applies the change-set in the UpdateAssetInput on the AssetUpdateOne builder.

func (*AssetUpdateOne) SetNillableCryptocurrencyID

func (auo *AssetUpdateOne) SetNillableCryptocurrencyID(id *pulid.PULID) *AssetUpdateOne

SetNillableCryptocurrencyID sets the "cryptocurrency" edge to the Cryptocurrency entity by ID if the given value is not nil.

func (*AssetUpdateOne) SetUpdatedAt

func (auo *AssetUpdateOne) SetUpdatedAt(t time.Time) *AssetUpdateOne

SetUpdatedAt sets the "updated_at" field.

type AssetWhereInput

type AssetWhereInput struct {
	Predicates []predicate.Asset  `json:"-"`
	Not        *AssetWhereInput   `json:"not,omitempty"`
	Or         []*AssetWhereInput `json:"or,omitempty"`
	And        []*AssetWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "asset_class" edge predicates.
	HasAssetClass     *bool                   `json:"hasAssetClass,omitempty"`
	HasAssetClassWith []*AssetClassWhereInput `json:"hasAssetClassWith,omitempty"`

	// "cryptocurrency" edge predicates.
	HasCryptocurrency     *bool                       `json:"hasCryptocurrency,omitempty"`
	HasCryptocurrencyWith []*CryptocurrencyWhereInput `json:"hasCryptocurrencyWith,omitempty"`
}

AssetWhereInput represents a where input for filtering Asset queries.

func (*AssetWhereInput) AddPredicates

func (i *AssetWhereInput) AddPredicates(predicates ...predicate.Asset)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AssetWhereInput) Filter

func (i *AssetWhereInput) Filter(q *AssetQuery) (*AssetQuery, error)

Filter applies the AssetWhereInput filter on the AssetQuery builder.

func (*AssetWhereInput) P

P returns a predicate for filtering assets. An error is returned if the input is empty or invalid.

type Assets

type Assets []*Asset

Assets is a parsable slice of Asset.

type AuthRole

type AuthRole struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Value holds the value of the "value" field.
	Value authrole.Value `json:"value,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AuthRoleQuery when eager-loading is set.
	Edges AuthRoleEdges `json:"edges"`
	// contains filtered or unexported fields
}

AuthRole is the model entity for the AuthRole schema.

func (*AuthRole) Accounts

func (ar *AuthRole) Accounts(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AccountOrder,
) (*AccountConnection, error)

func (*AuthRole) NamedAccounts

func (ar *AuthRole) NamedAccounts(name string) ([]*Account, error)

NamedAccounts returns the Accounts named value or an error if the edge was not loaded in eager-loading with this name.

func (*AuthRole) NamedStaffAccounts

func (ar *AuthRole) NamedStaffAccounts(name string) ([]*StaffAccount, error)

NamedStaffAccounts returns the StaffAccounts named value or an error if the edge was not loaded in eager-loading with this name.

func (*AuthRole) Node

func (ar *AuthRole) Node(ctx context.Context) (node *Node, err error)

func (*AuthRole) QueryAccounts

func (ar *AuthRole) QueryAccounts() *AccountQuery

QueryAccounts queries the "accounts" edge of the AuthRole entity.

func (*AuthRole) QueryStaffAccounts

func (ar *AuthRole) QueryStaffAccounts() *StaffAccountQuery

QueryStaffAccounts queries the "staff_accounts" edge of the AuthRole entity.

func (*AuthRole) StaffAccounts

func (ar *AuthRole) StaffAccounts(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *StaffAccountOrder,
) (*StaffAccountConnection, error)

func (*AuthRole) String

func (ar *AuthRole) String() string

String implements the fmt.Stringer.

func (*AuthRole) ToEdge

func (ar *AuthRole) ToEdge(order *AuthRoleOrder) *AuthRoleEdge

ToEdge converts AuthRole into AuthRoleEdge.

func (*AuthRole) Unwrap

func (ar *AuthRole) Unwrap() *AuthRole

Unwrap unwraps the AuthRole entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AuthRole) Update

func (ar *AuthRole) Update() *AuthRoleUpdateOne

Update returns a builder for updating this AuthRole. Note that you need to call AuthRole.Unwrap() before calling this method if this AuthRole was returned from a transaction, and the transaction was committed or rolled back.

type AuthRoleClient

type AuthRoleClient struct {
	// contains filtered or unexported fields
}

AuthRoleClient is a client for the AuthRole schema.

func NewAuthRoleClient

func NewAuthRoleClient(c config) *AuthRoleClient

NewAuthRoleClient returns a client for the AuthRole from the given config.

func (*AuthRoleClient) Create

func (c *AuthRoleClient) Create() *AuthRoleCreate

Create returns a builder for creating a AuthRole entity.

func (*AuthRoleClient) CreateBulk

func (c *AuthRoleClient) CreateBulk(builders ...*AuthRoleCreate) *AuthRoleCreateBulk

CreateBulk returns a builder for creating a bulk of AuthRole entities.

func (*AuthRoleClient) Delete

func (c *AuthRoleClient) Delete() *AuthRoleDelete

Delete returns a delete builder for AuthRole.

func (*AuthRoleClient) DeleteOne

func (c *AuthRoleClient) DeleteOne(ar *AuthRole) *AuthRoleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AuthRoleClient) DeleteOneID

func (c *AuthRoleClient) DeleteOneID(id pulid.PULID) *AuthRoleDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*AuthRoleClient) Get

func (c *AuthRoleClient) Get(ctx context.Context, id pulid.PULID) (*AuthRole, error)

Get returns a AuthRole entity by its id.

func (*AuthRoleClient) GetX

func (c *AuthRoleClient) GetX(ctx context.Context, id pulid.PULID) *AuthRole

GetX is like Get, but panics if an error occurs.

func (*AuthRoleClient) Hooks

func (c *AuthRoleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AuthRoleClient) Query

func (c *AuthRoleClient) Query() *AuthRoleQuery

Query returns a query builder for AuthRole.

func (*AuthRoleClient) QueryAccounts

func (c *AuthRoleClient) QueryAccounts(ar *AuthRole) *AccountQuery

QueryAccounts queries the accounts edge of a AuthRole.

func (*AuthRoleClient) QueryStaffAccounts

func (c *AuthRoleClient) QueryStaffAccounts(ar *AuthRole) *StaffAccountQuery

QueryStaffAccounts queries the staff_accounts edge of a AuthRole.

func (*AuthRoleClient) Update

func (c *AuthRoleClient) Update() *AuthRoleUpdate

Update returns an update builder for AuthRole.

func (*AuthRoleClient) UpdateOne

func (c *AuthRoleClient) UpdateOne(ar *AuthRole) *AuthRoleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AuthRoleClient) UpdateOneID

func (c *AuthRoleClient) UpdateOneID(id pulid.PULID) *AuthRoleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AuthRoleClient) Use

func (c *AuthRoleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authrole.Hooks(f(g(h())))`.

type AuthRoleConnection

type AuthRoleConnection struct {
	Edges      []*AuthRoleEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

AuthRoleConnection is the connection containing edges to AuthRole.

type AuthRoleCreate

type AuthRoleCreate struct {
	// contains filtered or unexported fields
}

AuthRoleCreate is the builder for creating a AuthRole entity.

func (*AuthRoleCreate) AddAccountIDs

func (arc *AuthRoleCreate) AddAccountIDs(ids ...pulid.PULID) *AuthRoleCreate

AddAccountIDs adds the "accounts" edge to the Account entity by IDs.

func (*AuthRoleCreate) AddAccounts

func (arc *AuthRoleCreate) AddAccounts(a ...*Account) *AuthRoleCreate

AddAccounts adds the "accounts" edges to the Account entity.

func (*AuthRoleCreate) AddStaffAccountIDs

func (arc *AuthRoleCreate) AddStaffAccountIDs(ids ...pulid.PULID) *AuthRoleCreate

AddStaffAccountIDs adds the "staff_accounts" edge to the StaffAccount entity by IDs.

func (*AuthRoleCreate) AddStaffAccounts

func (arc *AuthRoleCreate) AddStaffAccounts(s ...*StaffAccount) *AuthRoleCreate

AddStaffAccounts adds the "staff_accounts" edges to the StaffAccount entity.

func (*AuthRoleCreate) Exec

func (arc *AuthRoleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthRoleCreate) ExecX

func (arc *AuthRoleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRoleCreate) Mutation

func (arc *AuthRoleCreate) Mutation() *AuthRoleMutation

Mutation returns the AuthRoleMutation object of the builder.

func (*AuthRoleCreate) Save

func (arc *AuthRoleCreate) Save(ctx context.Context) (*AuthRole, error)

Save creates the AuthRole in the database.

func (*AuthRoleCreate) SaveX

func (arc *AuthRoleCreate) SaveX(ctx context.Context) *AuthRole

SaveX calls Save and panics if Save returns an error.

func (*AuthRoleCreate) SetCreatedAt

func (arc *AuthRoleCreate) SetCreatedAt(t time.Time) *AuthRoleCreate

SetCreatedAt sets the "created_at" field.

func (*AuthRoleCreate) SetDeletedAt

func (arc *AuthRoleCreate) SetDeletedAt(t time.Time) *AuthRoleCreate

SetDeletedAt sets the "deleted_at" field.

func (*AuthRoleCreate) SetDescription

func (arc *AuthRoleCreate) SetDescription(s string) *AuthRoleCreate

SetDescription sets the "description" field.

func (*AuthRoleCreate) SetID

func (arc *AuthRoleCreate) SetID(pu pulid.PULID) *AuthRoleCreate

SetID sets the "id" field.

func (*AuthRoleCreate) SetInput

SetInput applies the change-set in the CreateAuthRoleInput on the AuthRoleCreate builder.

func (*AuthRoleCreate) SetNillableCreatedAt

func (arc *AuthRoleCreate) SetNillableCreatedAt(t *time.Time) *AuthRoleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AuthRoleCreate) SetNillableDeletedAt

func (arc *AuthRoleCreate) SetNillableDeletedAt(t *time.Time) *AuthRoleCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*AuthRoleCreate) SetNillableDescription

func (arc *AuthRoleCreate) SetNillableDescription(s *string) *AuthRoleCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AuthRoleCreate) SetNillableID

func (arc *AuthRoleCreate) SetNillableID(pu *pulid.PULID) *AuthRoleCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AuthRoleCreate) SetNillableUpdatedAt

func (arc *AuthRoleCreate) SetNillableUpdatedAt(t *time.Time) *AuthRoleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AuthRoleCreate) SetUpdatedAt

func (arc *AuthRoleCreate) SetUpdatedAt(t time.Time) *AuthRoleCreate

SetUpdatedAt sets the "updated_at" field.

func (*AuthRoleCreate) SetValue

func (arc *AuthRoleCreate) SetValue(a authrole.Value) *AuthRoleCreate

SetValue sets the "value" field.

type AuthRoleCreateBulk

type AuthRoleCreateBulk struct {
	// contains filtered or unexported fields
}

AuthRoleCreateBulk is the builder for creating many AuthRole entities in bulk.

func (*AuthRoleCreateBulk) Exec

func (arcb *AuthRoleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthRoleCreateBulk) ExecX

func (arcb *AuthRoleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRoleCreateBulk) Save

func (arcb *AuthRoleCreateBulk) Save(ctx context.Context) ([]*AuthRole, error)

Save creates the AuthRole entities in the database.

func (*AuthRoleCreateBulk) SaveX

func (arcb *AuthRoleCreateBulk) SaveX(ctx context.Context) []*AuthRole

SaveX is like Save, but panics if an error occurs.

type AuthRoleDelete

type AuthRoleDelete struct {
	// contains filtered or unexported fields
}

AuthRoleDelete is the builder for deleting a AuthRole entity.

func (*AuthRoleDelete) Exec

func (ard *AuthRoleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AuthRoleDelete) ExecX

func (ard *AuthRoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AuthRoleDelete) Where

func (ard *AuthRoleDelete) Where(ps ...predicate.AuthRole) *AuthRoleDelete

Where appends a list predicates to the AuthRoleDelete builder.

type AuthRoleDeleteOne

type AuthRoleDeleteOne struct {
	// contains filtered or unexported fields
}

AuthRoleDeleteOne is the builder for deleting a single AuthRole entity.

func (*AuthRoleDeleteOne) Exec

func (ardo *AuthRoleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AuthRoleDeleteOne) ExecX

func (ardo *AuthRoleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type AuthRoleEdge

type AuthRoleEdge struct {
	Node   *AuthRole `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

AuthRoleEdge is the edge representation of AuthRole.

type AuthRoleEdges

type AuthRoleEdges struct {
	// Accounts holds the value of the accounts edge.
	Accounts []*Account `json:"accounts,omitempty"`
	// StaffAccounts holds the value of the staff_accounts edge.
	StaffAccounts []*StaffAccount `json:"staffAccounts,omitempty"`
	// contains filtered or unexported fields
}

AuthRoleEdges holds the relations/edges for other nodes in the graph.

func (AuthRoleEdges) AccountsOrErr

func (e AuthRoleEdges) AccountsOrErr() ([]*Account, error)

AccountsOrErr returns the Accounts value or an error if the edge was not loaded in eager-loading.

func (AuthRoleEdges) StaffAccountsOrErr

func (e AuthRoleEdges) StaffAccountsOrErr() ([]*StaffAccount, error)

StaffAccountsOrErr returns the StaffAccounts value or an error if the edge was not loaded in eager-loading.

type AuthRoleGroupBy

type AuthRoleGroupBy struct {
	// contains filtered or unexported fields
}

AuthRoleGroupBy is the group-by builder for AuthRole entities.

func (*AuthRoleGroupBy) Aggregate

func (argb *AuthRoleGroupBy) Aggregate(fns ...AggregateFunc) *AuthRoleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AuthRoleGroupBy) Bool

func (s *AuthRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AuthRoleGroupBy) BoolX

func (s *AuthRoleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AuthRoleGroupBy) Bools

func (s *AuthRoleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AuthRoleGroupBy) BoolsX

func (s *AuthRoleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AuthRoleGroupBy) Float64

func (s *AuthRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AuthRoleGroupBy) Float64X

func (s *AuthRoleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AuthRoleGroupBy) Float64s

func (s *AuthRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AuthRoleGroupBy) Float64sX

func (s *AuthRoleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AuthRoleGroupBy) Int

func (s *AuthRoleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AuthRoleGroupBy) IntX

func (s *AuthRoleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AuthRoleGroupBy) Ints

func (s *AuthRoleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AuthRoleGroupBy) IntsX

func (s *AuthRoleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AuthRoleGroupBy) Scan

func (argb *AuthRoleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*AuthRoleGroupBy) ScanX

func (s *AuthRoleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AuthRoleGroupBy) String

func (s *AuthRoleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AuthRoleGroupBy) StringX

func (s *AuthRoleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AuthRoleGroupBy) Strings

func (s *AuthRoleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AuthRoleGroupBy) StringsX

func (s *AuthRoleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AuthRoleMutation

type AuthRoleMutation struct {
	// contains filtered or unexported fields
}

AuthRoleMutation represents an operation that mutates the AuthRole nodes in the graph.

func (*AuthRoleMutation) AccountsCleared

func (m *AuthRoleMutation) AccountsCleared() bool

AccountsCleared reports if the "accounts" edge to the Account entity was cleared.

func (*AuthRoleMutation) AccountsIDs

func (m *AuthRoleMutation) AccountsIDs() (ids []pulid.PULID)

AccountsIDs returns the "accounts" edge IDs in the mutation.

func (*AuthRoleMutation) AddAccountIDs

func (m *AuthRoleMutation) AddAccountIDs(ids ...pulid.PULID)

AddAccountIDs adds the "accounts" edge to the Account entity by ids.

func (*AuthRoleMutation) AddField

func (m *AuthRoleMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AuthRoleMutation) AddStaffAccountIDs

func (m *AuthRoleMutation) AddStaffAccountIDs(ids ...pulid.PULID)

AddStaffAccountIDs adds the "staff_accounts" edge to the StaffAccount entity by ids.

func (*AuthRoleMutation) AddedEdges

func (m *AuthRoleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AuthRoleMutation) AddedField

func (m *AuthRoleMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AuthRoleMutation) AddedFields

func (m *AuthRoleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AuthRoleMutation) AddedIDs

func (m *AuthRoleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AuthRoleMutation) ClearAccounts

func (m *AuthRoleMutation) ClearAccounts()

ClearAccounts clears the "accounts" edge to the Account entity.

func (*AuthRoleMutation) ClearDeletedAt

func (m *AuthRoleMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AuthRoleMutation) ClearDescription

func (m *AuthRoleMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*AuthRoleMutation) ClearEdge

func (m *AuthRoleMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AuthRoleMutation) ClearField

func (m *AuthRoleMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AuthRoleMutation) ClearStaffAccounts

func (m *AuthRoleMutation) ClearStaffAccounts()

ClearStaffAccounts clears the "staff_accounts" edge to the StaffAccount entity.

func (*AuthRoleMutation) ClearedEdges

func (m *AuthRoleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AuthRoleMutation) ClearedFields

func (m *AuthRoleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AuthRoleMutation) Client

func (m AuthRoleMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AuthRoleMutation) CreatedAt

func (m *AuthRoleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AuthRoleMutation) DeletedAt

func (m *AuthRoleMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*AuthRoleMutation) DeletedAtCleared

func (m *AuthRoleMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*AuthRoleMutation) Description

func (m *AuthRoleMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*AuthRoleMutation) DescriptionCleared

func (m *AuthRoleMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*AuthRoleMutation) EdgeCleared

func (m *AuthRoleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AuthRoleMutation) Field

func (m *AuthRoleMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AuthRoleMutation) FieldCleared

func (m *AuthRoleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AuthRoleMutation) Fields

func (m *AuthRoleMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AuthRoleMutation) ID

func (m *AuthRoleMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AuthRoleMutation) IDs

func (m *AuthRoleMutation) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AuthRoleMutation) OldCreatedAt

func (m *AuthRoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AuthRole entity. If the AuthRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRoleMutation) OldDeletedAt

func (m *AuthRoleMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the AuthRole entity. If the AuthRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRoleMutation) OldDescription

func (m *AuthRoleMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" field's value of the AuthRole entity. If the AuthRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRoleMutation) OldField

func (m *AuthRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AuthRoleMutation) OldUpdatedAt

func (m *AuthRoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AuthRole entity. If the AuthRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRoleMutation) OldValue

func (m *AuthRoleMutation) OldValue(ctx context.Context) (v authrole.Value, err error)

OldValue returns the old "value" field's value of the AuthRole entity. If the AuthRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRoleMutation) Op

func (m *AuthRoleMutation) Op() Op

Op returns the operation name.

func (*AuthRoleMutation) RemoveAccountIDs

func (m *AuthRoleMutation) RemoveAccountIDs(ids ...pulid.PULID)

RemoveAccountIDs removes the "accounts" edge to the Account entity by IDs.

func (*AuthRoleMutation) RemoveStaffAccountIDs

func (m *AuthRoleMutation) RemoveStaffAccountIDs(ids ...pulid.PULID)

RemoveStaffAccountIDs removes the "staff_accounts" edge to the StaffAccount entity by IDs.

func (*AuthRoleMutation) RemovedAccountsIDs

func (m *AuthRoleMutation) RemovedAccountsIDs() (ids []pulid.PULID)

RemovedAccounts returns the removed IDs of the "accounts" edge to the Account entity.

func (*AuthRoleMutation) RemovedEdges

func (m *AuthRoleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AuthRoleMutation) RemovedIDs

func (m *AuthRoleMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AuthRoleMutation) RemovedStaffAccountsIDs

func (m *AuthRoleMutation) RemovedStaffAccountsIDs() (ids []pulid.PULID)

RemovedStaffAccounts returns the removed IDs of the "staff_accounts" edge to the StaffAccount entity.

func (*AuthRoleMutation) ResetAccounts

func (m *AuthRoleMutation) ResetAccounts()

ResetAccounts resets all changes to the "accounts" edge.

func (*AuthRoleMutation) ResetCreatedAt

func (m *AuthRoleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AuthRoleMutation) ResetDeletedAt

func (m *AuthRoleMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*AuthRoleMutation) ResetDescription

func (m *AuthRoleMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*AuthRoleMutation) ResetEdge

func (m *AuthRoleMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AuthRoleMutation) ResetField

func (m *AuthRoleMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AuthRoleMutation) ResetStaffAccounts

func (m *AuthRoleMutation) ResetStaffAccounts()

ResetStaffAccounts resets all changes to the "staff_accounts" edge.

func (*AuthRoleMutation) ResetUpdatedAt

func (m *AuthRoleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AuthRoleMutation) ResetValue

func (m *AuthRoleMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*AuthRoleMutation) SetCreatedAt

func (m *AuthRoleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AuthRoleMutation) SetDeletedAt

func (m *AuthRoleMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*AuthRoleMutation) SetDescription

func (m *AuthRoleMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*AuthRoleMutation) SetField

func (m *AuthRoleMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AuthRoleMutation) SetID

func (m *AuthRoleMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AuthRole entities.

func (*AuthRoleMutation) SetUpdatedAt

func (m *AuthRoleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AuthRoleMutation) SetValue

func (m *AuthRoleMutation) SetValue(a authrole.Value)

SetValue sets the "value" field.

func (*AuthRoleMutation) StaffAccountsCleared

func (m *AuthRoleMutation) StaffAccountsCleared() bool

StaffAccountsCleared reports if the "staff_accounts" edge to the StaffAccount entity was cleared.

func (*AuthRoleMutation) StaffAccountsIDs

func (m *AuthRoleMutation) StaffAccountsIDs() (ids []pulid.PULID)

StaffAccountsIDs returns the "staff_accounts" edge IDs in the mutation.

func (AuthRoleMutation) Tx

func (m AuthRoleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AuthRoleMutation) Type

func (m *AuthRoleMutation) Type() string

Type returns the node type of this mutation (AuthRole).

func (*AuthRoleMutation) UpdatedAt

func (m *AuthRoleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AuthRoleMutation) Value

func (m *AuthRoleMutation) Value() (r authrole.Value, exists bool)

Value returns the value of the "value" field in the mutation.

func (*AuthRoleMutation) Where

func (m *AuthRoleMutation) Where(ps ...predicate.AuthRole)

Where appends a list predicates to the AuthRoleMutation builder.

type AuthRoleOrder

type AuthRoleOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *AuthRoleOrderField `json:"field"`
}

AuthRoleOrder defines the ordering of AuthRole.

type AuthRoleOrderField

type AuthRoleOrderField struct {
	// contains filtered or unexported fields
}

AuthRoleOrderField defines the ordering field of AuthRole.

func (AuthRoleOrderField) MarshalGQL

func (f AuthRoleOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AuthRoleOrderField) String

func (f AuthRoleOrderField) String() string

String implement fmt.Stringer interface.

func (*AuthRoleOrderField) UnmarshalGQL

func (f *AuthRoleOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AuthRolePaginateOption

type AuthRolePaginateOption func(*authrolePager) error

AuthRolePaginateOption enables pagination customization.

func WithAuthRoleFilter

func WithAuthRoleFilter(filter func(*AuthRoleQuery) (*AuthRoleQuery, error)) AuthRolePaginateOption

WithAuthRoleFilter configures pagination filter.

func WithAuthRoleOrder

func WithAuthRoleOrder(order *AuthRoleOrder) AuthRolePaginateOption

WithAuthRoleOrder configures pagination ordering.

type AuthRoleQuery

type AuthRoleQuery struct {
	// contains filtered or unexported fields
}

AuthRoleQuery is the builder for querying AuthRole entities.

func (*AuthRoleQuery) All

func (arq *AuthRoleQuery) All(ctx context.Context) ([]*AuthRole, error)

All executes the query and returns a list of AuthRoles.

func (*AuthRoleQuery) AllX

func (arq *AuthRoleQuery) AllX(ctx context.Context) []*AuthRole

AllX is like All, but panics if an error occurs.

func (*AuthRoleQuery) Clone

func (arq *AuthRoleQuery) Clone() *AuthRoleQuery

Clone returns a duplicate of the AuthRoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AuthRoleQuery) CollectFields

func (ar *AuthRoleQuery) CollectFields(ctx context.Context, satisfies ...string) (*AuthRoleQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AuthRoleQuery) Count

func (arq *AuthRoleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AuthRoleQuery) CountX

func (arq *AuthRoleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AuthRoleQuery) Exist

func (arq *AuthRoleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AuthRoleQuery) ExistX

func (arq *AuthRoleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AuthRoleQuery) First

func (arq *AuthRoleQuery) First(ctx context.Context) (*AuthRole, error)

First returns the first AuthRole entity from the query. Returns a *NotFoundError when no AuthRole was found.

func (*AuthRoleQuery) FirstID

func (arq *AuthRoleQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first AuthRole ID from the query. Returns a *NotFoundError when no AuthRole ID was found.

func (*AuthRoleQuery) FirstIDX

func (arq *AuthRoleQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*AuthRoleQuery) FirstX

func (arq *AuthRoleQuery) FirstX(ctx context.Context) *AuthRole

FirstX is like First, but panics if an error occurs.

func (*AuthRoleQuery) GroupBy

func (arq *AuthRoleQuery) GroupBy(field string, fields ...string) *AuthRoleGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AuthRole.Query().
	GroupBy(authrole.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AuthRoleQuery) IDs

func (arq *AuthRoleQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of AuthRole IDs.

func (*AuthRoleQuery) IDsX

func (arq *AuthRoleQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*AuthRoleQuery) Limit

func (arq *AuthRoleQuery) Limit(limit int) *AuthRoleQuery

Limit adds a limit step to the query.

func (*AuthRoleQuery) Offset

func (arq *AuthRoleQuery) Offset(offset int) *AuthRoleQuery

Offset adds an offset step to the query.

func (*AuthRoleQuery) Only

func (arq *AuthRoleQuery) Only(ctx context.Context) (*AuthRole, error)

Only returns a single AuthRole entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuthRole entity is found. Returns a *NotFoundError when no AuthRole entities are found.

func (*AuthRoleQuery) OnlyID

func (arq *AuthRoleQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only AuthRole ID in the query. Returns a *NotSingularError when more than one AuthRole ID is found. Returns a *NotFoundError when no entities are found.

func (*AuthRoleQuery) OnlyIDX

func (arq *AuthRoleQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AuthRoleQuery) OnlyX

func (arq *AuthRoleQuery) OnlyX(ctx context.Context) *AuthRole

OnlyX is like Only, but panics if an error occurs.

func (*AuthRoleQuery) Order

func (arq *AuthRoleQuery) Order(o ...OrderFunc) *AuthRoleQuery

Order adds an order step to the query.

func (*AuthRoleQuery) Paginate

func (ar *AuthRoleQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AuthRolePaginateOption,
) (*AuthRoleConnection, error)

Paginate executes the query and returns a relay based cursor connection to AuthRole.

func (*AuthRoleQuery) QueryAccounts

func (arq *AuthRoleQuery) QueryAccounts() *AccountQuery

QueryAccounts chains the current query on the "accounts" edge.

func (*AuthRoleQuery) QueryStaffAccounts

func (arq *AuthRoleQuery) QueryStaffAccounts() *StaffAccountQuery

QueryStaffAccounts chains the current query on the "staff_accounts" edge.

func (*AuthRoleQuery) Select

func (arq *AuthRoleQuery) Select(fields ...string) *AuthRoleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.AuthRole.Query().
	Select(authrole.FieldCreatedAt).
	Scan(ctx, &v)

func (*AuthRoleQuery) Unique

func (arq *AuthRoleQuery) Unique(unique bool) *AuthRoleQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AuthRoleQuery) Where

func (arq *AuthRoleQuery) Where(ps ...predicate.AuthRole) *AuthRoleQuery

Where adds a new predicate for the AuthRoleQuery builder.

func (*AuthRoleQuery) WithAccounts

func (arq *AuthRoleQuery) WithAccounts(opts ...func(*AccountQuery)) *AuthRoleQuery

WithAccounts tells the query-builder to eager-load the nodes that are connected to the "accounts" edge. The optional arguments are used to configure the query builder of the edge.

func (*AuthRoleQuery) WithNamedAccounts

func (arq *AuthRoleQuery) WithNamedAccounts(name string, opts ...func(*AccountQuery)) *AuthRoleQuery

WithNamedAccounts tells the query-builder to eager-load the nodes that are connected to the "accounts" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AuthRoleQuery) WithNamedStaffAccounts

func (arq *AuthRoleQuery) WithNamedStaffAccounts(name string, opts ...func(*StaffAccountQuery)) *AuthRoleQuery

WithNamedStaffAccounts tells the query-builder to eager-load the nodes that are connected to the "staff_accounts" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AuthRoleQuery) WithStaffAccounts

func (arq *AuthRoleQuery) WithStaffAccounts(opts ...func(*StaffAccountQuery)) *AuthRoleQuery

WithStaffAccounts tells the query-builder to eager-load the nodes that are connected to the "staff_accounts" edge. The optional arguments are used to configure the query builder of the edge.

type AuthRoleSelect

type AuthRoleSelect struct {
	*AuthRoleQuery
	// contains filtered or unexported fields
}

AuthRoleSelect is the builder for selecting fields of AuthRole entities.

func (*AuthRoleSelect) Bool

func (s *AuthRoleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AuthRoleSelect) BoolX

func (s *AuthRoleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AuthRoleSelect) Bools

func (s *AuthRoleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AuthRoleSelect) BoolsX

func (s *AuthRoleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AuthRoleSelect) Float64

func (s *AuthRoleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AuthRoleSelect) Float64X

func (s *AuthRoleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AuthRoleSelect) Float64s

func (s *AuthRoleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AuthRoleSelect) Float64sX

func (s *AuthRoleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AuthRoleSelect) Int

func (s *AuthRoleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AuthRoleSelect) IntX

func (s *AuthRoleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AuthRoleSelect) Ints

func (s *AuthRoleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AuthRoleSelect) IntsX

func (s *AuthRoleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AuthRoleSelect) Scan

func (ars *AuthRoleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AuthRoleSelect) ScanX

func (s *AuthRoleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AuthRoleSelect) String

func (s *AuthRoleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AuthRoleSelect) StringX

func (s *AuthRoleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AuthRoleSelect) Strings

func (s *AuthRoleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AuthRoleSelect) StringsX

func (s *AuthRoleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AuthRoleUpdate

type AuthRoleUpdate struct {
	// contains filtered or unexported fields
}

AuthRoleUpdate is the builder for updating AuthRole entities.

func (*AuthRoleUpdate) AddAccountIDs

func (aru *AuthRoleUpdate) AddAccountIDs(ids ...pulid.PULID) *AuthRoleUpdate

AddAccountIDs adds the "accounts" edge to the Account entity by IDs.

func (*AuthRoleUpdate) AddAccounts

func (aru *AuthRoleUpdate) AddAccounts(a ...*Account) *AuthRoleUpdate

AddAccounts adds the "accounts" edges to the Account entity.

func (*AuthRoleUpdate) AddStaffAccountIDs

func (aru *AuthRoleUpdate) AddStaffAccountIDs(ids ...pulid.PULID) *AuthRoleUpdate

AddStaffAccountIDs adds the "staff_accounts" edge to the StaffAccount entity by IDs.

func (*AuthRoleUpdate) AddStaffAccounts

func (aru *AuthRoleUpdate) AddStaffAccounts(s ...*StaffAccount) *AuthRoleUpdate

AddStaffAccounts adds the "staff_accounts" edges to the StaffAccount entity.

func (*AuthRoleUpdate) ClearAccounts

func (aru *AuthRoleUpdate) ClearAccounts() *AuthRoleUpdate

ClearAccounts clears all "accounts" edges to the Account entity.

func (*AuthRoleUpdate) ClearDeletedAt

func (aru *AuthRoleUpdate) ClearDeletedAt() *AuthRoleUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AuthRoleUpdate) ClearDescription

func (aru *AuthRoleUpdate) ClearDescription() *AuthRoleUpdate

ClearDescription clears the value of the "description" field.

func (*AuthRoleUpdate) ClearStaffAccounts

func (aru *AuthRoleUpdate) ClearStaffAccounts() *AuthRoleUpdate

ClearStaffAccounts clears all "staff_accounts" edges to the StaffAccount entity.

func (*AuthRoleUpdate) Exec

func (aru *AuthRoleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthRoleUpdate) ExecX

func (aru *AuthRoleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRoleUpdate) Mutation

func (aru *AuthRoleUpdate) Mutation() *AuthRoleMutation

Mutation returns the AuthRoleMutation object of the builder.

func (*AuthRoleUpdate) RemoveAccountIDs

func (aru *AuthRoleUpdate) RemoveAccountIDs(ids ...pulid.PULID) *AuthRoleUpdate

RemoveAccountIDs removes the "accounts" edge to Account entities by IDs.

func (*AuthRoleUpdate) RemoveAccounts

func (aru *AuthRoleUpdate) RemoveAccounts(a ...*Account) *AuthRoleUpdate

RemoveAccounts removes "accounts" edges to Account entities.

func (*AuthRoleUpdate) RemoveStaffAccountIDs

func (aru *AuthRoleUpdate) RemoveStaffAccountIDs(ids ...pulid.PULID) *AuthRoleUpdate

RemoveStaffAccountIDs removes the "staff_accounts" edge to StaffAccount entities by IDs.

func (*AuthRoleUpdate) RemoveStaffAccounts

func (aru *AuthRoleUpdate) RemoveStaffAccounts(s ...*StaffAccount) *AuthRoleUpdate

RemoveStaffAccounts removes "staff_accounts" edges to StaffAccount entities.

func (*AuthRoleUpdate) Save

func (aru *AuthRoleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AuthRoleUpdate) SaveX

func (aru *AuthRoleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AuthRoleUpdate) SetDeletedAt

func (aru *AuthRoleUpdate) SetDeletedAt(t time.Time) *AuthRoleUpdate

SetDeletedAt sets the "deleted_at" field.

func (*AuthRoleUpdate) SetDescription

func (aru *AuthRoleUpdate) SetDescription(s string) *AuthRoleUpdate

SetDescription sets the "description" field.

func (*AuthRoleUpdate) SetInput

SetInput applies the change-set in the UpdateAuthRoleInput on the AuthRoleUpdate builder.

func (*AuthRoleUpdate) SetNillableDescription

func (aru *AuthRoleUpdate) SetNillableDescription(s *string) *AuthRoleUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AuthRoleUpdate) SetUpdatedAt

func (aru *AuthRoleUpdate) SetUpdatedAt(t time.Time) *AuthRoleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AuthRoleUpdate) SetValue

func (aru *AuthRoleUpdate) SetValue(a authrole.Value) *AuthRoleUpdate

SetValue sets the "value" field.

func (*AuthRoleUpdate) Where

func (aru *AuthRoleUpdate) Where(ps ...predicate.AuthRole) *AuthRoleUpdate

Where appends a list predicates to the AuthRoleUpdate builder.

type AuthRoleUpdateOne

type AuthRoleUpdateOne struct {
	// contains filtered or unexported fields
}

AuthRoleUpdateOne is the builder for updating a single AuthRole entity.

func (*AuthRoleUpdateOne) AddAccountIDs

func (aruo *AuthRoleUpdateOne) AddAccountIDs(ids ...pulid.PULID) *AuthRoleUpdateOne

AddAccountIDs adds the "accounts" edge to the Account entity by IDs.

func (*AuthRoleUpdateOne) AddAccounts

func (aruo *AuthRoleUpdateOne) AddAccounts(a ...*Account) *AuthRoleUpdateOne

AddAccounts adds the "accounts" edges to the Account entity.

func (*AuthRoleUpdateOne) AddStaffAccountIDs

func (aruo *AuthRoleUpdateOne) AddStaffAccountIDs(ids ...pulid.PULID) *AuthRoleUpdateOne

AddStaffAccountIDs adds the "staff_accounts" edge to the StaffAccount entity by IDs.

func (*AuthRoleUpdateOne) AddStaffAccounts

func (aruo *AuthRoleUpdateOne) AddStaffAccounts(s ...*StaffAccount) *AuthRoleUpdateOne

AddStaffAccounts adds the "staff_accounts" edges to the StaffAccount entity.

func (*AuthRoleUpdateOne) ClearAccounts

func (aruo *AuthRoleUpdateOne) ClearAccounts() *AuthRoleUpdateOne

ClearAccounts clears all "accounts" edges to the Account entity.

func (*AuthRoleUpdateOne) ClearDeletedAt

func (aruo *AuthRoleUpdateOne) ClearDeletedAt() *AuthRoleUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AuthRoleUpdateOne) ClearDescription

func (aruo *AuthRoleUpdateOne) ClearDescription() *AuthRoleUpdateOne

ClearDescription clears the value of the "description" field.

func (*AuthRoleUpdateOne) ClearStaffAccounts

func (aruo *AuthRoleUpdateOne) ClearStaffAccounts() *AuthRoleUpdateOne

ClearStaffAccounts clears all "staff_accounts" edges to the StaffAccount entity.

func (*AuthRoleUpdateOne) Exec

func (aruo *AuthRoleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AuthRoleUpdateOne) ExecX

func (aruo *AuthRoleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRoleUpdateOne) Mutation

func (aruo *AuthRoleUpdateOne) Mutation() *AuthRoleMutation

Mutation returns the AuthRoleMutation object of the builder.

func (*AuthRoleUpdateOne) RemoveAccountIDs

func (aruo *AuthRoleUpdateOne) RemoveAccountIDs(ids ...pulid.PULID) *AuthRoleUpdateOne

RemoveAccountIDs removes the "accounts" edge to Account entities by IDs.

func (*AuthRoleUpdateOne) RemoveAccounts

func (aruo *AuthRoleUpdateOne) RemoveAccounts(a ...*Account) *AuthRoleUpdateOne

RemoveAccounts removes "accounts" edges to Account entities.

func (*AuthRoleUpdateOne) RemoveStaffAccountIDs

func (aruo *AuthRoleUpdateOne) RemoveStaffAccountIDs(ids ...pulid.PULID) *AuthRoleUpdateOne

RemoveStaffAccountIDs removes the "staff_accounts" edge to StaffAccount entities by IDs.

func (*AuthRoleUpdateOne) RemoveStaffAccounts

func (aruo *AuthRoleUpdateOne) RemoveStaffAccounts(s ...*StaffAccount) *AuthRoleUpdateOne

RemoveStaffAccounts removes "staff_accounts" edges to StaffAccount entities.

func (*AuthRoleUpdateOne) Save

func (aruo *AuthRoleUpdateOne) Save(ctx context.Context) (*AuthRole, error)

Save executes the query and returns the updated AuthRole entity.

func (*AuthRoleUpdateOne) SaveX

func (aruo *AuthRoleUpdateOne) SaveX(ctx context.Context) *AuthRole

SaveX is like Save, but panics if an error occurs.

func (*AuthRoleUpdateOne) Select

func (aruo *AuthRoleUpdateOne) Select(field string, fields ...string) *AuthRoleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AuthRoleUpdateOne) SetDeletedAt

func (aruo *AuthRoleUpdateOne) SetDeletedAt(t time.Time) *AuthRoleUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*AuthRoleUpdateOne) SetDescription

func (aruo *AuthRoleUpdateOne) SetDescription(s string) *AuthRoleUpdateOne

SetDescription sets the "description" field.

func (*AuthRoleUpdateOne) SetInput

SetInput applies the change-set in the UpdateAuthRoleInput on the AuthRoleUpdateOne builder.

func (*AuthRoleUpdateOne) SetNillableDescription

func (aruo *AuthRoleUpdateOne) SetNillableDescription(s *string) *AuthRoleUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AuthRoleUpdateOne) SetUpdatedAt

func (aruo *AuthRoleUpdateOne) SetUpdatedAt(t time.Time) *AuthRoleUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AuthRoleUpdateOne) SetValue

SetValue sets the "value" field.

type AuthRoleWhereInput

type AuthRoleWhereInput struct {
	Predicates []predicate.AuthRole  `json:"-"`
	Not        *AuthRoleWhereInput   `json:"not,omitempty"`
	Or         []*AuthRoleWhereInput `json:"or,omitempty"`
	And        []*AuthRoleWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "value" field predicates.
	Value      *authrole.Value  `json:"value,omitempty"`
	ValueNEQ   *authrole.Value  `json:"valueNEQ,omitempty"`
	ValueIn    []authrole.Value `json:"valueIn,omitempty"`
	ValueNotIn []authrole.Value `json:"valueNotIn,omitempty"`

	// "description" field predicates.
	Description             *string  `json:"description,omitempty"`
	DescriptionNEQ          *string  `json:"descriptionNEQ,omitempty"`
	DescriptionIn           []string `json:"descriptionIn,omitempty"`
	DescriptionNotIn        []string `json:"descriptionNotIn,omitempty"`
	DescriptionGT           *string  `json:"descriptionGT,omitempty"`
	DescriptionGTE          *string  `json:"descriptionGTE,omitempty"`
	DescriptionLT           *string  `json:"descriptionLT,omitempty"`
	DescriptionLTE          *string  `json:"descriptionLTE,omitempty"`
	DescriptionContains     *string  `json:"descriptionContains,omitempty"`
	DescriptionHasPrefix    *string  `json:"descriptionHasPrefix,omitempty"`
	DescriptionHasSuffix    *string  `json:"descriptionHasSuffix,omitempty"`
	DescriptionIsNil        bool     `json:"descriptionIsNil,omitempty"`
	DescriptionNotNil       bool     `json:"descriptionNotNil,omitempty"`
	DescriptionEqualFold    *string  `json:"descriptionEqualFold,omitempty"`
	DescriptionContainsFold *string  `json:"descriptionContainsFold,omitempty"`
}

AuthRoleWhereInput represents a where input for filtering AuthRole queries.

func (*AuthRoleWhereInput) AddPredicates

func (i *AuthRoleWhereInput) AddPredicates(predicates ...predicate.AuthRole)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AuthRoleWhereInput) Filter

Filter applies the AuthRoleWhereInput filter on the AuthRoleQuery builder.

func (*AuthRoleWhereInput) P

P returns a predicate for filtering authroles. An error is returned if the input is empty or invalid.

type AuthRoles

type AuthRoles []*AuthRole

AuthRoles is a parsable slice of AuthRole.

type AuthType

type AuthType struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Value holds the value of the "value" field.
	Value authtype.Value `json:"value,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// contains filtered or unexported fields
}

AuthType is the model entity for the AuthType schema.

func (*AuthType) Node

func (at *AuthType) Node(ctx context.Context) (node *Node, err error)

func (*AuthType) String

func (at *AuthType) String() string

String implements the fmt.Stringer.

func (*AuthType) ToEdge

func (at *AuthType) ToEdge(order *AuthTypeOrder) *AuthTypeEdge

ToEdge converts AuthType into AuthTypeEdge.

func (*AuthType) Unwrap

func (at *AuthType) Unwrap() *AuthType

Unwrap unwraps the AuthType entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AuthType) Update

func (at *AuthType) Update() *AuthTypeUpdateOne

Update returns a builder for updating this AuthType. Note that you need to call AuthType.Unwrap() before calling this method if this AuthType was returned from a transaction, and the transaction was committed or rolled back.

type AuthTypeClient

type AuthTypeClient struct {
	// contains filtered or unexported fields
}

AuthTypeClient is a client for the AuthType schema.

func NewAuthTypeClient

func NewAuthTypeClient(c config) *AuthTypeClient

NewAuthTypeClient returns a client for the AuthType from the given config.

func (*AuthTypeClient) Create

func (c *AuthTypeClient) Create() *AuthTypeCreate

Create returns a builder for creating a AuthType entity.

func (*AuthTypeClient) CreateBulk

func (c *AuthTypeClient) CreateBulk(builders ...*AuthTypeCreate) *AuthTypeCreateBulk

CreateBulk returns a builder for creating a bulk of AuthType entities.

func (*AuthTypeClient) Delete

func (c *AuthTypeClient) Delete() *AuthTypeDelete

Delete returns a delete builder for AuthType.

func (*AuthTypeClient) DeleteOne

func (c *AuthTypeClient) DeleteOne(at *AuthType) *AuthTypeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AuthTypeClient) DeleteOneID

func (c *AuthTypeClient) DeleteOneID(id pulid.PULID) *AuthTypeDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*AuthTypeClient) Get

func (c *AuthTypeClient) Get(ctx context.Context, id pulid.PULID) (*AuthType, error)

Get returns a AuthType entity by its id.

func (*AuthTypeClient) GetX

func (c *AuthTypeClient) GetX(ctx context.Context, id pulid.PULID) *AuthType

GetX is like Get, but panics if an error occurs.

func (*AuthTypeClient) Hooks

func (c *AuthTypeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AuthTypeClient) Query

func (c *AuthTypeClient) Query() *AuthTypeQuery

Query returns a query builder for AuthType.

func (*AuthTypeClient) Update

func (c *AuthTypeClient) Update() *AuthTypeUpdate

Update returns an update builder for AuthType.

func (*AuthTypeClient) UpdateOne

func (c *AuthTypeClient) UpdateOne(at *AuthType) *AuthTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AuthTypeClient) UpdateOneID

func (c *AuthTypeClient) UpdateOneID(id pulid.PULID) *AuthTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AuthTypeClient) Use

func (c *AuthTypeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authtype.Hooks(f(g(h())))`.

type AuthTypeConnection

type AuthTypeConnection struct {
	Edges      []*AuthTypeEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

AuthTypeConnection is the connection containing edges to AuthType.

type AuthTypeCreate

type AuthTypeCreate struct {
	// contains filtered or unexported fields
}

AuthTypeCreate is the builder for creating a AuthType entity.

func (*AuthTypeCreate) Exec

func (atc *AuthTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthTypeCreate) ExecX

func (atc *AuthTypeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthTypeCreate) Mutation

func (atc *AuthTypeCreate) Mutation() *AuthTypeMutation

Mutation returns the AuthTypeMutation object of the builder.

func (*AuthTypeCreate) Save

func (atc *AuthTypeCreate) Save(ctx context.Context) (*AuthType, error)

Save creates the AuthType in the database.

func (*AuthTypeCreate) SaveX

func (atc *AuthTypeCreate) SaveX(ctx context.Context) *AuthType

SaveX calls Save and panics if Save returns an error.

func (*AuthTypeCreate) SetCreatedAt

func (atc *AuthTypeCreate) SetCreatedAt(t time.Time) *AuthTypeCreate

SetCreatedAt sets the "created_at" field.

func (*AuthTypeCreate) SetDeletedAt

func (atc *AuthTypeCreate) SetDeletedAt(t time.Time) *AuthTypeCreate

SetDeletedAt sets the "deleted_at" field.

func (*AuthTypeCreate) SetDescription

func (atc *AuthTypeCreate) SetDescription(s string) *AuthTypeCreate

SetDescription sets the "description" field.

func (*AuthTypeCreate) SetID

func (atc *AuthTypeCreate) SetID(pu pulid.PULID) *AuthTypeCreate

SetID sets the "id" field.

func (*AuthTypeCreate) SetInput

SetInput applies the change-set in the CreateAuthTypeInput on the AuthTypeCreate builder.

func (*AuthTypeCreate) SetNillableCreatedAt

func (atc *AuthTypeCreate) SetNillableCreatedAt(t *time.Time) *AuthTypeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AuthTypeCreate) SetNillableDeletedAt

func (atc *AuthTypeCreate) SetNillableDeletedAt(t *time.Time) *AuthTypeCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*AuthTypeCreate) SetNillableDescription

func (atc *AuthTypeCreate) SetNillableDescription(s *string) *AuthTypeCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AuthTypeCreate) SetNillableID

func (atc *AuthTypeCreate) SetNillableID(pu *pulid.PULID) *AuthTypeCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AuthTypeCreate) SetNillableUpdatedAt

func (atc *AuthTypeCreate) SetNillableUpdatedAt(t *time.Time) *AuthTypeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AuthTypeCreate) SetUpdatedAt

func (atc *AuthTypeCreate) SetUpdatedAt(t time.Time) *AuthTypeCreate

SetUpdatedAt sets the "updated_at" field.

func (*AuthTypeCreate) SetValue

func (atc *AuthTypeCreate) SetValue(a authtype.Value) *AuthTypeCreate

SetValue sets the "value" field.

type AuthTypeCreateBulk

type AuthTypeCreateBulk struct {
	// contains filtered or unexported fields
}

AuthTypeCreateBulk is the builder for creating many AuthType entities in bulk.

func (*AuthTypeCreateBulk) Exec

func (atcb *AuthTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthTypeCreateBulk) ExecX

func (atcb *AuthTypeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthTypeCreateBulk) Save

func (atcb *AuthTypeCreateBulk) Save(ctx context.Context) ([]*AuthType, error)

Save creates the AuthType entities in the database.

func (*AuthTypeCreateBulk) SaveX

func (atcb *AuthTypeCreateBulk) SaveX(ctx context.Context) []*AuthType

SaveX is like Save, but panics if an error occurs.

type AuthTypeDelete

type AuthTypeDelete struct {
	// contains filtered or unexported fields
}

AuthTypeDelete is the builder for deleting a AuthType entity.

func (*AuthTypeDelete) Exec

func (atd *AuthTypeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AuthTypeDelete) ExecX

func (atd *AuthTypeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AuthTypeDelete) Where

func (atd *AuthTypeDelete) Where(ps ...predicate.AuthType) *AuthTypeDelete

Where appends a list predicates to the AuthTypeDelete builder.

type AuthTypeDeleteOne

type AuthTypeDeleteOne struct {
	// contains filtered or unexported fields
}

AuthTypeDeleteOne is the builder for deleting a single AuthType entity.

func (*AuthTypeDeleteOne) Exec

func (atdo *AuthTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AuthTypeDeleteOne) ExecX

func (atdo *AuthTypeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type AuthTypeEdge

type AuthTypeEdge struct {
	Node   *AuthType `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

AuthTypeEdge is the edge representation of AuthType.

type AuthTypeGroupBy

type AuthTypeGroupBy struct {
	// contains filtered or unexported fields
}

AuthTypeGroupBy is the group-by builder for AuthType entities.

func (*AuthTypeGroupBy) Aggregate

func (atgb *AuthTypeGroupBy) Aggregate(fns ...AggregateFunc) *AuthTypeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AuthTypeGroupBy) Bool

func (s *AuthTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AuthTypeGroupBy) BoolX

func (s *AuthTypeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AuthTypeGroupBy) Bools

func (s *AuthTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AuthTypeGroupBy) BoolsX

func (s *AuthTypeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AuthTypeGroupBy) Float64

func (s *AuthTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AuthTypeGroupBy) Float64X

func (s *AuthTypeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AuthTypeGroupBy) Float64s

func (s *AuthTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AuthTypeGroupBy) Float64sX

func (s *AuthTypeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AuthTypeGroupBy) Int

func (s *AuthTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AuthTypeGroupBy) IntX

func (s *AuthTypeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AuthTypeGroupBy) Ints

func (s *AuthTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AuthTypeGroupBy) IntsX

func (s *AuthTypeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AuthTypeGroupBy) Scan

func (atgb *AuthTypeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*AuthTypeGroupBy) ScanX

func (s *AuthTypeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AuthTypeGroupBy) String

func (s *AuthTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AuthTypeGroupBy) StringX

func (s *AuthTypeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AuthTypeGroupBy) Strings

func (s *AuthTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AuthTypeGroupBy) StringsX

func (s *AuthTypeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AuthTypeMutation

type AuthTypeMutation struct {
	// contains filtered or unexported fields
}

AuthTypeMutation represents an operation that mutates the AuthType nodes in the graph.

func (*AuthTypeMutation) AddField

func (m *AuthTypeMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AuthTypeMutation) AddedEdges

func (m *AuthTypeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AuthTypeMutation) AddedField

func (m *AuthTypeMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AuthTypeMutation) AddedFields

func (m *AuthTypeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AuthTypeMutation) AddedIDs

func (m *AuthTypeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AuthTypeMutation) ClearDeletedAt

func (m *AuthTypeMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AuthTypeMutation) ClearDescription

func (m *AuthTypeMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*AuthTypeMutation) ClearEdge

func (m *AuthTypeMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AuthTypeMutation) ClearField

func (m *AuthTypeMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AuthTypeMutation) ClearedEdges

func (m *AuthTypeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AuthTypeMutation) ClearedFields

func (m *AuthTypeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AuthTypeMutation) Client

func (m AuthTypeMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AuthTypeMutation) CreatedAt

func (m *AuthTypeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AuthTypeMutation) DeletedAt

func (m *AuthTypeMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*AuthTypeMutation) DeletedAtCleared

func (m *AuthTypeMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*AuthTypeMutation) Description

func (m *AuthTypeMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*AuthTypeMutation) DescriptionCleared

func (m *AuthTypeMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*AuthTypeMutation) EdgeCleared

func (m *AuthTypeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AuthTypeMutation) Field

func (m *AuthTypeMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AuthTypeMutation) FieldCleared

func (m *AuthTypeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AuthTypeMutation) Fields

func (m *AuthTypeMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AuthTypeMutation) ID

func (m *AuthTypeMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AuthTypeMutation) IDs

func (m *AuthTypeMutation) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AuthTypeMutation) OldCreatedAt

func (m *AuthTypeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AuthType entity. If the AuthType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthTypeMutation) OldDeletedAt

func (m *AuthTypeMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the AuthType entity. If the AuthType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthTypeMutation) OldDescription

func (m *AuthTypeMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" field's value of the AuthType entity. If the AuthType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthTypeMutation) OldField

func (m *AuthTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AuthTypeMutation) OldUpdatedAt

func (m *AuthTypeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AuthType entity. If the AuthType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthTypeMutation) OldValue

func (m *AuthTypeMutation) OldValue(ctx context.Context) (v authtype.Value, err error)

OldValue returns the old "value" field's value of the AuthType entity. If the AuthType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthTypeMutation) Op

func (m *AuthTypeMutation) Op() Op

Op returns the operation name.

func (*AuthTypeMutation) RemovedEdges

func (m *AuthTypeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AuthTypeMutation) RemovedIDs

func (m *AuthTypeMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AuthTypeMutation) ResetCreatedAt

func (m *AuthTypeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AuthTypeMutation) ResetDeletedAt

func (m *AuthTypeMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*AuthTypeMutation) ResetDescription

func (m *AuthTypeMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*AuthTypeMutation) ResetEdge

func (m *AuthTypeMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AuthTypeMutation) ResetField

func (m *AuthTypeMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AuthTypeMutation) ResetUpdatedAt

func (m *AuthTypeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AuthTypeMutation) ResetValue

func (m *AuthTypeMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*AuthTypeMutation) SetCreatedAt

func (m *AuthTypeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AuthTypeMutation) SetDeletedAt

func (m *AuthTypeMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*AuthTypeMutation) SetDescription

func (m *AuthTypeMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*AuthTypeMutation) SetField

func (m *AuthTypeMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AuthTypeMutation) SetID

func (m *AuthTypeMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AuthType entities.

func (*AuthTypeMutation) SetUpdatedAt

func (m *AuthTypeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AuthTypeMutation) SetValue

func (m *AuthTypeMutation) SetValue(a authtype.Value)

SetValue sets the "value" field.

func (AuthTypeMutation) Tx

func (m AuthTypeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AuthTypeMutation) Type

func (m *AuthTypeMutation) Type() string

Type returns the node type of this mutation (AuthType).

func (*AuthTypeMutation) UpdatedAt

func (m *AuthTypeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AuthTypeMutation) Value

func (m *AuthTypeMutation) Value() (r authtype.Value, exists bool)

Value returns the value of the "value" field in the mutation.

func (*AuthTypeMutation) Where

func (m *AuthTypeMutation) Where(ps ...predicate.AuthType)

Where appends a list predicates to the AuthTypeMutation builder.

type AuthTypeOrder

type AuthTypeOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *AuthTypeOrderField `json:"field"`
}

AuthTypeOrder defines the ordering of AuthType.

type AuthTypeOrderField

type AuthTypeOrderField struct {
	// contains filtered or unexported fields
}

AuthTypeOrderField defines the ordering field of AuthType.

func (AuthTypeOrderField) MarshalGQL

func (f AuthTypeOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AuthTypeOrderField) String

func (f AuthTypeOrderField) String() string

String implement fmt.Stringer interface.

func (*AuthTypeOrderField) UnmarshalGQL

func (f *AuthTypeOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AuthTypePaginateOption

type AuthTypePaginateOption func(*authtypePager) error

AuthTypePaginateOption enables pagination customization.

func WithAuthTypeFilter

func WithAuthTypeFilter(filter func(*AuthTypeQuery) (*AuthTypeQuery, error)) AuthTypePaginateOption

WithAuthTypeFilter configures pagination filter.

func WithAuthTypeOrder

func WithAuthTypeOrder(order *AuthTypeOrder) AuthTypePaginateOption

WithAuthTypeOrder configures pagination ordering.

type AuthTypeQuery

type AuthTypeQuery struct {
	// contains filtered or unexported fields
}

AuthTypeQuery is the builder for querying AuthType entities.

func (*AuthTypeQuery) All

func (atq *AuthTypeQuery) All(ctx context.Context) ([]*AuthType, error)

All executes the query and returns a list of AuthTypes.

func (*AuthTypeQuery) AllX

func (atq *AuthTypeQuery) AllX(ctx context.Context) []*AuthType

AllX is like All, but panics if an error occurs.

func (*AuthTypeQuery) Clone

func (atq *AuthTypeQuery) Clone() *AuthTypeQuery

Clone returns a duplicate of the AuthTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AuthTypeQuery) CollectFields

func (at *AuthTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*AuthTypeQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AuthTypeQuery) Count

func (atq *AuthTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AuthTypeQuery) CountX

func (atq *AuthTypeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AuthTypeQuery) Exist

func (atq *AuthTypeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AuthTypeQuery) ExistX

func (atq *AuthTypeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AuthTypeQuery) First

func (atq *AuthTypeQuery) First(ctx context.Context) (*AuthType, error)

First returns the first AuthType entity from the query. Returns a *NotFoundError when no AuthType was found.

func (*AuthTypeQuery) FirstID

func (atq *AuthTypeQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first AuthType ID from the query. Returns a *NotFoundError when no AuthType ID was found.

func (*AuthTypeQuery) FirstIDX

func (atq *AuthTypeQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*AuthTypeQuery) FirstX

func (atq *AuthTypeQuery) FirstX(ctx context.Context) *AuthType

FirstX is like First, but panics if an error occurs.

func (*AuthTypeQuery) GroupBy

func (atq *AuthTypeQuery) GroupBy(field string, fields ...string) *AuthTypeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AuthType.Query().
	GroupBy(authtype.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AuthTypeQuery) IDs

func (atq *AuthTypeQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of AuthType IDs.

func (*AuthTypeQuery) IDsX

func (atq *AuthTypeQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*AuthTypeQuery) Limit

func (atq *AuthTypeQuery) Limit(limit int) *AuthTypeQuery

Limit adds a limit step to the query.

func (*AuthTypeQuery) Offset

func (atq *AuthTypeQuery) Offset(offset int) *AuthTypeQuery

Offset adds an offset step to the query.

func (*AuthTypeQuery) Only

func (atq *AuthTypeQuery) Only(ctx context.Context) (*AuthType, error)

Only returns a single AuthType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuthType entity is found. Returns a *NotFoundError when no AuthType entities are found.

func (*AuthTypeQuery) OnlyID

func (atq *AuthTypeQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only AuthType ID in the query. Returns a *NotSingularError when more than one AuthType ID is found. Returns a *NotFoundError when no entities are found.

func (*AuthTypeQuery) OnlyIDX

func (atq *AuthTypeQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AuthTypeQuery) OnlyX

func (atq *AuthTypeQuery) OnlyX(ctx context.Context) *AuthType

OnlyX is like Only, but panics if an error occurs.

func (*AuthTypeQuery) Order

func (atq *AuthTypeQuery) Order(o ...OrderFunc) *AuthTypeQuery

Order adds an order step to the query.

func (*AuthTypeQuery) Paginate

func (at *AuthTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AuthTypePaginateOption,
) (*AuthTypeConnection, error)

Paginate executes the query and returns a relay based cursor connection to AuthType.

func (*AuthTypeQuery) Select

func (atq *AuthTypeQuery) Select(fields ...string) *AuthTypeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.AuthType.Query().
	Select(authtype.FieldCreatedAt).
	Scan(ctx, &v)

func (*AuthTypeQuery) Unique

func (atq *AuthTypeQuery) Unique(unique bool) *AuthTypeQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AuthTypeQuery) Where

func (atq *AuthTypeQuery) Where(ps ...predicate.AuthType) *AuthTypeQuery

Where adds a new predicate for the AuthTypeQuery builder.

type AuthTypeSelect

type AuthTypeSelect struct {
	*AuthTypeQuery
	// contains filtered or unexported fields
}

AuthTypeSelect is the builder for selecting fields of AuthType entities.

func (*AuthTypeSelect) Bool

func (s *AuthTypeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AuthTypeSelect) BoolX

func (s *AuthTypeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AuthTypeSelect) Bools

func (s *AuthTypeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AuthTypeSelect) BoolsX

func (s *AuthTypeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AuthTypeSelect) Float64

func (s *AuthTypeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AuthTypeSelect) Float64X

func (s *AuthTypeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AuthTypeSelect) Float64s

func (s *AuthTypeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AuthTypeSelect) Float64sX

func (s *AuthTypeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AuthTypeSelect) Int

func (s *AuthTypeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AuthTypeSelect) IntX

func (s *AuthTypeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AuthTypeSelect) Ints

func (s *AuthTypeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AuthTypeSelect) IntsX

func (s *AuthTypeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AuthTypeSelect) Scan

func (ats *AuthTypeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AuthTypeSelect) ScanX

func (s *AuthTypeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AuthTypeSelect) String

func (s *AuthTypeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AuthTypeSelect) StringX

func (s *AuthTypeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AuthTypeSelect) Strings

func (s *AuthTypeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AuthTypeSelect) StringsX

func (s *AuthTypeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AuthTypeUpdate

type AuthTypeUpdate struct {
	// contains filtered or unexported fields
}

AuthTypeUpdate is the builder for updating AuthType entities.

func (*AuthTypeUpdate) ClearDeletedAt

func (atu *AuthTypeUpdate) ClearDeletedAt() *AuthTypeUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AuthTypeUpdate) ClearDescription

func (atu *AuthTypeUpdate) ClearDescription() *AuthTypeUpdate

ClearDescription clears the value of the "description" field.

func (*AuthTypeUpdate) Exec

func (atu *AuthTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthTypeUpdate) ExecX

func (atu *AuthTypeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthTypeUpdate) Mutation

func (atu *AuthTypeUpdate) Mutation() *AuthTypeMutation

Mutation returns the AuthTypeMutation object of the builder.

func (*AuthTypeUpdate) Save

func (atu *AuthTypeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AuthTypeUpdate) SaveX

func (atu *AuthTypeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AuthTypeUpdate) SetDeletedAt

func (atu *AuthTypeUpdate) SetDeletedAt(t time.Time) *AuthTypeUpdate

SetDeletedAt sets the "deleted_at" field.

func (*AuthTypeUpdate) SetDescription

func (atu *AuthTypeUpdate) SetDescription(s string) *AuthTypeUpdate

SetDescription sets the "description" field.

func (*AuthTypeUpdate) SetInput

SetInput applies the change-set in the UpdateAuthTypeInput on the AuthTypeUpdate builder.

func (*AuthTypeUpdate) SetNillableDescription

func (atu *AuthTypeUpdate) SetNillableDescription(s *string) *AuthTypeUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AuthTypeUpdate) SetUpdatedAt

func (atu *AuthTypeUpdate) SetUpdatedAt(t time.Time) *AuthTypeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AuthTypeUpdate) SetValue

func (atu *AuthTypeUpdate) SetValue(a authtype.Value) *AuthTypeUpdate

SetValue sets the "value" field.

func (*AuthTypeUpdate) Where

func (atu *AuthTypeUpdate) Where(ps ...predicate.AuthType) *AuthTypeUpdate

Where appends a list predicates to the AuthTypeUpdate builder.

type AuthTypeUpdateOne

type AuthTypeUpdateOne struct {
	// contains filtered or unexported fields
}

AuthTypeUpdateOne is the builder for updating a single AuthType entity.

func (*AuthTypeUpdateOne) ClearDeletedAt

func (atuo *AuthTypeUpdateOne) ClearDeletedAt() *AuthTypeUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AuthTypeUpdateOne) ClearDescription

func (atuo *AuthTypeUpdateOne) ClearDescription() *AuthTypeUpdateOne

ClearDescription clears the value of the "description" field.

func (*AuthTypeUpdateOne) Exec

func (atuo *AuthTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AuthTypeUpdateOne) ExecX

func (atuo *AuthTypeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthTypeUpdateOne) Mutation

func (atuo *AuthTypeUpdateOne) Mutation() *AuthTypeMutation

Mutation returns the AuthTypeMutation object of the builder.

func (*AuthTypeUpdateOne) Save

func (atuo *AuthTypeUpdateOne) Save(ctx context.Context) (*AuthType, error)

Save executes the query and returns the updated AuthType entity.

func (*AuthTypeUpdateOne) SaveX

func (atuo *AuthTypeUpdateOne) SaveX(ctx context.Context) *AuthType

SaveX is like Save, but panics if an error occurs.

func (*AuthTypeUpdateOne) Select

func (atuo *AuthTypeUpdateOne) Select(field string, fields ...string) *AuthTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AuthTypeUpdateOne) SetDeletedAt

func (atuo *AuthTypeUpdateOne) SetDeletedAt(t time.Time) *AuthTypeUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*AuthTypeUpdateOne) SetDescription

func (atuo *AuthTypeUpdateOne) SetDescription(s string) *AuthTypeUpdateOne

SetDescription sets the "description" field.

func (*AuthTypeUpdateOne) SetInput

SetInput applies the change-set in the UpdateAuthTypeInput on the AuthTypeUpdateOne builder.

func (*AuthTypeUpdateOne) SetNillableDescription

func (atuo *AuthTypeUpdateOne) SetNillableDescription(s *string) *AuthTypeUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*AuthTypeUpdateOne) SetUpdatedAt

func (atuo *AuthTypeUpdateOne) SetUpdatedAt(t time.Time) *AuthTypeUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AuthTypeUpdateOne) SetValue

SetValue sets the "value" field.

type AuthTypeWhereInput

type AuthTypeWhereInput struct {
	Predicates []predicate.AuthType  `json:"-"`
	Not        *AuthTypeWhereInput   `json:"not,omitempty"`
	Or         []*AuthTypeWhereInput `json:"or,omitempty"`
	And        []*AuthTypeWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "value" field predicates.
	Value      *authtype.Value  `json:"value,omitempty"`
	ValueNEQ   *authtype.Value  `json:"valueNEQ,omitempty"`
	ValueIn    []authtype.Value `json:"valueIn,omitempty"`
	ValueNotIn []authtype.Value `json:"valueNotIn,omitempty"`

	// "description" field predicates.
	Description             *string  `json:"description,omitempty"`
	DescriptionNEQ          *string  `json:"descriptionNEQ,omitempty"`
	DescriptionIn           []string `json:"descriptionIn,omitempty"`
	DescriptionNotIn        []string `json:"descriptionNotIn,omitempty"`
	DescriptionGT           *string  `json:"descriptionGT,omitempty"`
	DescriptionGTE          *string  `json:"descriptionGTE,omitempty"`
	DescriptionLT           *string  `json:"descriptionLT,omitempty"`
	DescriptionLTE          *string  `json:"descriptionLTE,omitempty"`
	DescriptionContains     *string  `json:"descriptionContains,omitempty"`
	DescriptionHasPrefix    *string  `json:"descriptionHasPrefix,omitempty"`
	DescriptionHasSuffix    *string  `json:"descriptionHasSuffix,omitempty"`
	DescriptionIsNil        bool     `json:"descriptionIsNil,omitempty"`
	DescriptionNotNil       bool     `json:"descriptionNotNil,omitempty"`
	DescriptionEqualFold    *string  `json:"descriptionEqualFold,omitempty"`
	DescriptionContainsFold *string  `json:"descriptionContainsFold,omitempty"`
}

AuthTypeWhereInput represents a where input for filtering AuthType queries.

func (*AuthTypeWhereInput) AddPredicates

func (i *AuthTypeWhereInput) AddPredicates(predicates ...predicate.AuthType)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AuthTypeWhereInput) Filter

Filter applies the AuthTypeWhereInput filter on the AuthTypeQuery builder.

func (*AuthTypeWhereInput) P

P returns a predicate for filtering authtypes. An error is returned if the input is empty or invalid.

type AuthTypes

type AuthTypes []*AuthType

AuthTypes is a parsable slice of AuthType.

type Blockchain

type Blockchain struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Symbol holds the value of the "symbol" field.
	Symbol string `json:"symbol,omitempty"`
	// Icon holds the value of the "icon" field.
	Icon *string `json:"icon,omitempty"`
	// ChainID holds the value of the "chain_id" field.
	ChainID *int64 `json:"chainID,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BlockchainQuery when eager-loading is set.
	Edges BlockchainEdges `json:"edges"`
	// contains filtered or unexported fields
}

Blockchain is the model entity for the Blockchain schema.

func (*Blockchain) Cryptocurrencies

func (b *Blockchain) Cryptocurrencies(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *CryptocurrencyOrder,
) (*CryptocurrencyConnection, error)

func (*Blockchain) NamedCryptocurrencies

func (b *Blockchain) NamedCryptocurrencies(name string) ([]*Cryptocurrency, error)

NamedCryptocurrencies returns the Cryptocurrencies named value or an error if the edge was not loaded in eager-loading with this name.

func (*Blockchain) NamedTransactions

func (b *Blockchain) NamedTransactions(name string) ([]*Transaction, error)

NamedTransactions returns the Transactions named value or an error if the edge was not loaded in eager-loading with this name.

func (*Blockchain) Node

func (b *Blockchain) Node(ctx context.Context) (node *Node, err error)

func (*Blockchain) QueryCryptocurrencies

func (b *Blockchain) QueryCryptocurrencies() *CryptocurrencyQuery

QueryCryptocurrencies queries the "cryptocurrencies" edge of the Blockchain entity.

func (*Blockchain) QueryTransactions

func (b *Blockchain) QueryTransactions() *TransactionQuery

QueryTransactions queries the "transactions" edge of the Blockchain entity.

func (*Blockchain) String

func (b *Blockchain) String() string

String implements the fmt.Stringer.

func (*Blockchain) ToEdge

func (b *Blockchain) ToEdge(order *BlockchainOrder) *BlockchainEdge

ToEdge converts Blockchain into BlockchainEdge.

func (*Blockchain) Transactions

func (b *Blockchain) Transactions(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *TransactionOrder,
) (*TransactionConnection, error)

func (*Blockchain) Unwrap

func (b *Blockchain) Unwrap() *Blockchain

Unwrap unwraps the Blockchain entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Blockchain) Update

func (b *Blockchain) Update() *BlockchainUpdateOne

Update returns a builder for updating this Blockchain. Note that you need to call Blockchain.Unwrap() before calling this method if this Blockchain was returned from a transaction, and the transaction was committed or rolled back.

type BlockchainClient

type BlockchainClient struct {
	// contains filtered or unexported fields
}

BlockchainClient is a client for the Blockchain schema.

func NewBlockchainClient

func NewBlockchainClient(c config) *BlockchainClient

NewBlockchainClient returns a client for the Blockchain from the given config.

func (*BlockchainClient) Create

func (c *BlockchainClient) Create() *BlockchainCreate

Create returns a builder for creating a Blockchain entity.

func (*BlockchainClient) CreateBulk

func (c *BlockchainClient) CreateBulk(builders ...*BlockchainCreate) *BlockchainCreateBulk

CreateBulk returns a builder for creating a bulk of Blockchain entities.

func (*BlockchainClient) Delete

func (c *BlockchainClient) Delete() *BlockchainDelete

Delete returns a delete builder for Blockchain.

func (*BlockchainClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*BlockchainClient) DeleteOneID

func (c *BlockchainClient) DeleteOneID(id pulid.PULID) *BlockchainDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*BlockchainClient) Get

Get returns a Blockchain entity by its id.

func (*BlockchainClient) GetX

GetX is like Get, but panics if an error occurs.

func (*BlockchainClient) Hooks

func (c *BlockchainClient) Hooks() []Hook

Hooks returns the client hooks.

func (*BlockchainClient) Query

func (c *BlockchainClient) Query() *BlockchainQuery

Query returns a query builder for Blockchain.

func (*BlockchainClient) QueryCryptocurrencies

func (c *BlockchainClient) QueryCryptocurrencies(b *Blockchain) *CryptocurrencyQuery

QueryCryptocurrencies queries the cryptocurrencies edge of a Blockchain.

func (*BlockchainClient) QueryTransactions

func (c *BlockchainClient) QueryTransactions(b *Blockchain) *TransactionQuery

QueryTransactions queries the transactions edge of a Blockchain.

func (*BlockchainClient) Update

func (c *BlockchainClient) Update() *BlockchainUpdate

Update returns an update builder for Blockchain.

func (*BlockchainClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*BlockchainClient) UpdateOneID

func (c *BlockchainClient) UpdateOneID(id pulid.PULID) *BlockchainUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BlockchainClient) Use

func (c *BlockchainClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `blockchain.Hooks(f(g(h())))`.

type BlockchainConnection

type BlockchainConnection struct {
	Edges      []*BlockchainEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

BlockchainConnection is the connection containing edges to Blockchain.

type BlockchainCreate

type BlockchainCreate struct {
	// contains filtered or unexported fields
}

BlockchainCreate is the builder for creating a Blockchain entity.

func (*BlockchainCreate) AddCryptocurrencies

func (bc *BlockchainCreate) AddCryptocurrencies(c ...*Cryptocurrency) *BlockchainCreate

AddCryptocurrencies adds the "cryptocurrencies" edges to the Cryptocurrency entity.

func (*BlockchainCreate) AddCryptocurrencyIDs

func (bc *BlockchainCreate) AddCryptocurrencyIDs(ids ...pulid.PULID) *BlockchainCreate

AddCryptocurrencyIDs adds the "cryptocurrencies" edge to the Cryptocurrency entity by IDs.

func (*BlockchainCreate) AddTransactionIDs

func (bc *BlockchainCreate) AddTransactionIDs(ids ...pulid.PULID) *BlockchainCreate

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*BlockchainCreate) AddTransactions

func (bc *BlockchainCreate) AddTransactions(t ...*Transaction) *BlockchainCreate

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*BlockchainCreate) Exec

func (bc *BlockchainCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BlockchainCreate) ExecX

func (bc *BlockchainCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BlockchainCreate) Mutation

func (bc *BlockchainCreate) Mutation() *BlockchainMutation

Mutation returns the BlockchainMutation object of the builder.

func (*BlockchainCreate) Save

func (bc *BlockchainCreate) Save(ctx context.Context) (*Blockchain, error)

Save creates the Blockchain in the database.

func (*BlockchainCreate) SaveX

func (bc *BlockchainCreate) SaveX(ctx context.Context) *Blockchain

SaveX calls Save and panics if Save returns an error.

func (*BlockchainCreate) SetChainID

func (bc *BlockchainCreate) SetChainID(i int64) *BlockchainCreate

SetChainID sets the "chain_id" field.

func (*BlockchainCreate) SetCreatedAt

func (bc *BlockchainCreate) SetCreatedAt(t time.Time) *BlockchainCreate

SetCreatedAt sets the "created_at" field.

func (*BlockchainCreate) SetDeletedAt

func (bc *BlockchainCreate) SetDeletedAt(t time.Time) *BlockchainCreate

SetDeletedAt sets the "deleted_at" field.

func (*BlockchainCreate) SetID

SetID sets the "id" field.

func (*BlockchainCreate) SetIcon

func (bc *BlockchainCreate) SetIcon(s string) *BlockchainCreate

SetIcon sets the "icon" field.

func (*BlockchainCreate) SetInput

SetInput applies the change-set in the CreateBlockchainInput on the BlockchainCreate builder.

func (*BlockchainCreate) SetName

func (bc *BlockchainCreate) SetName(s string) *BlockchainCreate

SetName sets the "name" field.

func (*BlockchainCreate) SetNillableChainID

func (bc *BlockchainCreate) SetNillableChainID(i *int64) *BlockchainCreate

SetNillableChainID sets the "chain_id" field if the given value is not nil.

func (*BlockchainCreate) SetNillableCreatedAt

func (bc *BlockchainCreate) SetNillableCreatedAt(t *time.Time) *BlockchainCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*BlockchainCreate) SetNillableDeletedAt

func (bc *BlockchainCreate) SetNillableDeletedAt(t *time.Time) *BlockchainCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*BlockchainCreate) SetNillableID

func (bc *BlockchainCreate) SetNillableID(pu *pulid.PULID) *BlockchainCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*BlockchainCreate) SetNillableIcon

func (bc *BlockchainCreate) SetNillableIcon(s *string) *BlockchainCreate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*BlockchainCreate) SetNillableUpdatedAt

func (bc *BlockchainCreate) SetNillableUpdatedAt(t *time.Time) *BlockchainCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*BlockchainCreate) SetSymbol

func (bc *BlockchainCreate) SetSymbol(s string) *BlockchainCreate

SetSymbol sets the "symbol" field.

func (*BlockchainCreate) SetUpdatedAt

func (bc *BlockchainCreate) SetUpdatedAt(t time.Time) *BlockchainCreate

SetUpdatedAt sets the "updated_at" field.

type BlockchainCreateBulk

type BlockchainCreateBulk struct {
	// contains filtered or unexported fields
}

BlockchainCreateBulk is the builder for creating many Blockchain entities in bulk.

func (*BlockchainCreateBulk) Exec

func (bcb *BlockchainCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BlockchainCreateBulk) ExecX

func (bcb *BlockchainCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BlockchainCreateBulk) Save

func (bcb *BlockchainCreateBulk) Save(ctx context.Context) ([]*Blockchain, error)

Save creates the Blockchain entities in the database.

func (*BlockchainCreateBulk) SaveX

func (bcb *BlockchainCreateBulk) SaveX(ctx context.Context) []*Blockchain

SaveX is like Save, but panics if an error occurs.

type BlockchainDelete

type BlockchainDelete struct {
	// contains filtered or unexported fields
}

BlockchainDelete is the builder for deleting a Blockchain entity.

func (*BlockchainDelete) Exec

func (bd *BlockchainDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*BlockchainDelete) ExecX

func (bd *BlockchainDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*BlockchainDelete) Where

Where appends a list predicates to the BlockchainDelete builder.

type BlockchainDeleteOne

type BlockchainDeleteOne struct {
	// contains filtered or unexported fields
}

BlockchainDeleteOne is the builder for deleting a single Blockchain entity.

func (*BlockchainDeleteOne) Exec

func (bdo *BlockchainDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BlockchainDeleteOne) ExecX

func (bdo *BlockchainDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type BlockchainEdge

type BlockchainEdge struct {
	Node   *Blockchain `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

BlockchainEdge is the edge representation of Blockchain.

type BlockchainEdges

type BlockchainEdges struct {
	// Cryptocurrencies holds the value of the cryptocurrencies edge.
	Cryptocurrencies []*Cryptocurrency `json:"cryptocurrencies,omitempty"`
	// Transactions holds the value of the transactions edge.
	Transactions []*Transaction `json:"transactions,omitempty"`
	// contains filtered or unexported fields
}

BlockchainEdges holds the relations/edges for other nodes in the graph.

func (BlockchainEdges) CryptocurrenciesOrErr

func (e BlockchainEdges) CryptocurrenciesOrErr() ([]*Cryptocurrency, error)

CryptocurrenciesOrErr returns the Cryptocurrencies value or an error if the edge was not loaded in eager-loading.

func (BlockchainEdges) TransactionsOrErr

func (e BlockchainEdges) TransactionsOrErr() ([]*Transaction, error)

TransactionsOrErr returns the Transactions value or an error if the edge was not loaded in eager-loading.

type BlockchainGroupBy

type BlockchainGroupBy struct {
	// contains filtered or unexported fields
}

BlockchainGroupBy is the group-by builder for Blockchain entities.

func (*BlockchainGroupBy) Aggregate

func (bgb *BlockchainGroupBy) Aggregate(fns ...AggregateFunc) *BlockchainGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*BlockchainGroupBy) Bool

func (s *BlockchainGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*BlockchainGroupBy) BoolX

func (s *BlockchainGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*BlockchainGroupBy) Bools

func (s *BlockchainGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*BlockchainGroupBy) BoolsX

func (s *BlockchainGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*BlockchainGroupBy) Float64

func (s *BlockchainGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*BlockchainGroupBy) Float64X

func (s *BlockchainGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*BlockchainGroupBy) Float64s

func (s *BlockchainGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*BlockchainGroupBy) Float64sX

func (s *BlockchainGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*BlockchainGroupBy) Int

func (s *BlockchainGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*BlockchainGroupBy) IntX

func (s *BlockchainGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*BlockchainGroupBy) Ints

func (s *BlockchainGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*BlockchainGroupBy) IntsX

func (s *BlockchainGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*BlockchainGroupBy) Scan

func (bgb *BlockchainGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*BlockchainGroupBy) ScanX

func (s *BlockchainGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*BlockchainGroupBy) String

func (s *BlockchainGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*BlockchainGroupBy) StringX

func (s *BlockchainGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*BlockchainGroupBy) Strings

func (s *BlockchainGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*BlockchainGroupBy) StringsX

func (s *BlockchainGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type BlockchainMutation

type BlockchainMutation struct {
	// contains filtered or unexported fields
}

BlockchainMutation represents an operation that mutates the Blockchain nodes in the graph.

func (*BlockchainMutation) AddChainID

func (m *BlockchainMutation) AddChainID(i int64)

AddChainID adds i to the "chain_id" field.

func (*BlockchainMutation) AddCryptocurrencyIDs

func (m *BlockchainMutation) AddCryptocurrencyIDs(ids ...pulid.PULID)

AddCryptocurrencyIDs adds the "cryptocurrencies" edge to the Cryptocurrency entity by ids.

func (*BlockchainMutation) AddField

func (m *BlockchainMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*BlockchainMutation) AddTransactionIDs

func (m *BlockchainMutation) AddTransactionIDs(ids ...pulid.PULID)

AddTransactionIDs adds the "transactions" edge to the Transaction entity by ids.

func (*BlockchainMutation) AddedChainID

func (m *BlockchainMutation) AddedChainID() (r int64, exists bool)

AddedChainID returns the value that was added to the "chain_id" field in this mutation.

func (*BlockchainMutation) AddedEdges

func (m *BlockchainMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*BlockchainMutation) AddedField

func (m *BlockchainMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*BlockchainMutation) AddedFields

func (m *BlockchainMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*BlockchainMutation) AddedIDs

func (m *BlockchainMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*BlockchainMutation) ChainID

func (m *BlockchainMutation) ChainID() (r int64, exists bool)

ChainID returns the value of the "chain_id" field in the mutation.

func (*BlockchainMutation) ChainIDCleared

func (m *BlockchainMutation) ChainIDCleared() bool

ChainIDCleared returns if the "chain_id" field was cleared in this mutation.

func (*BlockchainMutation) ClearChainID

func (m *BlockchainMutation) ClearChainID()

ClearChainID clears the value of the "chain_id" field.

func (*BlockchainMutation) ClearCryptocurrencies

func (m *BlockchainMutation) ClearCryptocurrencies()

ClearCryptocurrencies clears the "cryptocurrencies" edge to the Cryptocurrency entity.

func (*BlockchainMutation) ClearDeletedAt

func (m *BlockchainMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*BlockchainMutation) ClearEdge

func (m *BlockchainMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*BlockchainMutation) ClearField

func (m *BlockchainMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*BlockchainMutation) ClearIcon

func (m *BlockchainMutation) ClearIcon()

ClearIcon clears the value of the "icon" field.

func (*BlockchainMutation) ClearTransactions

func (m *BlockchainMutation) ClearTransactions()

ClearTransactions clears the "transactions" edge to the Transaction entity.

func (*BlockchainMutation) ClearedEdges

func (m *BlockchainMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*BlockchainMutation) ClearedFields

func (m *BlockchainMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (BlockchainMutation) Client

func (m BlockchainMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*BlockchainMutation) CreatedAt

func (m *BlockchainMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*BlockchainMutation) CryptocurrenciesCleared

func (m *BlockchainMutation) CryptocurrenciesCleared() bool

CryptocurrenciesCleared reports if the "cryptocurrencies" edge to the Cryptocurrency entity was cleared.

func (*BlockchainMutation) CryptocurrenciesIDs

func (m *BlockchainMutation) CryptocurrenciesIDs() (ids []pulid.PULID)

CryptocurrenciesIDs returns the "cryptocurrencies" edge IDs in the mutation.

func (*BlockchainMutation) DeletedAt

func (m *BlockchainMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*BlockchainMutation) DeletedAtCleared

func (m *BlockchainMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*BlockchainMutation) EdgeCleared

func (m *BlockchainMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*BlockchainMutation) Field

func (m *BlockchainMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*BlockchainMutation) FieldCleared

func (m *BlockchainMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*BlockchainMutation) Fields

func (m *BlockchainMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*BlockchainMutation) ID

func (m *BlockchainMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*BlockchainMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*BlockchainMutation) Icon

func (m *BlockchainMutation) Icon() (r string, exists bool)

Icon returns the value of the "icon" field in the mutation.

func (*BlockchainMutation) IconCleared

func (m *BlockchainMutation) IconCleared() bool

IconCleared returns if the "icon" field was cleared in this mutation.

func (*BlockchainMutation) Name

func (m *BlockchainMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*BlockchainMutation) OldChainID

func (m *BlockchainMutation) OldChainID(ctx context.Context) (v *int64, err error)

OldChainID returns the old "chain_id" field's value of the Blockchain entity. If the Blockchain object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BlockchainMutation) OldCreatedAt

func (m *BlockchainMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Blockchain entity. If the Blockchain object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BlockchainMutation) OldDeletedAt

func (m *BlockchainMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Blockchain entity. If the Blockchain object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BlockchainMutation) OldField

func (m *BlockchainMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*BlockchainMutation) OldIcon

func (m *BlockchainMutation) OldIcon(ctx context.Context) (v *string, err error)

OldIcon returns the old "icon" field's value of the Blockchain entity. If the Blockchain object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BlockchainMutation) OldName

func (m *BlockchainMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Blockchain entity. If the Blockchain object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BlockchainMutation) OldSymbol

func (m *BlockchainMutation) OldSymbol(ctx context.Context) (v string, err error)

OldSymbol returns the old "symbol" field's value of the Blockchain entity. If the Blockchain object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BlockchainMutation) OldUpdatedAt

func (m *BlockchainMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Blockchain entity. If the Blockchain object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BlockchainMutation) Op

func (m *BlockchainMutation) Op() Op

Op returns the operation name.

func (*BlockchainMutation) RemoveCryptocurrencyIDs

func (m *BlockchainMutation) RemoveCryptocurrencyIDs(ids ...pulid.PULID)

RemoveCryptocurrencyIDs removes the "cryptocurrencies" edge to the Cryptocurrency entity by IDs.

func (*BlockchainMutation) RemoveTransactionIDs

func (m *BlockchainMutation) RemoveTransactionIDs(ids ...pulid.PULID)

RemoveTransactionIDs removes the "transactions" edge to the Transaction entity by IDs.

func (*BlockchainMutation) RemovedCryptocurrenciesIDs

func (m *BlockchainMutation) RemovedCryptocurrenciesIDs() (ids []pulid.PULID)

RemovedCryptocurrencies returns the removed IDs of the "cryptocurrencies" edge to the Cryptocurrency entity.

func (*BlockchainMutation) RemovedEdges

func (m *BlockchainMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*BlockchainMutation) RemovedIDs

func (m *BlockchainMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*BlockchainMutation) RemovedTransactionsIDs

func (m *BlockchainMutation) RemovedTransactionsIDs() (ids []pulid.PULID)

RemovedTransactions returns the removed IDs of the "transactions" edge to the Transaction entity.

func (*BlockchainMutation) ResetChainID

func (m *BlockchainMutation) ResetChainID()

ResetChainID resets all changes to the "chain_id" field.

func (*BlockchainMutation) ResetCreatedAt

func (m *BlockchainMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*BlockchainMutation) ResetCryptocurrencies

func (m *BlockchainMutation) ResetCryptocurrencies()

ResetCryptocurrencies resets all changes to the "cryptocurrencies" edge.

func (*BlockchainMutation) ResetDeletedAt

func (m *BlockchainMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*BlockchainMutation) ResetEdge

func (m *BlockchainMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*BlockchainMutation) ResetField

func (m *BlockchainMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*BlockchainMutation) ResetIcon

func (m *BlockchainMutation) ResetIcon()

ResetIcon resets all changes to the "icon" field.

func (*BlockchainMutation) ResetName

func (m *BlockchainMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*BlockchainMutation) ResetSymbol

func (m *BlockchainMutation) ResetSymbol()

ResetSymbol resets all changes to the "symbol" field.

func (*BlockchainMutation) ResetTransactions

func (m *BlockchainMutation) ResetTransactions()

ResetTransactions resets all changes to the "transactions" edge.

func (*BlockchainMutation) ResetUpdatedAt

func (m *BlockchainMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*BlockchainMutation) SetChainID

func (m *BlockchainMutation) SetChainID(i int64)

SetChainID sets the "chain_id" field.

func (*BlockchainMutation) SetCreatedAt

func (m *BlockchainMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*BlockchainMutation) SetDeletedAt

func (m *BlockchainMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*BlockchainMutation) SetField

func (m *BlockchainMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*BlockchainMutation) SetID

func (m *BlockchainMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Blockchain entities.

func (*BlockchainMutation) SetIcon

func (m *BlockchainMutation) SetIcon(s string)

SetIcon sets the "icon" field.

func (*BlockchainMutation) SetName

func (m *BlockchainMutation) SetName(s string)

SetName sets the "name" field.

func (*BlockchainMutation) SetSymbol

func (m *BlockchainMutation) SetSymbol(s string)

SetSymbol sets the "symbol" field.

func (*BlockchainMutation) SetUpdatedAt

func (m *BlockchainMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*BlockchainMutation) Symbol

func (m *BlockchainMutation) Symbol() (r string, exists bool)

Symbol returns the value of the "symbol" field in the mutation.

func (*BlockchainMutation) TransactionsCleared

func (m *BlockchainMutation) TransactionsCleared() bool

TransactionsCleared reports if the "transactions" edge to the Transaction entity was cleared.

func (*BlockchainMutation) TransactionsIDs

func (m *BlockchainMutation) TransactionsIDs() (ids []pulid.PULID)

TransactionsIDs returns the "transactions" edge IDs in the mutation.

func (BlockchainMutation) Tx

func (m BlockchainMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*BlockchainMutation) Type

func (m *BlockchainMutation) Type() string

Type returns the node type of this mutation (Blockchain).

func (*BlockchainMutation) UpdatedAt

func (m *BlockchainMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*BlockchainMutation) Where

func (m *BlockchainMutation) Where(ps ...predicate.Blockchain)

Where appends a list predicates to the BlockchainMutation builder.

type BlockchainOrder

type BlockchainOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *BlockchainOrderField `json:"field"`
}

BlockchainOrder defines the ordering of Blockchain.

type BlockchainOrderField

type BlockchainOrderField struct {
	// contains filtered or unexported fields
}

BlockchainOrderField defines the ordering field of Blockchain.

func (BlockchainOrderField) MarshalGQL

func (f BlockchainOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (BlockchainOrderField) String

func (f BlockchainOrderField) String() string

String implement fmt.Stringer interface.

func (*BlockchainOrderField) UnmarshalGQL

func (f *BlockchainOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type BlockchainPaginateOption

type BlockchainPaginateOption func(*blockchainPager) error

BlockchainPaginateOption enables pagination customization.

func WithBlockchainFilter

func WithBlockchainFilter(filter func(*BlockchainQuery) (*BlockchainQuery, error)) BlockchainPaginateOption

WithBlockchainFilter configures pagination filter.

func WithBlockchainOrder

func WithBlockchainOrder(order *BlockchainOrder) BlockchainPaginateOption

WithBlockchainOrder configures pagination ordering.

type BlockchainQuery

type BlockchainQuery struct {
	// contains filtered or unexported fields
}

BlockchainQuery is the builder for querying Blockchain entities.

func (*BlockchainQuery) All

func (bq *BlockchainQuery) All(ctx context.Context) ([]*Blockchain, error)

All executes the query and returns a list of Blockchains.

func (*BlockchainQuery) AllX

func (bq *BlockchainQuery) AllX(ctx context.Context) []*Blockchain

AllX is like All, but panics if an error occurs.

func (*BlockchainQuery) Clone

func (bq *BlockchainQuery) Clone() *BlockchainQuery

Clone returns a duplicate of the BlockchainQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*BlockchainQuery) CollectFields

func (b *BlockchainQuery) CollectFields(ctx context.Context, satisfies ...string) (*BlockchainQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*BlockchainQuery) Count

func (bq *BlockchainQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BlockchainQuery) CountX

func (bq *BlockchainQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*BlockchainQuery) Exist

func (bq *BlockchainQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*BlockchainQuery) ExistX

func (bq *BlockchainQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*BlockchainQuery) First

func (bq *BlockchainQuery) First(ctx context.Context) (*Blockchain, error)

First returns the first Blockchain entity from the query. Returns a *NotFoundError when no Blockchain was found.

func (*BlockchainQuery) FirstID

func (bq *BlockchainQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Blockchain ID from the query. Returns a *NotFoundError when no Blockchain ID was found.

func (*BlockchainQuery) FirstIDX

func (bq *BlockchainQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*BlockchainQuery) FirstX

func (bq *BlockchainQuery) FirstX(ctx context.Context) *Blockchain

FirstX is like First, but panics if an error occurs.

func (*BlockchainQuery) GroupBy

func (bq *BlockchainQuery) GroupBy(field string, fields ...string) *BlockchainGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Blockchain.Query().
	GroupBy(blockchain.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BlockchainQuery) IDs

func (bq *BlockchainQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Blockchain IDs.

func (*BlockchainQuery) IDsX

func (bq *BlockchainQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*BlockchainQuery) Limit

func (bq *BlockchainQuery) Limit(limit int) *BlockchainQuery

Limit adds a limit step to the query.

func (*BlockchainQuery) Offset

func (bq *BlockchainQuery) Offset(offset int) *BlockchainQuery

Offset adds an offset step to the query.

func (*BlockchainQuery) Only

func (bq *BlockchainQuery) Only(ctx context.Context) (*Blockchain, error)

Only returns a single Blockchain entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Blockchain entity is found. Returns a *NotFoundError when no Blockchain entities are found.

func (*BlockchainQuery) OnlyID

func (bq *BlockchainQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Blockchain ID in the query. Returns a *NotSingularError when more than one Blockchain ID is found. Returns a *NotFoundError when no entities are found.

func (*BlockchainQuery) OnlyIDX

func (bq *BlockchainQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*BlockchainQuery) OnlyX

func (bq *BlockchainQuery) OnlyX(ctx context.Context) *Blockchain

OnlyX is like Only, but panics if an error occurs.

func (*BlockchainQuery) Order

func (bq *BlockchainQuery) Order(o ...OrderFunc) *BlockchainQuery

Order adds an order step to the query.

func (*BlockchainQuery) Paginate

func (b *BlockchainQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...BlockchainPaginateOption,
) (*BlockchainConnection, error)

Paginate executes the query and returns a relay based cursor connection to Blockchain.

func (*BlockchainQuery) QueryCryptocurrencies

func (bq *BlockchainQuery) QueryCryptocurrencies() *CryptocurrencyQuery

QueryCryptocurrencies chains the current query on the "cryptocurrencies" edge.

func (*BlockchainQuery) QueryTransactions

func (bq *BlockchainQuery) QueryTransactions() *TransactionQuery

QueryTransactions chains the current query on the "transactions" edge.

func (*BlockchainQuery) Select

func (bq *BlockchainQuery) Select(fields ...string) *BlockchainSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Blockchain.Query().
	Select(blockchain.FieldCreatedAt).
	Scan(ctx, &v)

func (*BlockchainQuery) Unique

func (bq *BlockchainQuery) Unique(unique bool) *BlockchainQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*BlockchainQuery) Where

Where adds a new predicate for the BlockchainQuery builder.

func (*BlockchainQuery) WithCryptocurrencies

func (bq *BlockchainQuery) WithCryptocurrencies(opts ...func(*CryptocurrencyQuery)) *BlockchainQuery

WithCryptocurrencies tells the query-builder to eager-load the nodes that are connected to the "cryptocurrencies" edge. The optional arguments are used to configure the query builder of the edge.

func (*BlockchainQuery) WithNamedCryptocurrencies

func (bq *BlockchainQuery) WithNamedCryptocurrencies(name string, opts ...func(*CryptocurrencyQuery)) *BlockchainQuery

WithNamedCryptocurrencies tells the query-builder to eager-load the nodes that are connected to the "cryptocurrencies" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*BlockchainQuery) WithNamedTransactions

func (bq *BlockchainQuery) WithNamedTransactions(name string, opts ...func(*TransactionQuery)) *BlockchainQuery

WithNamedTransactions tells the query-builder to eager-load the nodes that are connected to the "transactions" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*BlockchainQuery) WithTransactions

func (bq *BlockchainQuery) WithTransactions(opts ...func(*TransactionQuery)) *BlockchainQuery

WithTransactions tells the query-builder to eager-load the nodes that are connected to the "transactions" edge. The optional arguments are used to configure the query builder of the edge.

type BlockchainSelect

type BlockchainSelect struct {
	*BlockchainQuery
	// contains filtered or unexported fields
}

BlockchainSelect is the builder for selecting fields of Blockchain entities.

func (*BlockchainSelect) Bool

func (s *BlockchainSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*BlockchainSelect) BoolX

func (s *BlockchainSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*BlockchainSelect) Bools

func (s *BlockchainSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*BlockchainSelect) BoolsX

func (s *BlockchainSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*BlockchainSelect) Float64

func (s *BlockchainSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*BlockchainSelect) Float64X

func (s *BlockchainSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*BlockchainSelect) Float64s

func (s *BlockchainSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*BlockchainSelect) Float64sX

func (s *BlockchainSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*BlockchainSelect) Int

func (s *BlockchainSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*BlockchainSelect) IntX

func (s *BlockchainSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*BlockchainSelect) Ints

func (s *BlockchainSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*BlockchainSelect) IntsX

func (s *BlockchainSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*BlockchainSelect) Scan

func (bs *BlockchainSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*BlockchainSelect) ScanX

func (s *BlockchainSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*BlockchainSelect) String

func (s *BlockchainSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*BlockchainSelect) StringX

func (s *BlockchainSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*BlockchainSelect) Strings

func (s *BlockchainSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*BlockchainSelect) StringsX

func (s *BlockchainSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type BlockchainUpdate

type BlockchainUpdate struct {
	// contains filtered or unexported fields
}

BlockchainUpdate is the builder for updating Blockchain entities.

func (*BlockchainUpdate) AddChainID

func (bu *BlockchainUpdate) AddChainID(i int64) *BlockchainUpdate

AddChainID adds i to the "chain_id" field.

func (*BlockchainUpdate) AddCryptocurrencies

func (bu *BlockchainUpdate) AddCryptocurrencies(c ...*Cryptocurrency) *BlockchainUpdate

AddCryptocurrencies adds the "cryptocurrencies" edges to the Cryptocurrency entity.

func (*BlockchainUpdate) AddCryptocurrencyIDs

func (bu *BlockchainUpdate) AddCryptocurrencyIDs(ids ...pulid.PULID) *BlockchainUpdate

AddCryptocurrencyIDs adds the "cryptocurrencies" edge to the Cryptocurrency entity by IDs.

func (*BlockchainUpdate) AddTransactionIDs

func (bu *BlockchainUpdate) AddTransactionIDs(ids ...pulid.PULID) *BlockchainUpdate

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*BlockchainUpdate) AddTransactions

func (bu *BlockchainUpdate) AddTransactions(t ...*Transaction) *BlockchainUpdate

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*BlockchainUpdate) ClearChainID

func (bu *BlockchainUpdate) ClearChainID() *BlockchainUpdate

ClearChainID clears the value of the "chain_id" field.

func (*BlockchainUpdate) ClearCryptocurrencies

func (bu *BlockchainUpdate) ClearCryptocurrencies() *BlockchainUpdate

ClearCryptocurrencies clears all "cryptocurrencies" edges to the Cryptocurrency entity.

func (*BlockchainUpdate) ClearDeletedAt

func (bu *BlockchainUpdate) ClearDeletedAt() *BlockchainUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*BlockchainUpdate) ClearIcon

func (bu *BlockchainUpdate) ClearIcon() *BlockchainUpdate

ClearIcon clears the value of the "icon" field.

func (*BlockchainUpdate) ClearTransactions

func (bu *BlockchainUpdate) ClearTransactions() *BlockchainUpdate

ClearTransactions clears all "transactions" edges to the Transaction entity.

func (*BlockchainUpdate) Exec

func (bu *BlockchainUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BlockchainUpdate) ExecX

func (bu *BlockchainUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BlockchainUpdate) Mutation

func (bu *BlockchainUpdate) Mutation() *BlockchainMutation

Mutation returns the BlockchainMutation object of the builder.

func (*BlockchainUpdate) RemoveCryptocurrencies

func (bu *BlockchainUpdate) RemoveCryptocurrencies(c ...*Cryptocurrency) *BlockchainUpdate

RemoveCryptocurrencies removes "cryptocurrencies" edges to Cryptocurrency entities.

func (*BlockchainUpdate) RemoveCryptocurrencyIDs

func (bu *BlockchainUpdate) RemoveCryptocurrencyIDs(ids ...pulid.PULID) *BlockchainUpdate

RemoveCryptocurrencyIDs removes the "cryptocurrencies" edge to Cryptocurrency entities by IDs.

func (*BlockchainUpdate) RemoveTransactionIDs

func (bu *BlockchainUpdate) RemoveTransactionIDs(ids ...pulid.PULID) *BlockchainUpdate

RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.

func (*BlockchainUpdate) RemoveTransactions

func (bu *BlockchainUpdate) RemoveTransactions(t ...*Transaction) *BlockchainUpdate

RemoveTransactions removes "transactions" edges to Transaction entities.

func (*BlockchainUpdate) Save

func (bu *BlockchainUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*BlockchainUpdate) SaveX

func (bu *BlockchainUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*BlockchainUpdate) SetChainID

func (bu *BlockchainUpdate) SetChainID(i int64) *BlockchainUpdate

SetChainID sets the "chain_id" field.

func (*BlockchainUpdate) SetDeletedAt

func (bu *BlockchainUpdate) SetDeletedAt(t time.Time) *BlockchainUpdate

SetDeletedAt sets the "deleted_at" field.

func (*BlockchainUpdate) SetIcon

func (bu *BlockchainUpdate) SetIcon(s string) *BlockchainUpdate

SetIcon sets the "icon" field.

func (*BlockchainUpdate) SetInput

SetInput applies the change-set in the UpdateBlockchainInput on the BlockchainUpdate builder.

func (*BlockchainUpdate) SetName

func (bu *BlockchainUpdate) SetName(s string) *BlockchainUpdate

SetName sets the "name" field.

func (*BlockchainUpdate) SetNillableChainID

func (bu *BlockchainUpdate) SetNillableChainID(i *int64) *BlockchainUpdate

SetNillableChainID sets the "chain_id" field if the given value is not nil.

func (*BlockchainUpdate) SetNillableIcon

func (bu *BlockchainUpdate) SetNillableIcon(s *string) *BlockchainUpdate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*BlockchainUpdate) SetSymbol

func (bu *BlockchainUpdate) SetSymbol(s string) *BlockchainUpdate

SetSymbol sets the "symbol" field.

func (*BlockchainUpdate) SetUpdatedAt

func (bu *BlockchainUpdate) SetUpdatedAt(t time.Time) *BlockchainUpdate

SetUpdatedAt sets the "updated_at" field.

func (*BlockchainUpdate) Where

Where appends a list predicates to the BlockchainUpdate builder.

type BlockchainUpdateOne

type BlockchainUpdateOne struct {
	// contains filtered or unexported fields
}

BlockchainUpdateOne is the builder for updating a single Blockchain entity.

func (*BlockchainUpdateOne) AddChainID

func (buo *BlockchainUpdateOne) AddChainID(i int64) *BlockchainUpdateOne

AddChainID adds i to the "chain_id" field.

func (*BlockchainUpdateOne) AddCryptocurrencies

func (buo *BlockchainUpdateOne) AddCryptocurrencies(c ...*Cryptocurrency) *BlockchainUpdateOne

AddCryptocurrencies adds the "cryptocurrencies" edges to the Cryptocurrency entity.

func (*BlockchainUpdateOne) AddCryptocurrencyIDs

func (buo *BlockchainUpdateOne) AddCryptocurrencyIDs(ids ...pulid.PULID) *BlockchainUpdateOne

AddCryptocurrencyIDs adds the "cryptocurrencies" edge to the Cryptocurrency entity by IDs.

func (*BlockchainUpdateOne) AddTransactionIDs

func (buo *BlockchainUpdateOne) AddTransactionIDs(ids ...pulid.PULID) *BlockchainUpdateOne

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*BlockchainUpdateOne) AddTransactions

func (buo *BlockchainUpdateOne) AddTransactions(t ...*Transaction) *BlockchainUpdateOne

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*BlockchainUpdateOne) ClearChainID

func (buo *BlockchainUpdateOne) ClearChainID() *BlockchainUpdateOne

ClearChainID clears the value of the "chain_id" field.

func (*BlockchainUpdateOne) ClearCryptocurrencies

func (buo *BlockchainUpdateOne) ClearCryptocurrencies() *BlockchainUpdateOne

ClearCryptocurrencies clears all "cryptocurrencies" edges to the Cryptocurrency entity.

func (*BlockchainUpdateOne) ClearDeletedAt

func (buo *BlockchainUpdateOne) ClearDeletedAt() *BlockchainUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*BlockchainUpdateOne) ClearIcon

func (buo *BlockchainUpdateOne) ClearIcon() *BlockchainUpdateOne

ClearIcon clears the value of the "icon" field.

func (*BlockchainUpdateOne) ClearTransactions

func (buo *BlockchainUpdateOne) ClearTransactions() *BlockchainUpdateOne

ClearTransactions clears all "transactions" edges to the Transaction entity.

func (*BlockchainUpdateOne) Exec

func (buo *BlockchainUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BlockchainUpdateOne) ExecX

func (buo *BlockchainUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BlockchainUpdateOne) Mutation

func (buo *BlockchainUpdateOne) Mutation() *BlockchainMutation

Mutation returns the BlockchainMutation object of the builder.

func (*BlockchainUpdateOne) RemoveCryptocurrencies

func (buo *BlockchainUpdateOne) RemoveCryptocurrencies(c ...*Cryptocurrency) *BlockchainUpdateOne

RemoveCryptocurrencies removes "cryptocurrencies" edges to Cryptocurrency entities.

func (*BlockchainUpdateOne) RemoveCryptocurrencyIDs

func (buo *BlockchainUpdateOne) RemoveCryptocurrencyIDs(ids ...pulid.PULID) *BlockchainUpdateOne

RemoveCryptocurrencyIDs removes the "cryptocurrencies" edge to Cryptocurrency entities by IDs.

func (*BlockchainUpdateOne) RemoveTransactionIDs

func (buo *BlockchainUpdateOne) RemoveTransactionIDs(ids ...pulid.PULID) *BlockchainUpdateOne

RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.

func (*BlockchainUpdateOne) RemoveTransactions

func (buo *BlockchainUpdateOne) RemoveTransactions(t ...*Transaction) *BlockchainUpdateOne

RemoveTransactions removes "transactions" edges to Transaction entities.

func (*BlockchainUpdateOne) Save

func (buo *BlockchainUpdateOne) Save(ctx context.Context) (*Blockchain, error)

Save executes the query and returns the updated Blockchain entity.

func (*BlockchainUpdateOne) SaveX

func (buo *BlockchainUpdateOne) SaveX(ctx context.Context) *Blockchain

SaveX is like Save, but panics if an error occurs.

func (*BlockchainUpdateOne) Select

func (buo *BlockchainUpdateOne) Select(field string, fields ...string) *BlockchainUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*BlockchainUpdateOne) SetChainID

func (buo *BlockchainUpdateOne) SetChainID(i int64) *BlockchainUpdateOne

SetChainID sets the "chain_id" field.

func (*BlockchainUpdateOne) SetDeletedAt

func (buo *BlockchainUpdateOne) SetDeletedAt(t time.Time) *BlockchainUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*BlockchainUpdateOne) SetIcon

SetIcon sets the "icon" field.

func (*BlockchainUpdateOne) SetInput

SetInput applies the change-set in the UpdateBlockchainInput on the BlockchainUpdateOne builder.

func (*BlockchainUpdateOne) SetName

SetName sets the "name" field.

func (*BlockchainUpdateOne) SetNillableChainID

func (buo *BlockchainUpdateOne) SetNillableChainID(i *int64) *BlockchainUpdateOne

SetNillableChainID sets the "chain_id" field if the given value is not nil.

func (*BlockchainUpdateOne) SetNillableIcon

func (buo *BlockchainUpdateOne) SetNillableIcon(s *string) *BlockchainUpdateOne

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*BlockchainUpdateOne) SetSymbol

func (buo *BlockchainUpdateOne) SetSymbol(s string) *BlockchainUpdateOne

SetSymbol sets the "symbol" field.

func (*BlockchainUpdateOne) SetUpdatedAt

func (buo *BlockchainUpdateOne) SetUpdatedAt(t time.Time) *BlockchainUpdateOne

SetUpdatedAt sets the "updated_at" field.

type BlockchainWhereInput

type BlockchainWhereInput struct {
	Predicates []predicate.Blockchain  `json:"-"`
	Not        *BlockchainWhereInput   `json:"not,omitempty"`
	Or         []*BlockchainWhereInput `json:"or,omitempty"`
	And        []*BlockchainWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "symbol" field predicates.
	Symbol             *string  `json:"symbol,omitempty"`
	SymbolNEQ          *string  `json:"symbolNEQ,omitempty"`
	SymbolIn           []string `json:"symbolIn,omitempty"`
	SymbolNotIn        []string `json:"symbolNotIn,omitempty"`
	SymbolGT           *string  `json:"symbolGT,omitempty"`
	SymbolGTE          *string  `json:"symbolGTE,omitempty"`
	SymbolLT           *string  `json:"symbolLT,omitempty"`
	SymbolLTE          *string  `json:"symbolLTE,omitempty"`
	SymbolContains     *string  `json:"symbolContains,omitempty"`
	SymbolHasPrefix    *string  `json:"symbolHasPrefix,omitempty"`
	SymbolHasSuffix    *string  `json:"symbolHasSuffix,omitempty"`
	SymbolEqualFold    *string  `json:"symbolEqualFold,omitempty"`
	SymbolContainsFold *string  `json:"symbolContainsFold,omitempty"`

	// "chain_id" field predicates.
	ChainID       *int64  `json:"chainID,omitempty"`
	ChainIDNEQ    *int64  `json:"chainIDNEQ,omitempty"`
	ChainIDIn     []int64 `json:"chainIDIn,omitempty"`
	ChainIDNotIn  []int64 `json:"chainIDNotIn,omitempty"`
	ChainIDGT     *int64  `json:"chainIDGT,omitempty"`
	ChainIDGTE    *int64  `json:"chainIDGTE,omitempty"`
	ChainIDLT     *int64  `json:"chainIDLT,omitempty"`
	ChainIDLTE    *int64  `json:"chainIDLTE,omitempty"`
	ChainIDIsNil  bool    `json:"chainIDIsNil,omitempty"`
	ChainIDNotNil bool    `json:"chainIDNotNil,omitempty"`
}

BlockchainWhereInput represents a where input for filtering Blockchain queries.

func (*BlockchainWhereInput) AddPredicates

func (i *BlockchainWhereInput) AddPredicates(predicates ...predicate.Blockchain)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*BlockchainWhereInput) Filter

Filter applies the BlockchainWhereInput filter on the BlockchainQuery builder.

func (*BlockchainWhereInput) P

P returns a predicate for filtering blockchains. An error is returned if the input is empty or invalid.

type Blockchains

type Blockchains []*Blockchain

Blockchains is a parsable slice of Blockchain.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Account is the client for interacting with the Account builders.
	Account *AccountClient
	// Asset is the client for interacting with the Asset builders.
	Asset *AssetClient
	// AssetClass is the client for interacting with the AssetClass builders.
	AssetClass *AssetClassClient
	// AuthRole is the client for interacting with the AuthRole builders.
	AuthRole *AuthRoleClient
	// AuthType is the client for interacting with the AuthType builders.
	AuthType *AuthTypeClient
	// Blockchain is the client for interacting with the Blockchain builders.
	Blockchain *BlockchainClient
	// Connection is the client for interacting with the Connection builders.
	Connection *ConnectionClient
	// Cryptocurrency is the client for interacting with the Cryptocurrency builders.
	Cryptocurrency *CryptocurrencyClient
	// DailyAssetPrice is the client for interacting with the DailyAssetPrice builders.
	DailyAssetPrice *DailyAssetPriceClient
	// Exchange is the client for interacting with the Exchange builders.
	Exchange *ExchangeClient
	// Portfolio is the client for interacting with the Portfolio builders.
	Portfolio *PortfolioClient
	// Source is the client for interacting with the Source builders.
	Source *SourceClient
	// SourceType is the client for interacting with the SourceType builders.
	SourceType *SourceTypeClient
	// StaffAccount is the client for interacting with the StaffAccount builders.
	StaffAccount *StaffAccountClient
	// Transaction is the client for interacting with the Transaction builders.
	Transaction *TransactionClient
	// TransactionType is the client for interacting with the TransactionType builders.
	TransactionType *TransactionTypeClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Account.
	Query().
	Count(ctx)

func (*Client) Node

func (c *Client) Node(ctx context.Context, id pulid.PULID) (*Node, error)

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id pulid.PULID, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []pulid.PULID, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type Connection

type Connection struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// AccessToken holds the value of the "access_token" field.
	AccessToken string `json:"accessToken,omitempty"`
	// RefreshToken holds the value of the "refresh_token" field.
	RefreshToken *string `json:"refreshToken,omitempty"`
	// AccountID holds the value of the "account_id" field.
	AccountID pulid.PULID `json:"accountID,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID pulid.PULID `json:"sourceID,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ConnectionQuery when eager-loading is set.
	Edges ConnectionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Connection is the model entity for the Connection schema.

func (*Connection) Account

func (c *Connection) Account(ctx context.Context) (*Account, error)

func (*Connection) NamedPortfolios

func (c *Connection) NamedPortfolios(name string) ([]*Portfolio, error)

NamedPortfolios returns the Portfolios named value or an error if the edge was not loaded in eager-loading with this name.

func (*Connection) Node

func (c *Connection) Node(ctx context.Context) (node *Node, err error)

func (*Connection) Portfolios

func (c *Connection) Portfolios(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *PortfolioOrder,
) (*PortfolioConnection, error)

func (*Connection) QueryAccount

func (c *Connection) QueryAccount() *AccountQuery

QueryAccount queries the "account" edge of the Connection entity.

func (*Connection) QueryPortfolios

func (c *Connection) QueryPortfolios() *PortfolioQuery

QueryPortfolios queries the "portfolios" edge of the Connection entity.

func (*Connection) QuerySource

func (c *Connection) QuerySource() *SourceQuery

QuerySource queries the "source" edge of the Connection entity.

func (*Connection) Source

func (c *Connection) Source(ctx context.Context) (*Source, error)

func (*Connection) String

func (c *Connection) String() string

String implements the fmt.Stringer.

func (*Connection) ToEdge

func (c *Connection) ToEdge(order *ConnectionOrder) *ConnectionEdge

ToEdge converts Connection into ConnectionEdge.

func (*Connection) Unwrap

func (c *Connection) Unwrap() *Connection

Unwrap unwraps the Connection entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Connection) Update

func (c *Connection) Update() *ConnectionUpdateOne

Update returns a builder for updating this Connection. Note that you need to call Connection.Unwrap() before calling this method if this Connection was returned from a transaction, and the transaction was committed or rolled back.

type ConnectionClient

type ConnectionClient struct {
	// contains filtered or unexported fields
}

ConnectionClient is a client for the Connection schema.

func NewConnectionClient

func NewConnectionClient(c config) *ConnectionClient

NewConnectionClient returns a client for the Connection from the given config.

func (*ConnectionClient) Create

func (c *ConnectionClient) Create() *ConnectionCreate

Create returns a builder for creating a Connection entity.

func (*ConnectionClient) CreateBulk

func (c *ConnectionClient) CreateBulk(builders ...*ConnectionCreate) *ConnectionCreateBulk

CreateBulk returns a builder for creating a bulk of Connection entities.

func (*ConnectionClient) Delete

func (c *ConnectionClient) Delete() *ConnectionDelete

Delete returns a delete builder for Connection.

func (*ConnectionClient) DeleteOne

func (c *ConnectionClient) DeleteOne(co *Connection) *ConnectionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ConnectionClient) DeleteOneID

func (c *ConnectionClient) DeleteOneID(id pulid.PULID) *ConnectionDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*ConnectionClient) Get

Get returns a Connection entity by its id.

func (*ConnectionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ConnectionClient) Hooks

func (c *ConnectionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ConnectionClient) Query

func (c *ConnectionClient) Query() *ConnectionQuery

Query returns a query builder for Connection.

func (*ConnectionClient) QueryAccount

func (c *ConnectionClient) QueryAccount(co *Connection) *AccountQuery

QueryAccount queries the account edge of a Connection.

func (*ConnectionClient) QueryPortfolios

func (c *ConnectionClient) QueryPortfolios(co *Connection) *PortfolioQuery

QueryPortfolios queries the portfolios edge of a Connection.

func (*ConnectionClient) QuerySource

func (c *ConnectionClient) QuerySource(co *Connection) *SourceQuery

QuerySource queries the source edge of a Connection.

func (*ConnectionClient) Update

func (c *ConnectionClient) Update() *ConnectionUpdate

Update returns an update builder for Connection.

func (*ConnectionClient) UpdateOne

func (c *ConnectionClient) UpdateOne(co *Connection) *ConnectionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ConnectionClient) UpdateOneID

func (c *ConnectionClient) UpdateOneID(id pulid.PULID) *ConnectionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ConnectionClient) Use

func (c *ConnectionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `connection.Hooks(f(g(h())))`.

type ConnectionConnection

type ConnectionConnection struct {
	Edges      []*ConnectionEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

ConnectionConnection is the connection containing edges to Connection.

type ConnectionCreate

type ConnectionCreate struct {
	// contains filtered or unexported fields
}

ConnectionCreate is the builder for creating a Connection entity.

func (*ConnectionCreate) AddPortfolioIDs

func (cc *ConnectionCreate) AddPortfolioIDs(ids ...pulid.PULID) *ConnectionCreate

AddPortfolioIDs adds the "portfolios" edge to the Portfolio entity by IDs.

func (*ConnectionCreate) AddPortfolios

func (cc *ConnectionCreate) AddPortfolios(p ...*Portfolio) *ConnectionCreate

AddPortfolios adds the "portfolios" edges to the Portfolio entity.

func (*ConnectionCreate) Exec

func (cc *ConnectionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectionCreate) ExecX

func (cc *ConnectionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectionCreate) Mutation

func (cc *ConnectionCreate) Mutation() *ConnectionMutation

Mutation returns the ConnectionMutation object of the builder.

func (*ConnectionCreate) Save

func (cc *ConnectionCreate) Save(ctx context.Context) (*Connection, error)

Save creates the Connection in the database.

func (*ConnectionCreate) SaveX

func (cc *ConnectionCreate) SaveX(ctx context.Context) *Connection

SaveX calls Save and panics if Save returns an error.

func (*ConnectionCreate) SetAccessToken

func (cc *ConnectionCreate) SetAccessToken(s string) *ConnectionCreate

SetAccessToken sets the "access_token" field.

func (*ConnectionCreate) SetAccount

func (cc *ConnectionCreate) SetAccount(a *Account) *ConnectionCreate

SetAccount sets the "account" edge to the Account entity.

func (*ConnectionCreate) SetAccountID

func (cc *ConnectionCreate) SetAccountID(pu pulid.PULID) *ConnectionCreate

SetAccountID sets the "account_id" field.

func (*ConnectionCreate) SetCreatedAt

func (cc *ConnectionCreate) SetCreatedAt(t time.Time) *ConnectionCreate

SetCreatedAt sets the "created_at" field.

func (*ConnectionCreate) SetDeletedAt

func (cc *ConnectionCreate) SetDeletedAt(t time.Time) *ConnectionCreate

SetDeletedAt sets the "deleted_at" field.

func (*ConnectionCreate) SetID

SetID sets the "id" field.

func (*ConnectionCreate) SetInput

SetInput applies the change-set in the CreateConnectionInput on the ConnectionCreate builder.

func (*ConnectionCreate) SetName

func (cc *ConnectionCreate) SetName(s string) *ConnectionCreate

SetName sets the "name" field.

func (*ConnectionCreate) SetNillableCreatedAt

func (cc *ConnectionCreate) SetNillableCreatedAt(t *time.Time) *ConnectionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ConnectionCreate) SetNillableDeletedAt

func (cc *ConnectionCreate) SetNillableDeletedAt(t *time.Time) *ConnectionCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*ConnectionCreate) SetNillableID

func (cc *ConnectionCreate) SetNillableID(pu *pulid.PULID) *ConnectionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ConnectionCreate) SetNillableRefreshToken

func (cc *ConnectionCreate) SetNillableRefreshToken(s *string) *ConnectionCreate

SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.

func (*ConnectionCreate) SetNillableUpdatedAt

func (cc *ConnectionCreate) SetNillableUpdatedAt(t *time.Time) *ConnectionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ConnectionCreate) SetRefreshToken

func (cc *ConnectionCreate) SetRefreshToken(s string) *ConnectionCreate

SetRefreshToken sets the "refresh_token" field.

func (*ConnectionCreate) SetSource

func (cc *ConnectionCreate) SetSource(s *Source) *ConnectionCreate

SetSource sets the "source" edge to the Source entity.

func (*ConnectionCreate) SetSourceID

func (cc *ConnectionCreate) SetSourceID(pu pulid.PULID) *ConnectionCreate

SetSourceID sets the "source_id" field.

func (*ConnectionCreate) SetUpdatedAt

func (cc *ConnectionCreate) SetUpdatedAt(t time.Time) *ConnectionCreate

SetUpdatedAt sets the "updated_at" field.

type ConnectionCreateBulk

type ConnectionCreateBulk struct {
	// contains filtered or unexported fields
}

ConnectionCreateBulk is the builder for creating many Connection entities in bulk.

func (*ConnectionCreateBulk) Exec

func (ccb *ConnectionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectionCreateBulk) ExecX

func (ccb *ConnectionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectionCreateBulk) Save

func (ccb *ConnectionCreateBulk) Save(ctx context.Context) ([]*Connection, error)

Save creates the Connection entities in the database.

func (*ConnectionCreateBulk) SaveX

func (ccb *ConnectionCreateBulk) SaveX(ctx context.Context) []*Connection

SaveX is like Save, but panics if an error occurs.

type ConnectionDelete

type ConnectionDelete struct {
	// contains filtered or unexported fields
}

ConnectionDelete is the builder for deleting a Connection entity.

func (*ConnectionDelete) Exec

func (cd *ConnectionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ConnectionDelete) ExecX

func (cd *ConnectionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ConnectionDelete) Where

Where appends a list predicates to the ConnectionDelete builder.

type ConnectionDeleteOne

type ConnectionDeleteOne struct {
	// contains filtered or unexported fields
}

ConnectionDeleteOne is the builder for deleting a single Connection entity.

func (*ConnectionDeleteOne) Exec

func (cdo *ConnectionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ConnectionDeleteOne) ExecX

func (cdo *ConnectionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ConnectionEdge

type ConnectionEdge struct {
	Node   *Connection `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

ConnectionEdge is the edge representation of Connection.

type ConnectionEdges

type ConnectionEdges struct {
	// Source holds the value of the source edge.
	Source *Source `json:"source,omitempty"`
	// Account holds the value of the account edge.
	Account *Account `json:"account,omitempty"`
	// Portfolios holds the value of the portfolios edge.
	Portfolios []*Portfolio `json:"portfolios,omitempty"`
	// contains filtered or unexported fields
}

ConnectionEdges holds the relations/edges for other nodes in the graph.

func (ConnectionEdges) AccountOrErr

func (e ConnectionEdges) AccountOrErr() (*Account, error)

AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ConnectionEdges) PortfoliosOrErr

func (e ConnectionEdges) PortfoliosOrErr() ([]*Portfolio, error)

PortfoliosOrErr returns the Portfolios value or an error if the edge was not loaded in eager-loading.

func (ConnectionEdges) SourceOrErr

func (e ConnectionEdges) SourceOrErr() (*Source, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ConnectionGroupBy

type ConnectionGroupBy struct {
	// contains filtered or unexported fields
}

ConnectionGroupBy is the group-by builder for Connection entities.

func (*ConnectionGroupBy) Aggregate

func (cgb *ConnectionGroupBy) Aggregate(fns ...AggregateFunc) *ConnectionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ConnectionGroupBy) Bool

func (s *ConnectionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ConnectionGroupBy) BoolX

func (s *ConnectionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ConnectionGroupBy) Bools

func (s *ConnectionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ConnectionGroupBy) BoolsX

func (s *ConnectionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ConnectionGroupBy) Float64

func (s *ConnectionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ConnectionGroupBy) Float64X

func (s *ConnectionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ConnectionGroupBy) Float64s

func (s *ConnectionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ConnectionGroupBy) Float64sX

func (s *ConnectionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ConnectionGroupBy) Int

func (s *ConnectionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ConnectionGroupBy) IntX

func (s *ConnectionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ConnectionGroupBy) Ints

func (s *ConnectionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ConnectionGroupBy) IntsX

func (s *ConnectionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ConnectionGroupBy) Scan

func (cgb *ConnectionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*ConnectionGroupBy) ScanX

func (s *ConnectionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ConnectionGroupBy) String

func (s *ConnectionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ConnectionGroupBy) StringX

func (s *ConnectionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ConnectionGroupBy) Strings

func (s *ConnectionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ConnectionGroupBy) StringsX

func (s *ConnectionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ConnectionMutation

type ConnectionMutation struct {
	// contains filtered or unexported fields
}

ConnectionMutation represents an operation that mutates the Connection nodes in the graph.

func (*ConnectionMutation) AccessToken

func (m *ConnectionMutation) AccessToken() (r string, exists bool)

AccessToken returns the value of the "access_token" field in the mutation.

func (*ConnectionMutation) AccountCleared

func (m *ConnectionMutation) AccountCleared() bool

AccountCleared reports if the "account" edge to the Account entity was cleared.

func (*ConnectionMutation) AccountID

func (m *ConnectionMutation) AccountID() (r pulid.PULID, exists bool)

AccountID returns the value of the "account_id" field in the mutation.

func (*ConnectionMutation) AccountIDs

func (m *ConnectionMutation) AccountIDs() (ids []pulid.PULID)

AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.

func (*ConnectionMutation) AddField

func (m *ConnectionMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ConnectionMutation) AddPortfolioIDs

func (m *ConnectionMutation) AddPortfolioIDs(ids ...pulid.PULID)

AddPortfolioIDs adds the "portfolios" edge to the Portfolio entity by ids.

func (*ConnectionMutation) AddedEdges

func (m *ConnectionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ConnectionMutation) AddedField

func (m *ConnectionMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ConnectionMutation) AddedFields

func (m *ConnectionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ConnectionMutation) AddedIDs

func (m *ConnectionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ConnectionMutation) ClearAccount

func (m *ConnectionMutation) ClearAccount()

ClearAccount clears the "account" edge to the Account entity.

func (*ConnectionMutation) ClearDeletedAt

func (m *ConnectionMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ConnectionMutation) ClearEdge

func (m *ConnectionMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ConnectionMutation) ClearField

func (m *ConnectionMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ConnectionMutation) ClearPortfolios

func (m *ConnectionMutation) ClearPortfolios()

ClearPortfolios clears the "portfolios" edge to the Portfolio entity.

func (*ConnectionMutation) ClearRefreshToken

func (m *ConnectionMutation) ClearRefreshToken()

ClearRefreshToken clears the value of the "refresh_token" field.

func (*ConnectionMutation) ClearSource

func (m *ConnectionMutation) ClearSource()

ClearSource clears the "source" edge to the Source entity.

func (*ConnectionMutation) ClearedEdges

func (m *ConnectionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ConnectionMutation) ClearedFields

func (m *ConnectionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ConnectionMutation) Client

func (m ConnectionMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ConnectionMutation) CreatedAt

func (m *ConnectionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ConnectionMutation) DeletedAt

func (m *ConnectionMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*ConnectionMutation) DeletedAtCleared

func (m *ConnectionMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*ConnectionMutation) EdgeCleared

func (m *ConnectionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ConnectionMutation) Field

func (m *ConnectionMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ConnectionMutation) FieldCleared

func (m *ConnectionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ConnectionMutation) Fields

func (m *ConnectionMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ConnectionMutation) ID

func (m *ConnectionMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ConnectionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ConnectionMutation) Name

func (m *ConnectionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ConnectionMutation) OldAccessToken

func (m *ConnectionMutation) OldAccessToken(ctx context.Context) (v string, err error)

OldAccessToken returns the old "access_token" field's value of the Connection entity. If the Connection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectionMutation) OldAccountID

func (m *ConnectionMutation) OldAccountID(ctx context.Context) (v pulid.PULID, err error)

OldAccountID returns the old "account_id" field's value of the Connection entity. If the Connection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectionMutation) OldCreatedAt

func (m *ConnectionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Connection entity. If the Connection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectionMutation) OldDeletedAt

func (m *ConnectionMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Connection entity. If the Connection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectionMutation) OldField

func (m *ConnectionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ConnectionMutation) OldName

func (m *ConnectionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Connection entity. If the Connection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectionMutation) OldRefreshToken

func (m *ConnectionMutation) OldRefreshToken(ctx context.Context) (v *string, err error)

OldRefreshToken returns the old "refresh_token" field's value of the Connection entity. If the Connection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectionMutation) OldSourceID

func (m *ConnectionMutation) OldSourceID(ctx context.Context) (v pulid.PULID, err error)

OldSourceID returns the old "source_id" field's value of the Connection entity. If the Connection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectionMutation) OldUpdatedAt

func (m *ConnectionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Connection entity. If the Connection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectionMutation) Op

func (m *ConnectionMutation) Op() Op

Op returns the operation name.

func (*ConnectionMutation) PortfoliosCleared

func (m *ConnectionMutation) PortfoliosCleared() bool

PortfoliosCleared reports if the "portfolios" edge to the Portfolio entity was cleared.

func (*ConnectionMutation) PortfoliosIDs

func (m *ConnectionMutation) PortfoliosIDs() (ids []pulid.PULID)

PortfoliosIDs returns the "portfolios" edge IDs in the mutation.

func (*ConnectionMutation) RefreshToken

func (m *ConnectionMutation) RefreshToken() (r string, exists bool)

RefreshToken returns the value of the "refresh_token" field in the mutation.

func (*ConnectionMutation) RefreshTokenCleared

func (m *ConnectionMutation) RefreshTokenCleared() bool

RefreshTokenCleared returns if the "refresh_token" field was cleared in this mutation.

func (*ConnectionMutation) RemovePortfolioIDs

func (m *ConnectionMutation) RemovePortfolioIDs(ids ...pulid.PULID)

RemovePortfolioIDs removes the "portfolios" edge to the Portfolio entity by IDs.

func (*ConnectionMutation) RemovedEdges

func (m *ConnectionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ConnectionMutation) RemovedIDs

func (m *ConnectionMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ConnectionMutation) RemovedPortfoliosIDs

func (m *ConnectionMutation) RemovedPortfoliosIDs() (ids []pulid.PULID)

RemovedPortfolios returns the removed IDs of the "portfolios" edge to the Portfolio entity.

func (*ConnectionMutation) ResetAccessToken

func (m *ConnectionMutation) ResetAccessToken()

ResetAccessToken resets all changes to the "access_token" field.

func (*ConnectionMutation) ResetAccount

func (m *ConnectionMutation) ResetAccount()

ResetAccount resets all changes to the "account" edge.

func (*ConnectionMutation) ResetAccountID

func (m *ConnectionMutation) ResetAccountID()

ResetAccountID resets all changes to the "account_id" field.

func (*ConnectionMutation) ResetCreatedAt

func (m *ConnectionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ConnectionMutation) ResetDeletedAt

func (m *ConnectionMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*ConnectionMutation) ResetEdge

func (m *ConnectionMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ConnectionMutation) ResetField

func (m *ConnectionMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ConnectionMutation) ResetName

func (m *ConnectionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ConnectionMutation) ResetPortfolios

func (m *ConnectionMutation) ResetPortfolios()

ResetPortfolios resets all changes to the "portfolios" edge.

func (*ConnectionMutation) ResetRefreshToken

func (m *ConnectionMutation) ResetRefreshToken()

ResetRefreshToken resets all changes to the "refresh_token" field.

func (*ConnectionMutation) ResetSource

func (m *ConnectionMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*ConnectionMutation) ResetSourceID

func (m *ConnectionMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*ConnectionMutation) ResetUpdatedAt

func (m *ConnectionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ConnectionMutation) SetAccessToken

func (m *ConnectionMutation) SetAccessToken(s string)

SetAccessToken sets the "access_token" field.

func (*ConnectionMutation) SetAccountID

func (m *ConnectionMutation) SetAccountID(pu pulid.PULID)

SetAccountID sets the "account_id" field.

func (*ConnectionMutation) SetCreatedAt

func (m *ConnectionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ConnectionMutation) SetDeletedAt

func (m *ConnectionMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*ConnectionMutation) SetField

func (m *ConnectionMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ConnectionMutation) SetID

func (m *ConnectionMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Connection entities.

func (*ConnectionMutation) SetName

func (m *ConnectionMutation) SetName(s string)

SetName sets the "name" field.

func (*ConnectionMutation) SetRefreshToken

func (m *ConnectionMutation) SetRefreshToken(s string)

SetRefreshToken sets the "refresh_token" field.

func (*ConnectionMutation) SetSourceID

func (m *ConnectionMutation) SetSourceID(pu pulid.PULID)

SetSourceID sets the "source_id" field.

func (*ConnectionMutation) SetUpdatedAt

func (m *ConnectionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ConnectionMutation) SourceCleared

func (m *ConnectionMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the Source entity was cleared.

func (*ConnectionMutation) SourceID

func (m *ConnectionMutation) SourceID() (r pulid.PULID, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*ConnectionMutation) SourceIDs

func (m *ConnectionMutation) SourceIDs() (ids []pulid.PULID)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (ConnectionMutation) Tx

func (m ConnectionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ConnectionMutation) Type

func (m *ConnectionMutation) Type() string

Type returns the node type of this mutation (Connection).

func (*ConnectionMutation) UpdatedAt

func (m *ConnectionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ConnectionMutation) Where

func (m *ConnectionMutation) Where(ps ...predicate.Connection)

Where appends a list predicates to the ConnectionMutation builder.

type ConnectionOrder

type ConnectionOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *ConnectionOrderField `json:"field"`
}

ConnectionOrder defines the ordering of Connection.

type ConnectionOrderField

type ConnectionOrderField struct {
	// contains filtered or unexported fields
}

ConnectionOrderField defines the ordering field of Connection.

func (ConnectionOrderField) MarshalGQL

func (f ConnectionOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ConnectionOrderField) String

func (f ConnectionOrderField) String() string

String implement fmt.Stringer interface.

func (*ConnectionOrderField) UnmarshalGQL

func (f *ConnectionOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ConnectionPaginateOption

type ConnectionPaginateOption func(*connectionPager) error

ConnectionPaginateOption enables pagination customization.

func WithConnectionFilter

func WithConnectionFilter(filter func(*ConnectionQuery) (*ConnectionQuery, error)) ConnectionPaginateOption

WithConnectionFilter configures pagination filter.

func WithConnectionOrder

func WithConnectionOrder(order *ConnectionOrder) ConnectionPaginateOption

WithConnectionOrder configures pagination ordering.

type ConnectionQuery

type ConnectionQuery struct {
	// contains filtered or unexported fields
}

ConnectionQuery is the builder for querying Connection entities.

func (*ConnectionQuery) All

func (cq *ConnectionQuery) All(ctx context.Context) ([]*Connection, error)

All executes the query and returns a list of Connections.

func (*ConnectionQuery) AllX

func (cq *ConnectionQuery) AllX(ctx context.Context) []*Connection

AllX is like All, but panics if an error occurs.

func (*ConnectionQuery) Clone

func (cq *ConnectionQuery) Clone() *ConnectionQuery

Clone returns a duplicate of the ConnectionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ConnectionQuery) CollectFields

func (c *ConnectionQuery) CollectFields(ctx context.Context, satisfies ...string) (*ConnectionQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ConnectionQuery) Count

func (cq *ConnectionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ConnectionQuery) CountX

func (cq *ConnectionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ConnectionQuery) Exist

func (cq *ConnectionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ConnectionQuery) ExistX

func (cq *ConnectionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ConnectionQuery) First

func (cq *ConnectionQuery) First(ctx context.Context) (*Connection, error)

First returns the first Connection entity from the query. Returns a *NotFoundError when no Connection was found.

func (*ConnectionQuery) FirstID

func (cq *ConnectionQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Connection ID from the query. Returns a *NotFoundError when no Connection ID was found.

func (*ConnectionQuery) FirstIDX

func (cq *ConnectionQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ConnectionQuery) FirstX

func (cq *ConnectionQuery) FirstX(ctx context.Context) *Connection

FirstX is like First, but panics if an error occurs.

func (*ConnectionQuery) GroupBy

func (cq *ConnectionQuery) GroupBy(field string, fields ...string) *ConnectionGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Connection.Query().
	GroupBy(connection.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ConnectionQuery) IDs

func (cq *ConnectionQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Connection IDs.

func (*ConnectionQuery) IDsX

func (cq *ConnectionQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*ConnectionQuery) Limit

func (cq *ConnectionQuery) Limit(limit int) *ConnectionQuery

Limit adds a limit step to the query.

func (*ConnectionQuery) Offset

func (cq *ConnectionQuery) Offset(offset int) *ConnectionQuery

Offset adds an offset step to the query.

func (*ConnectionQuery) Only

func (cq *ConnectionQuery) Only(ctx context.Context) (*Connection, error)

Only returns a single Connection entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Connection entity is found. Returns a *NotFoundError when no Connection entities are found.

func (*ConnectionQuery) OnlyID

func (cq *ConnectionQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Connection ID in the query. Returns a *NotSingularError when more than one Connection ID is found. Returns a *NotFoundError when no entities are found.

func (*ConnectionQuery) OnlyIDX

func (cq *ConnectionQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ConnectionQuery) OnlyX

func (cq *ConnectionQuery) OnlyX(ctx context.Context) *Connection

OnlyX is like Only, but panics if an error occurs.

func (*ConnectionQuery) Order

func (cq *ConnectionQuery) Order(o ...OrderFunc) *ConnectionQuery

Order adds an order step to the query.

func (*ConnectionQuery) Paginate

func (c *ConnectionQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ConnectionPaginateOption,
) (*ConnectionConnection, error)

Paginate executes the query and returns a relay based cursor connection to Connection.

func (*ConnectionQuery) QueryAccount

func (cq *ConnectionQuery) QueryAccount() *AccountQuery

QueryAccount chains the current query on the "account" edge.

func (*ConnectionQuery) QueryPortfolios

func (cq *ConnectionQuery) QueryPortfolios() *PortfolioQuery

QueryPortfolios chains the current query on the "portfolios" edge.

func (*ConnectionQuery) QuerySource

func (cq *ConnectionQuery) QuerySource() *SourceQuery

QuerySource chains the current query on the "source" edge.

func (*ConnectionQuery) Select

func (cq *ConnectionQuery) Select(fields ...string) *ConnectionSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Connection.Query().
	Select(connection.FieldCreatedAt).
	Scan(ctx, &v)

func (*ConnectionQuery) Unique

func (cq *ConnectionQuery) Unique(unique bool) *ConnectionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ConnectionQuery) Where

Where adds a new predicate for the ConnectionQuery builder.

func (*ConnectionQuery) WithAccount

func (cq *ConnectionQuery) WithAccount(opts ...func(*AccountQuery)) *ConnectionQuery

WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.

func (*ConnectionQuery) WithNamedPortfolios

func (cq *ConnectionQuery) WithNamedPortfolios(name string, opts ...func(*PortfolioQuery)) *ConnectionQuery

WithNamedPortfolios tells the query-builder to eager-load the nodes that are connected to the "portfolios" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ConnectionQuery) WithPortfolios

func (cq *ConnectionQuery) WithPortfolios(opts ...func(*PortfolioQuery)) *ConnectionQuery

WithPortfolios tells the query-builder to eager-load the nodes that are connected to the "portfolios" edge. The optional arguments are used to configure the query builder of the edge.

func (*ConnectionQuery) WithSource

func (cq *ConnectionQuery) WithSource(opts ...func(*SourceQuery)) *ConnectionQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type ConnectionSelect

type ConnectionSelect struct {
	*ConnectionQuery
	// contains filtered or unexported fields
}

ConnectionSelect is the builder for selecting fields of Connection entities.

func (*ConnectionSelect) Bool

func (s *ConnectionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ConnectionSelect) BoolX

func (s *ConnectionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ConnectionSelect) Bools

func (s *ConnectionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ConnectionSelect) BoolsX

func (s *ConnectionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ConnectionSelect) Float64

func (s *ConnectionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ConnectionSelect) Float64X

func (s *ConnectionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ConnectionSelect) Float64s

func (s *ConnectionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ConnectionSelect) Float64sX

func (s *ConnectionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ConnectionSelect) Int

func (s *ConnectionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ConnectionSelect) IntX

func (s *ConnectionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ConnectionSelect) Ints

func (s *ConnectionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ConnectionSelect) IntsX

func (s *ConnectionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ConnectionSelect) Scan

func (cs *ConnectionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ConnectionSelect) ScanX

func (s *ConnectionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ConnectionSelect) String

func (s *ConnectionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ConnectionSelect) StringX

func (s *ConnectionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ConnectionSelect) Strings

func (s *ConnectionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ConnectionSelect) StringsX

func (s *ConnectionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ConnectionUpdate

type ConnectionUpdate struct {
	// contains filtered or unexported fields
}

ConnectionUpdate is the builder for updating Connection entities.

func (*ConnectionUpdate) AddPortfolioIDs

func (cu *ConnectionUpdate) AddPortfolioIDs(ids ...pulid.PULID) *ConnectionUpdate

AddPortfolioIDs adds the "portfolios" edge to the Portfolio entity by IDs.

func (*ConnectionUpdate) AddPortfolios

func (cu *ConnectionUpdate) AddPortfolios(p ...*Portfolio) *ConnectionUpdate

AddPortfolios adds the "portfolios" edges to the Portfolio entity.

func (*ConnectionUpdate) ClearAccount

func (cu *ConnectionUpdate) ClearAccount() *ConnectionUpdate

ClearAccount clears the "account" edge to the Account entity.

func (*ConnectionUpdate) ClearDeletedAt

func (cu *ConnectionUpdate) ClearDeletedAt() *ConnectionUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ConnectionUpdate) ClearPortfolios

func (cu *ConnectionUpdate) ClearPortfolios() *ConnectionUpdate

ClearPortfolios clears all "portfolios" edges to the Portfolio entity.

func (*ConnectionUpdate) ClearRefreshToken

func (cu *ConnectionUpdate) ClearRefreshToken() *ConnectionUpdate

ClearRefreshToken clears the value of the "refresh_token" field.

func (*ConnectionUpdate) ClearSource

func (cu *ConnectionUpdate) ClearSource() *ConnectionUpdate

ClearSource clears the "source" edge to the Source entity.

func (*ConnectionUpdate) Exec

func (cu *ConnectionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectionUpdate) ExecX

func (cu *ConnectionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectionUpdate) Mutation

func (cu *ConnectionUpdate) Mutation() *ConnectionMutation

Mutation returns the ConnectionMutation object of the builder.

func (*ConnectionUpdate) RemovePortfolioIDs

func (cu *ConnectionUpdate) RemovePortfolioIDs(ids ...pulid.PULID) *ConnectionUpdate

RemovePortfolioIDs removes the "portfolios" edge to Portfolio entities by IDs.

func (*ConnectionUpdate) RemovePortfolios

func (cu *ConnectionUpdate) RemovePortfolios(p ...*Portfolio) *ConnectionUpdate

RemovePortfolios removes "portfolios" edges to Portfolio entities.

func (*ConnectionUpdate) Save

func (cu *ConnectionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ConnectionUpdate) SaveX

func (cu *ConnectionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ConnectionUpdate) SetAccessToken

func (cu *ConnectionUpdate) SetAccessToken(s string) *ConnectionUpdate

SetAccessToken sets the "access_token" field.

func (*ConnectionUpdate) SetAccount

func (cu *ConnectionUpdate) SetAccount(a *Account) *ConnectionUpdate

SetAccount sets the "account" edge to the Account entity.

func (*ConnectionUpdate) SetAccountID

func (cu *ConnectionUpdate) SetAccountID(pu pulid.PULID) *ConnectionUpdate

SetAccountID sets the "account_id" field.

func (*ConnectionUpdate) SetDeletedAt

func (cu *ConnectionUpdate) SetDeletedAt(t time.Time) *ConnectionUpdate

SetDeletedAt sets the "deleted_at" field.

func (*ConnectionUpdate) SetInput

SetInput applies the change-set in the UpdateConnectionInput on the ConnectionUpdate builder.

func (*ConnectionUpdate) SetName

func (cu *ConnectionUpdate) SetName(s string) *ConnectionUpdate

SetName sets the "name" field.

func (*ConnectionUpdate) SetNillableRefreshToken

func (cu *ConnectionUpdate) SetNillableRefreshToken(s *string) *ConnectionUpdate

SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.

func (*ConnectionUpdate) SetRefreshToken

func (cu *ConnectionUpdate) SetRefreshToken(s string) *ConnectionUpdate

SetRefreshToken sets the "refresh_token" field.

func (*ConnectionUpdate) SetSource

func (cu *ConnectionUpdate) SetSource(s *Source) *ConnectionUpdate

SetSource sets the "source" edge to the Source entity.

func (*ConnectionUpdate) SetSourceID

func (cu *ConnectionUpdate) SetSourceID(pu pulid.PULID) *ConnectionUpdate

SetSourceID sets the "source_id" field.

func (*ConnectionUpdate) SetUpdatedAt

func (cu *ConnectionUpdate) SetUpdatedAt(t time.Time) *ConnectionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ConnectionUpdate) Where

Where appends a list predicates to the ConnectionUpdate builder.

type ConnectionUpdateOne

type ConnectionUpdateOne struct {
	// contains filtered or unexported fields
}

ConnectionUpdateOne is the builder for updating a single Connection entity.

func (*ConnectionUpdateOne) AddPortfolioIDs

func (cuo *ConnectionUpdateOne) AddPortfolioIDs(ids ...pulid.PULID) *ConnectionUpdateOne

AddPortfolioIDs adds the "portfolios" edge to the Portfolio entity by IDs.

func (*ConnectionUpdateOne) AddPortfolios

func (cuo *ConnectionUpdateOne) AddPortfolios(p ...*Portfolio) *ConnectionUpdateOne

AddPortfolios adds the "portfolios" edges to the Portfolio entity.

func (*ConnectionUpdateOne) ClearAccount

func (cuo *ConnectionUpdateOne) ClearAccount() *ConnectionUpdateOne

ClearAccount clears the "account" edge to the Account entity.

func (*ConnectionUpdateOne) ClearDeletedAt

func (cuo *ConnectionUpdateOne) ClearDeletedAt() *ConnectionUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ConnectionUpdateOne) ClearPortfolios

func (cuo *ConnectionUpdateOne) ClearPortfolios() *ConnectionUpdateOne

ClearPortfolios clears all "portfolios" edges to the Portfolio entity.

func (*ConnectionUpdateOne) ClearRefreshToken

func (cuo *ConnectionUpdateOne) ClearRefreshToken() *ConnectionUpdateOne

ClearRefreshToken clears the value of the "refresh_token" field.

func (*ConnectionUpdateOne) ClearSource

func (cuo *ConnectionUpdateOne) ClearSource() *ConnectionUpdateOne

ClearSource clears the "source" edge to the Source entity.

func (*ConnectionUpdateOne) Exec

func (cuo *ConnectionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ConnectionUpdateOne) ExecX

func (cuo *ConnectionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectionUpdateOne) Mutation

func (cuo *ConnectionUpdateOne) Mutation() *ConnectionMutation

Mutation returns the ConnectionMutation object of the builder.

func (*ConnectionUpdateOne) RemovePortfolioIDs

func (cuo *ConnectionUpdateOne) RemovePortfolioIDs(ids ...pulid.PULID) *ConnectionUpdateOne

RemovePortfolioIDs removes the "portfolios" edge to Portfolio entities by IDs.

func (*ConnectionUpdateOne) RemovePortfolios

func (cuo *ConnectionUpdateOne) RemovePortfolios(p ...*Portfolio) *ConnectionUpdateOne

RemovePortfolios removes "portfolios" edges to Portfolio entities.

func (*ConnectionUpdateOne) Save

func (cuo *ConnectionUpdateOne) Save(ctx context.Context) (*Connection, error)

Save executes the query and returns the updated Connection entity.

func (*ConnectionUpdateOne) SaveX

func (cuo *ConnectionUpdateOne) SaveX(ctx context.Context) *Connection

SaveX is like Save, but panics if an error occurs.

func (*ConnectionUpdateOne) Select

func (cuo *ConnectionUpdateOne) Select(field string, fields ...string) *ConnectionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ConnectionUpdateOne) SetAccessToken

func (cuo *ConnectionUpdateOne) SetAccessToken(s string) *ConnectionUpdateOne

SetAccessToken sets the "access_token" field.

func (*ConnectionUpdateOne) SetAccount

func (cuo *ConnectionUpdateOne) SetAccount(a *Account) *ConnectionUpdateOne

SetAccount sets the "account" edge to the Account entity.

func (*ConnectionUpdateOne) SetAccountID

func (cuo *ConnectionUpdateOne) SetAccountID(pu pulid.PULID) *ConnectionUpdateOne

SetAccountID sets the "account_id" field.

func (*ConnectionUpdateOne) SetDeletedAt

func (cuo *ConnectionUpdateOne) SetDeletedAt(t time.Time) *ConnectionUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*ConnectionUpdateOne) SetInput

SetInput applies the change-set in the UpdateConnectionInput on the ConnectionUpdateOne builder.

func (*ConnectionUpdateOne) SetName

SetName sets the "name" field.

func (*ConnectionUpdateOne) SetNillableRefreshToken

func (cuo *ConnectionUpdateOne) SetNillableRefreshToken(s *string) *ConnectionUpdateOne

SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.

func (*ConnectionUpdateOne) SetRefreshToken

func (cuo *ConnectionUpdateOne) SetRefreshToken(s string) *ConnectionUpdateOne

SetRefreshToken sets the "refresh_token" field.

func (*ConnectionUpdateOne) SetSource

func (cuo *ConnectionUpdateOne) SetSource(s *Source) *ConnectionUpdateOne

SetSource sets the "source" edge to the Source entity.

func (*ConnectionUpdateOne) SetSourceID

func (cuo *ConnectionUpdateOne) SetSourceID(pu pulid.PULID) *ConnectionUpdateOne

SetSourceID sets the "source_id" field.

func (*ConnectionUpdateOne) SetUpdatedAt

func (cuo *ConnectionUpdateOne) SetUpdatedAt(t time.Time) *ConnectionUpdateOne

SetUpdatedAt sets the "updated_at" field.

type ConnectionWhereInput

type ConnectionWhereInput struct {
	Predicates []predicate.Connection  `json:"-"`
	Not        *ConnectionWhereInput   `json:"not,omitempty"`
	Or         []*ConnectionWhereInput `json:"or,omitempty"`
	And        []*ConnectionWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "account_id" field predicates.
	AccountID             *pulid.PULID  `json:"accountID,omitempty"`
	AccountIDNEQ          *pulid.PULID  `json:"accountIDNEQ,omitempty"`
	AccountIDIn           []pulid.PULID `json:"accountIDIn,omitempty"`
	AccountIDNotIn        []pulid.PULID `json:"accountIDNotIn,omitempty"`
	AccountIDGT           *pulid.PULID  `json:"accountIDGT,omitempty"`
	AccountIDGTE          *pulid.PULID  `json:"accountIDGTE,omitempty"`
	AccountIDLT           *pulid.PULID  `json:"accountIDLT,omitempty"`
	AccountIDLTE          *pulid.PULID  `json:"accountIDLTE,omitempty"`
	AccountIDContains     *pulid.PULID  `json:"accountIDContains,omitempty"`
	AccountIDHasPrefix    *pulid.PULID  `json:"accountIDHasPrefix,omitempty"`
	AccountIDHasSuffix    *pulid.PULID  `json:"accountIDHasSuffix,omitempty"`
	AccountIDEqualFold    *pulid.PULID  `json:"accountIDEqualFold,omitempty"`
	AccountIDContainsFold *pulid.PULID  `json:"accountIDContainsFold,omitempty"`

	// "source_id" field predicates.
	SourceID             *pulid.PULID  `json:"sourceID,omitempty"`
	SourceIDNEQ          *pulid.PULID  `json:"sourceIDNEQ,omitempty"`
	SourceIDIn           []pulid.PULID `json:"sourceIDIn,omitempty"`
	SourceIDNotIn        []pulid.PULID `json:"sourceIDNotIn,omitempty"`
	SourceIDGT           *pulid.PULID  `json:"sourceIDGT,omitempty"`
	SourceIDGTE          *pulid.PULID  `json:"sourceIDGTE,omitempty"`
	SourceIDLT           *pulid.PULID  `json:"sourceIDLT,omitempty"`
	SourceIDLTE          *pulid.PULID  `json:"sourceIDLTE,omitempty"`
	SourceIDContains     *pulid.PULID  `json:"sourceIDContains,omitempty"`
	SourceIDHasPrefix    *pulid.PULID  `json:"sourceIDHasPrefix,omitempty"`
	SourceIDHasSuffix    *pulid.PULID  `json:"sourceIDHasSuffix,omitempty"`
	SourceIDEqualFold    *pulid.PULID  `json:"sourceIDEqualFold,omitempty"`
	SourceIDContainsFold *pulid.PULID  `json:"sourceIDContainsFold,omitempty"`

	// "source" edge predicates.
	HasSource     *bool               `json:"hasSource,omitempty"`
	HasSourceWith []*SourceWhereInput `json:"hasSourceWith,omitempty"`

	// "account" edge predicates.
	HasAccount     *bool                `json:"hasAccount,omitempty"`
	HasAccountWith []*AccountWhereInput `json:"hasAccountWith,omitempty"`
}

ConnectionWhereInput represents a where input for filtering Connection queries.

func (*ConnectionWhereInput) AddPredicates

func (i *ConnectionWhereInput) AddPredicates(predicates ...predicate.Connection)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ConnectionWhereInput) Filter

Filter applies the ConnectionWhereInput filter on the ConnectionQuery builder.

func (*ConnectionWhereInput) P

P returns a predicate for filtering connections. An error is returned if the input is empty or invalid.

type Connections

type Connections []*Connection

Connections is a parsable slice of Connection.

type ConstraintError

type ConstraintError struct {
	// contains filtered or unexported fields
}

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type CreateAccountInput

type CreateAccountInput struct {
	Nickname    string
	Email       string
	Password    *string
	AuthRoleIDs []pulid.PULID
	AuthTypeID  pulid.PULID
}

CreateAccountInput represents a mutation input for creating accounts.

func (*CreateAccountInput) Mutate

func (i *CreateAccountInput) Mutate(m *AccountMutation)

Mutate applies the CreateAccountInput on the AccountMutation builder.

type CreateAssetClassInput

type CreateAssetClassInput struct {
	Value       assetclass.Value
	Description *string
}

CreateAssetClassInput represents a mutation input for creating assetclasses.

func (*CreateAssetClassInput) Mutate

Mutate applies the CreateAssetClassInput on the AssetClassMutation builder.

type CreateAuthRoleInput

type CreateAuthRoleInput struct {
	Value       authrole.Value
	Description *string
}

CreateAuthRoleInput represents a mutation input for creating authroles.

func (*CreateAuthRoleInput) Mutate

func (i *CreateAuthRoleInput) Mutate(m *AuthRoleMutation)

Mutate applies the CreateAuthRoleInput on the AuthRoleMutation builder.

type CreateAuthTypeInput

type CreateAuthTypeInput struct {
	Value       authtype.Value
	Description *string
}

CreateAuthTypeInput represents a mutation input for creating authtypes.

func (*CreateAuthTypeInput) Mutate

func (i *CreateAuthTypeInput) Mutate(m *AuthTypeMutation)

Mutate applies the CreateAuthTypeInput on the AuthTypeMutation builder.

type CreateBlockchainInput

type CreateBlockchainInput struct {
	Name    string
	Symbol  string
	Icon    *string
	ChainID *int64
}

CreateBlockchainInput represents a mutation input for creating blockchains.

func (*CreateBlockchainInput) Mutate

Mutate applies the CreateBlockchainInput on the BlockchainMutation builder.

type CreateConnectionInput

type CreateConnectionInput struct {
	Name         string
	AccessToken  string
	RefreshToken *string
	SourceID     pulid.PULID
	PortfolioIDs []pulid.PULID
}

CreateConnectionInput represents a mutation input for creating connections.

func (*CreateConnectionInput) Mutate

Mutate applies the CreateConnectionInput on the ConnectionMutation builder.

type CreateCryptocurrencyInput

type CreateCryptocurrencyInput struct {
	Symbol        string
	Icon          *string
	Name          string
	AssetID       pulid.PULID
	BlockchainIDs []pulid.PULID
}

CreateCryptocurrencyInput represents a mutation input for creating cryptocurrencies.

func (*CreateCryptocurrencyInput) Mutate

Mutate applies the CreateCryptocurrencyInput on the CryptocurrencyMutation builder.

type CreateDailyAssetPriceInput

type CreateDailyAssetPriceInput struct {
	Time          time.Time
	Open          *float64
	High          *float64
	Low           *float64
	Close         *float64
	AdjustedClose float64
	AssetID       pulid.PULID
}

CreateDailyAssetPriceInput represents a mutation input for creating dailyassetprices.

func (*CreateDailyAssetPriceInput) Mutate

Mutate applies the CreateDailyAssetPriceInput on the DailyAssetPriceMutation builder.

type CreateExchangeInput

type CreateExchangeInput struct {
	Name string
	Icon *string
	URL  *string
}

CreateExchangeInput represents a mutation input for creating exchanges.

func (*CreateExchangeInput) Mutate

func (i *CreateExchangeInput) Mutate(m *ExchangeMutation)

Mutate applies the CreateExchangeInput on the ExchangeMutation builder.

type CreatePortfolioInput

type CreatePortfolioInput struct {
	Name          string
	IsPublic      *bool
	IsVisible     *bool
	ConnectionIDs []pulid.PULID
}

CreatePortfolioInput represents a mutation input for creating portfolios.

func (*CreatePortfolioInput) Mutate

Mutate applies the CreatePortfolioInput on the PortfolioMutation builder.

type CreateSourceInput

type CreateSourceInput struct {
	Name         string
	Icon         *string
	SourceTypeID pulid.PULID
}

CreateSourceInput represents a mutation input for creating sources.

func (*CreateSourceInput) Mutate

func (i *CreateSourceInput) Mutate(m *SourceMutation)

Mutate applies the CreateSourceInput on the SourceMutation builder.

type CreateSourceTypeInput

type CreateSourceTypeInput struct {
	Value       sourcetype.Value
	Description *string
}

CreateSourceTypeInput represents a mutation input for creating sourcetypes.

func (*CreateSourceTypeInput) Mutate

Mutate applies the CreateSourceTypeInput on the SourceTypeMutation builder.

type CreateStaffAccountInput

type CreateStaffAccountInput struct {
	Nickname    string
	Email       string
	Password    *string
	AuthRoleIDs []pulid.PULID
	AuthTypeID  pulid.PULID
}

CreateStaffAccountInput represents a mutation input for creating staffaccounts.

func (*CreateStaffAccountInput) Mutate

Mutate applies the CreateStaffAccountInput on the StaffAccountMutation builder.

type CreateTransactionInput

type CreateTransactionInput struct {
	Time              time.Time
	Units             int
	PricePerUnit      float64
	TransactionTypeID pulid.PULID
	BaseAssetID       pulid.PULID
	QuoteAssetID      *pulid.PULID
	PortfolioID       pulid.PULID
	ExchangeID        pulid.PULID
	BlockchainID      *pulid.PULID
}

CreateTransactionInput represents a mutation input for creating transactions.

func (*CreateTransactionInput) Mutate

Mutate applies the CreateTransactionInput on the TransactionMutation builder.

type CreateTransactionTypeInput

type CreateTransactionTypeInput struct {
	Value       transactiontype.Value
	Description *string
}

CreateTransactionTypeInput represents a mutation input for creating transactiontypes.

func (*CreateTransactionTypeInput) Mutate

Mutate applies the CreateTransactionTypeInput on the TransactionTypeMutation builder.

type Cryptocurrencies

type Cryptocurrencies []*Cryptocurrency

Cryptocurrencies is a parsable slice of Cryptocurrency.

type Cryptocurrency

type Cryptocurrency struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Symbol holds the value of the "symbol" field.
	Symbol string `json:"symbol,omitempty"`
	// A url to the image icon for this cryptocurrency.
	Icon *string `json:"icon,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// AssetID holds the value of the "asset_id" field.
	AssetID pulid.PULID `json:"assetID,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CryptocurrencyQuery when eager-loading is set.
	Edges CryptocurrencyEdges `json:"edges"`
	// contains filtered or unexported fields
}

Cryptocurrency is the model entity for the Cryptocurrency schema.

func (*Cryptocurrency) Asset

func (c *Cryptocurrency) Asset(ctx context.Context) (*Asset, error)

func (*Cryptocurrency) Blockchains

func (c *Cryptocurrency) Blockchains(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *BlockchainOrder, where *BlockchainWhereInput,
) (*BlockchainConnection, error)

func (*Cryptocurrency) NamedBlockchains

func (c *Cryptocurrency) NamedBlockchains(name string) ([]*Blockchain, error)

NamedBlockchains returns the Blockchains named value or an error if the edge was not loaded in eager-loading with this name.

func (*Cryptocurrency) Node

func (c *Cryptocurrency) Node(ctx context.Context) (node *Node, err error)

func (*Cryptocurrency) QueryAsset

func (c *Cryptocurrency) QueryAsset() *AssetQuery

QueryAsset queries the "asset" edge of the Cryptocurrency entity.

func (*Cryptocurrency) QueryBlockchains

func (c *Cryptocurrency) QueryBlockchains() *BlockchainQuery

QueryBlockchains queries the "blockchains" edge of the Cryptocurrency entity.

func (*Cryptocurrency) String

func (c *Cryptocurrency) String() string

String implements the fmt.Stringer.

func (*Cryptocurrency) ToEdge

ToEdge converts Cryptocurrency into CryptocurrencyEdge.

func (*Cryptocurrency) Unwrap

func (c *Cryptocurrency) Unwrap() *Cryptocurrency

Unwrap unwraps the Cryptocurrency entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Cryptocurrency) Update

Update returns a builder for updating this Cryptocurrency. Note that you need to call Cryptocurrency.Unwrap() before calling this method if this Cryptocurrency was returned from a transaction, and the transaction was committed or rolled back.

type CryptocurrencyClient

type CryptocurrencyClient struct {
	// contains filtered or unexported fields
}

CryptocurrencyClient is a client for the Cryptocurrency schema.

func NewCryptocurrencyClient

func NewCryptocurrencyClient(c config) *CryptocurrencyClient

NewCryptocurrencyClient returns a client for the Cryptocurrency from the given config.

func (*CryptocurrencyClient) Create

Create returns a builder for creating a Cryptocurrency entity.

func (*CryptocurrencyClient) CreateBulk

CreateBulk returns a builder for creating a bulk of Cryptocurrency entities.

func (*CryptocurrencyClient) Delete

Delete returns a delete builder for Cryptocurrency.

func (*CryptocurrencyClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CryptocurrencyClient) DeleteOneID

DeleteOne returns a builder for deleting the given entity by its id.

func (*CryptocurrencyClient) Get

Get returns a Cryptocurrency entity by its id.

func (*CryptocurrencyClient) GetX

GetX is like Get, but panics if an error occurs.

func (*CryptocurrencyClient) Hooks

func (c *CryptocurrencyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CryptocurrencyClient) Query

Query returns a query builder for Cryptocurrency.

func (*CryptocurrencyClient) QueryAsset

func (c *CryptocurrencyClient) QueryAsset(cr *Cryptocurrency) *AssetQuery

QueryAsset queries the asset edge of a Cryptocurrency.

func (*CryptocurrencyClient) QueryBlockchains

func (c *CryptocurrencyClient) QueryBlockchains(cr *Cryptocurrency) *BlockchainQuery

QueryBlockchains queries the blockchains edge of a Cryptocurrency.

func (*CryptocurrencyClient) Update

Update returns an update builder for Cryptocurrency.

func (*CryptocurrencyClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CryptocurrencyClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*CryptocurrencyClient) Use

func (c *CryptocurrencyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cryptocurrency.Hooks(f(g(h())))`.

type CryptocurrencyConnection

type CryptocurrencyConnection struct {
	Edges      []*CryptocurrencyEdge `json:"edges"`
	PageInfo   PageInfo              `json:"pageInfo"`
	TotalCount int                   `json:"totalCount"`
}

CryptocurrencyConnection is the connection containing edges to Cryptocurrency.

type CryptocurrencyCreate

type CryptocurrencyCreate struct {
	// contains filtered or unexported fields
}

CryptocurrencyCreate is the builder for creating a Cryptocurrency entity.

func (*CryptocurrencyCreate) AddBlockchainIDs

func (cc *CryptocurrencyCreate) AddBlockchainIDs(ids ...pulid.PULID) *CryptocurrencyCreate

AddBlockchainIDs adds the "blockchains" edge to the Blockchain entity by IDs.

func (*CryptocurrencyCreate) AddBlockchains

func (cc *CryptocurrencyCreate) AddBlockchains(b ...*Blockchain) *CryptocurrencyCreate

AddBlockchains adds the "blockchains" edges to the Blockchain entity.

func (*CryptocurrencyCreate) Exec

func (cc *CryptocurrencyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CryptocurrencyCreate) ExecX

func (cc *CryptocurrencyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CryptocurrencyCreate) Mutation

Mutation returns the CryptocurrencyMutation object of the builder.

func (*CryptocurrencyCreate) Save

Save creates the Cryptocurrency in the database.

func (*CryptocurrencyCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CryptocurrencyCreate) SetAsset

SetAsset sets the "asset" edge to the Asset entity.

func (*CryptocurrencyCreate) SetAssetID

SetAssetID sets the "asset_id" field.

func (*CryptocurrencyCreate) SetCreatedAt

func (cc *CryptocurrencyCreate) SetCreatedAt(t time.Time) *CryptocurrencyCreate

SetCreatedAt sets the "created_at" field.

func (*CryptocurrencyCreate) SetDeletedAt

func (cc *CryptocurrencyCreate) SetDeletedAt(t time.Time) *CryptocurrencyCreate

SetDeletedAt sets the "deleted_at" field.

func (*CryptocurrencyCreate) SetID

SetID sets the "id" field.

func (*CryptocurrencyCreate) SetIcon

SetIcon sets the "icon" field.

func (*CryptocurrencyCreate) SetInput

SetInput applies the change-set in the CreateCryptocurrencyInput on the CryptocurrencyCreate builder.

func (*CryptocurrencyCreate) SetName

SetName sets the "name" field.

func (*CryptocurrencyCreate) SetNillableCreatedAt

func (cc *CryptocurrencyCreate) SetNillableCreatedAt(t *time.Time) *CryptocurrencyCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*CryptocurrencyCreate) SetNillableDeletedAt

func (cc *CryptocurrencyCreate) SetNillableDeletedAt(t *time.Time) *CryptocurrencyCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*CryptocurrencyCreate) SetNillableID

func (cc *CryptocurrencyCreate) SetNillableID(pu *pulid.PULID) *CryptocurrencyCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CryptocurrencyCreate) SetNillableIcon

func (cc *CryptocurrencyCreate) SetNillableIcon(s *string) *CryptocurrencyCreate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*CryptocurrencyCreate) SetNillableUpdatedAt

func (cc *CryptocurrencyCreate) SetNillableUpdatedAt(t *time.Time) *CryptocurrencyCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*CryptocurrencyCreate) SetSymbol

SetSymbol sets the "symbol" field.

func (*CryptocurrencyCreate) SetUpdatedAt

func (cc *CryptocurrencyCreate) SetUpdatedAt(t time.Time) *CryptocurrencyCreate

SetUpdatedAt sets the "updated_at" field.

type CryptocurrencyCreateBulk

type CryptocurrencyCreateBulk struct {
	// contains filtered or unexported fields
}

CryptocurrencyCreateBulk is the builder for creating many Cryptocurrency entities in bulk.

func (*CryptocurrencyCreateBulk) Exec

Exec executes the query.

func (*CryptocurrencyCreateBulk) ExecX

func (ccb *CryptocurrencyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CryptocurrencyCreateBulk) Save

Save creates the Cryptocurrency entities in the database.

func (*CryptocurrencyCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type CryptocurrencyDelete

type CryptocurrencyDelete struct {
	// contains filtered or unexported fields
}

CryptocurrencyDelete is the builder for deleting a Cryptocurrency entity.

func (*CryptocurrencyDelete) Exec

func (cd *CryptocurrencyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CryptocurrencyDelete) ExecX

func (cd *CryptocurrencyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CryptocurrencyDelete) Where

Where appends a list predicates to the CryptocurrencyDelete builder.

type CryptocurrencyDeleteOne

type CryptocurrencyDeleteOne struct {
	// contains filtered or unexported fields
}

CryptocurrencyDeleteOne is the builder for deleting a single Cryptocurrency entity.

func (*CryptocurrencyDeleteOne) Exec

Exec executes the deletion query.

func (*CryptocurrencyDeleteOne) ExecX

func (cdo *CryptocurrencyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type CryptocurrencyEdge

type CryptocurrencyEdge struct {
	Node   *Cryptocurrency `json:"node"`
	Cursor Cursor          `json:"cursor"`
}

CryptocurrencyEdge is the edge representation of Cryptocurrency.

type CryptocurrencyEdges

type CryptocurrencyEdges struct {
	// Asset holds the value of the asset edge.
	Asset *Asset `json:"asset,omitempty"`
	// Blockchains holds the value of the blockchains edge.
	Blockchains []*Blockchain `json:"blockchains,omitempty"`
	// contains filtered or unexported fields
}

CryptocurrencyEdges holds the relations/edges for other nodes in the graph.

func (CryptocurrencyEdges) AssetOrErr

func (e CryptocurrencyEdges) AssetOrErr() (*Asset, error)

AssetOrErr returns the Asset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CryptocurrencyEdges) BlockchainsOrErr

func (e CryptocurrencyEdges) BlockchainsOrErr() ([]*Blockchain, error)

BlockchainsOrErr returns the Blockchains value or an error if the edge was not loaded in eager-loading.

type CryptocurrencyGroupBy

type CryptocurrencyGroupBy struct {
	// contains filtered or unexported fields
}

CryptocurrencyGroupBy is the group-by builder for Cryptocurrency entities.

func (*CryptocurrencyGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*CryptocurrencyGroupBy) Bool

func (s *CryptocurrencyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CryptocurrencyGroupBy) BoolX

func (s *CryptocurrencyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CryptocurrencyGroupBy) Bools

func (s *CryptocurrencyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CryptocurrencyGroupBy) BoolsX

func (s *CryptocurrencyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CryptocurrencyGroupBy) Float64

func (s *CryptocurrencyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CryptocurrencyGroupBy) Float64X

func (s *CryptocurrencyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CryptocurrencyGroupBy) Float64s

func (s *CryptocurrencyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CryptocurrencyGroupBy) Float64sX

func (s *CryptocurrencyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CryptocurrencyGroupBy) Int

func (s *CryptocurrencyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CryptocurrencyGroupBy) IntX

func (s *CryptocurrencyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CryptocurrencyGroupBy) Ints

func (s *CryptocurrencyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CryptocurrencyGroupBy) IntsX

func (s *CryptocurrencyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CryptocurrencyGroupBy) Scan

func (cgb *CryptocurrencyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*CryptocurrencyGroupBy) ScanX

func (s *CryptocurrencyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CryptocurrencyGroupBy) String

func (s *CryptocurrencyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CryptocurrencyGroupBy) StringX

func (s *CryptocurrencyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CryptocurrencyGroupBy) Strings

func (s *CryptocurrencyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CryptocurrencyGroupBy) StringsX

func (s *CryptocurrencyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CryptocurrencyMutation

type CryptocurrencyMutation struct {
	// contains filtered or unexported fields
}

CryptocurrencyMutation represents an operation that mutates the Cryptocurrency nodes in the graph.

func (*CryptocurrencyMutation) AddBlockchainIDs

func (m *CryptocurrencyMutation) AddBlockchainIDs(ids ...pulid.PULID)

AddBlockchainIDs adds the "blockchains" edge to the Blockchain entity by ids.

func (*CryptocurrencyMutation) AddField

func (m *CryptocurrencyMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CryptocurrencyMutation) AddedEdges

func (m *CryptocurrencyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CryptocurrencyMutation) AddedField

func (m *CryptocurrencyMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CryptocurrencyMutation) AddedFields

func (m *CryptocurrencyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CryptocurrencyMutation) AddedIDs

func (m *CryptocurrencyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CryptocurrencyMutation) AssetCleared

func (m *CryptocurrencyMutation) AssetCleared() bool

AssetCleared reports if the "asset" edge to the Asset entity was cleared.

func (*CryptocurrencyMutation) AssetID

func (m *CryptocurrencyMutation) AssetID() (r pulid.PULID, exists bool)

AssetID returns the value of the "asset_id" field in the mutation.

func (*CryptocurrencyMutation) AssetIDs

func (m *CryptocurrencyMutation) AssetIDs() (ids []pulid.PULID)

AssetIDs returns the "asset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AssetID instead. It exists only for internal usage by the builders.

func (*CryptocurrencyMutation) BlockchainsCleared

func (m *CryptocurrencyMutation) BlockchainsCleared() bool

BlockchainsCleared reports if the "blockchains" edge to the Blockchain entity was cleared.

func (*CryptocurrencyMutation) BlockchainsIDs

func (m *CryptocurrencyMutation) BlockchainsIDs() (ids []pulid.PULID)

BlockchainsIDs returns the "blockchains" edge IDs in the mutation.

func (*CryptocurrencyMutation) ClearAsset

func (m *CryptocurrencyMutation) ClearAsset()

ClearAsset clears the "asset" edge to the Asset entity.

func (*CryptocurrencyMutation) ClearBlockchains

func (m *CryptocurrencyMutation) ClearBlockchains()

ClearBlockchains clears the "blockchains" edge to the Blockchain entity.

func (*CryptocurrencyMutation) ClearDeletedAt

func (m *CryptocurrencyMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*CryptocurrencyMutation) ClearEdge

func (m *CryptocurrencyMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*CryptocurrencyMutation) ClearField

func (m *CryptocurrencyMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*CryptocurrencyMutation) ClearIcon

func (m *CryptocurrencyMutation) ClearIcon()

ClearIcon clears the value of the "icon" field.

func (*CryptocurrencyMutation) ClearedEdges

func (m *CryptocurrencyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CryptocurrencyMutation) ClearedFields

func (m *CryptocurrencyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CryptocurrencyMutation) Client

func (m CryptocurrencyMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*CryptocurrencyMutation) CreatedAt

func (m *CryptocurrencyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*CryptocurrencyMutation) DeletedAt

func (m *CryptocurrencyMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*CryptocurrencyMutation) DeletedAtCleared

func (m *CryptocurrencyMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*CryptocurrencyMutation) EdgeCleared

func (m *CryptocurrencyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CryptocurrencyMutation) Field

func (m *CryptocurrencyMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CryptocurrencyMutation) FieldCleared

func (m *CryptocurrencyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CryptocurrencyMutation) Fields

func (m *CryptocurrencyMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*CryptocurrencyMutation) ID

func (m *CryptocurrencyMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CryptocurrencyMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CryptocurrencyMutation) Icon

func (m *CryptocurrencyMutation) Icon() (r string, exists bool)

Icon returns the value of the "icon" field in the mutation.

func (*CryptocurrencyMutation) IconCleared

func (m *CryptocurrencyMutation) IconCleared() bool

IconCleared returns if the "icon" field was cleared in this mutation.

func (*CryptocurrencyMutation) Name

func (m *CryptocurrencyMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*CryptocurrencyMutation) OldAssetID

func (m *CryptocurrencyMutation) OldAssetID(ctx context.Context) (v pulid.PULID, err error)

OldAssetID returns the old "asset_id" field's value of the Cryptocurrency entity. If the Cryptocurrency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CryptocurrencyMutation) OldCreatedAt

func (m *CryptocurrencyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Cryptocurrency entity. If the Cryptocurrency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CryptocurrencyMutation) OldDeletedAt

func (m *CryptocurrencyMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Cryptocurrency entity. If the Cryptocurrency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CryptocurrencyMutation) OldField

func (m *CryptocurrencyMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*CryptocurrencyMutation) OldIcon

func (m *CryptocurrencyMutation) OldIcon(ctx context.Context) (v *string, err error)

OldIcon returns the old "icon" field's value of the Cryptocurrency entity. If the Cryptocurrency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CryptocurrencyMutation) OldName

func (m *CryptocurrencyMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Cryptocurrency entity. If the Cryptocurrency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CryptocurrencyMutation) OldSymbol

func (m *CryptocurrencyMutation) OldSymbol(ctx context.Context) (v string, err error)

OldSymbol returns the old "symbol" field's value of the Cryptocurrency entity. If the Cryptocurrency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CryptocurrencyMutation) OldUpdatedAt

func (m *CryptocurrencyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Cryptocurrency entity. If the Cryptocurrency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CryptocurrencyMutation) Op

func (m *CryptocurrencyMutation) Op() Op

Op returns the operation name.

func (*CryptocurrencyMutation) RemoveBlockchainIDs

func (m *CryptocurrencyMutation) RemoveBlockchainIDs(ids ...pulid.PULID)

RemoveBlockchainIDs removes the "blockchains" edge to the Blockchain entity by IDs.

func (*CryptocurrencyMutation) RemovedBlockchainsIDs

func (m *CryptocurrencyMutation) RemovedBlockchainsIDs() (ids []pulid.PULID)

RemovedBlockchains returns the removed IDs of the "blockchains" edge to the Blockchain entity.

func (*CryptocurrencyMutation) RemovedEdges

func (m *CryptocurrencyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CryptocurrencyMutation) RemovedIDs

func (m *CryptocurrencyMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*CryptocurrencyMutation) ResetAsset

func (m *CryptocurrencyMutation) ResetAsset()

ResetAsset resets all changes to the "asset" edge.

func (*CryptocurrencyMutation) ResetAssetID

func (m *CryptocurrencyMutation) ResetAssetID()

ResetAssetID resets all changes to the "asset_id" field.

func (*CryptocurrencyMutation) ResetBlockchains

func (m *CryptocurrencyMutation) ResetBlockchains()

ResetBlockchains resets all changes to the "blockchains" edge.

func (*CryptocurrencyMutation) ResetCreatedAt

func (m *CryptocurrencyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CryptocurrencyMutation) ResetDeletedAt

func (m *CryptocurrencyMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*CryptocurrencyMutation) ResetEdge

func (m *CryptocurrencyMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*CryptocurrencyMutation) ResetField

func (m *CryptocurrencyMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*CryptocurrencyMutation) ResetIcon

func (m *CryptocurrencyMutation) ResetIcon()

ResetIcon resets all changes to the "icon" field.

func (*CryptocurrencyMutation) ResetName

func (m *CryptocurrencyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CryptocurrencyMutation) ResetSymbol

func (m *CryptocurrencyMutation) ResetSymbol()

ResetSymbol resets all changes to the "symbol" field.

func (*CryptocurrencyMutation) ResetUpdatedAt

func (m *CryptocurrencyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CryptocurrencyMutation) SetAssetID

func (m *CryptocurrencyMutation) SetAssetID(pu pulid.PULID)

SetAssetID sets the "asset_id" field.

func (*CryptocurrencyMutation) SetCreatedAt

func (m *CryptocurrencyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*CryptocurrencyMutation) SetDeletedAt

func (m *CryptocurrencyMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*CryptocurrencyMutation) SetField

func (m *CryptocurrencyMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CryptocurrencyMutation) SetID

func (m *CryptocurrencyMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Cryptocurrency entities.

func (*CryptocurrencyMutation) SetIcon

func (m *CryptocurrencyMutation) SetIcon(s string)

SetIcon sets the "icon" field.

func (*CryptocurrencyMutation) SetName

func (m *CryptocurrencyMutation) SetName(s string)

SetName sets the "name" field.

func (*CryptocurrencyMutation) SetSymbol

func (m *CryptocurrencyMutation) SetSymbol(s string)

SetSymbol sets the "symbol" field.

func (*CryptocurrencyMutation) SetUpdatedAt

func (m *CryptocurrencyMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*CryptocurrencyMutation) Symbol

func (m *CryptocurrencyMutation) Symbol() (r string, exists bool)

Symbol returns the value of the "symbol" field in the mutation.

func (CryptocurrencyMutation) Tx

func (m CryptocurrencyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CryptocurrencyMutation) Type

func (m *CryptocurrencyMutation) Type() string

Type returns the node type of this mutation (Cryptocurrency).

func (*CryptocurrencyMutation) UpdatedAt

func (m *CryptocurrencyMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*CryptocurrencyMutation) Where

Where appends a list predicates to the CryptocurrencyMutation builder.

type CryptocurrencyOrder

type CryptocurrencyOrder struct {
	Direction OrderDirection            `json:"direction"`
	Field     *CryptocurrencyOrderField `json:"field"`
}

CryptocurrencyOrder defines the ordering of Cryptocurrency.

type CryptocurrencyOrderField

type CryptocurrencyOrderField struct {
	// contains filtered or unexported fields
}

CryptocurrencyOrderField defines the ordering field of Cryptocurrency.

func (CryptocurrencyOrderField) MarshalGQL

func (f CryptocurrencyOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (CryptocurrencyOrderField) String

func (f CryptocurrencyOrderField) String() string

String implement fmt.Stringer interface.

func (*CryptocurrencyOrderField) UnmarshalGQL

func (f *CryptocurrencyOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type CryptocurrencyPaginateOption

type CryptocurrencyPaginateOption func(*cryptocurrencyPager) error

CryptocurrencyPaginateOption enables pagination customization.

func WithCryptocurrencyFilter

func WithCryptocurrencyFilter(filter func(*CryptocurrencyQuery) (*CryptocurrencyQuery, error)) CryptocurrencyPaginateOption

WithCryptocurrencyFilter configures pagination filter.

func WithCryptocurrencyOrder

func WithCryptocurrencyOrder(order *CryptocurrencyOrder) CryptocurrencyPaginateOption

WithCryptocurrencyOrder configures pagination ordering.

type CryptocurrencyQuery

type CryptocurrencyQuery struct {
	// contains filtered or unexported fields
}

CryptocurrencyQuery is the builder for querying Cryptocurrency entities.

func (*CryptocurrencyQuery) All

All executes the query and returns a list of Cryptocurrencies.

func (*CryptocurrencyQuery) AllX

AllX is like All, but panics if an error occurs.

func (*CryptocurrencyQuery) Clone

Clone returns a duplicate of the CryptocurrencyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CryptocurrencyQuery) CollectFields

func (c *CryptocurrencyQuery) CollectFields(ctx context.Context, satisfies ...string) (*CryptocurrencyQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*CryptocurrencyQuery) Count

func (cq *CryptocurrencyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CryptocurrencyQuery) CountX

func (cq *CryptocurrencyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CryptocurrencyQuery) Exist

func (cq *CryptocurrencyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CryptocurrencyQuery) ExistX

func (cq *CryptocurrencyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CryptocurrencyQuery) First

First returns the first Cryptocurrency entity from the query. Returns a *NotFoundError when no Cryptocurrency was found.

func (*CryptocurrencyQuery) FirstID

func (cq *CryptocurrencyQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Cryptocurrency ID from the query. Returns a *NotFoundError when no Cryptocurrency ID was found.

func (*CryptocurrencyQuery) FirstIDX

func (cq *CryptocurrencyQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*CryptocurrencyQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*CryptocurrencyQuery) GroupBy

func (cq *CryptocurrencyQuery) GroupBy(field string, fields ...string) *CryptocurrencyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Cryptocurrency.Query().
	GroupBy(cryptocurrency.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CryptocurrencyQuery) IDs

func (cq *CryptocurrencyQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Cryptocurrency IDs.

func (*CryptocurrencyQuery) IDsX

func (cq *CryptocurrencyQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*CryptocurrencyQuery) Limit

func (cq *CryptocurrencyQuery) Limit(limit int) *CryptocurrencyQuery

Limit adds a limit step to the query.

func (*CryptocurrencyQuery) Offset

func (cq *CryptocurrencyQuery) Offset(offset int) *CryptocurrencyQuery

Offset adds an offset step to the query.

func (*CryptocurrencyQuery) Only

Only returns a single Cryptocurrency entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Cryptocurrency entity is found. Returns a *NotFoundError when no Cryptocurrency entities are found.

func (*CryptocurrencyQuery) OnlyID

func (cq *CryptocurrencyQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Cryptocurrency ID in the query. Returns a *NotSingularError when more than one Cryptocurrency ID is found. Returns a *NotFoundError when no entities are found.

func (*CryptocurrencyQuery) OnlyIDX

func (cq *CryptocurrencyQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CryptocurrencyQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*CryptocurrencyQuery) Order

Order adds an order step to the query.

func (*CryptocurrencyQuery) Paginate

func (c *CryptocurrencyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CryptocurrencyPaginateOption,
) (*CryptocurrencyConnection, error)

Paginate executes the query and returns a relay based cursor connection to Cryptocurrency.

func (*CryptocurrencyQuery) QueryAsset

func (cq *CryptocurrencyQuery) QueryAsset() *AssetQuery

QueryAsset chains the current query on the "asset" edge.

func (*CryptocurrencyQuery) QueryBlockchains

func (cq *CryptocurrencyQuery) QueryBlockchains() *BlockchainQuery

QueryBlockchains chains the current query on the "blockchains" edge.

func (*CryptocurrencyQuery) Select

func (cq *CryptocurrencyQuery) Select(fields ...string) *CryptocurrencySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Cryptocurrency.Query().
	Select(cryptocurrency.FieldCreatedAt).
	Scan(ctx, &v)

func (*CryptocurrencyQuery) Unique

func (cq *CryptocurrencyQuery) Unique(unique bool) *CryptocurrencyQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CryptocurrencyQuery) Where

Where adds a new predicate for the CryptocurrencyQuery builder.

func (*CryptocurrencyQuery) WithAsset

func (cq *CryptocurrencyQuery) WithAsset(opts ...func(*AssetQuery)) *CryptocurrencyQuery

WithAsset tells the query-builder to eager-load the nodes that are connected to the "asset" edge. The optional arguments are used to configure the query builder of the edge.

func (*CryptocurrencyQuery) WithBlockchains

func (cq *CryptocurrencyQuery) WithBlockchains(opts ...func(*BlockchainQuery)) *CryptocurrencyQuery

WithBlockchains tells the query-builder to eager-load the nodes that are connected to the "blockchains" edge. The optional arguments are used to configure the query builder of the edge.

func (*CryptocurrencyQuery) WithNamedBlockchains

func (cq *CryptocurrencyQuery) WithNamedBlockchains(name string, opts ...func(*BlockchainQuery)) *CryptocurrencyQuery

WithNamedBlockchains tells the query-builder to eager-load the nodes that are connected to the "blockchains" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type CryptocurrencySelect

type CryptocurrencySelect struct {
	*CryptocurrencyQuery
	// contains filtered or unexported fields
}

CryptocurrencySelect is the builder for selecting fields of Cryptocurrency entities.

func (*CryptocurrencySelect) Bool

func (s *CryptocurrencySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CryptocurrencySelect) BoolX

func (s *CryptocurrencySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CryptocurrencySelect) Bools

func (s *CryptocurrencySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CryptocurrencySelect) BoolsX

func (s *CryptocurrencySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CryptocurrencySelect) Float64

func (s *CryptocurrencySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CryptocurrencySelect) Float64X

func (s *CryptocurrencySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CryptocurrencySelect) Float64s

func (s *CryptocurrencySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CryptocurrencySelect) Float64sX

func (s *CryptocurrencySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CryptocurrencySelect) Int

func (s *CryptocurrencySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CryptocurrencySelect) IntX

func (s *CryptocurrencySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CryptocurrencySelect) Ints

func (s *CryptocurrencySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CryptocurrencySelect) IntsX

func (s *CryptocurrencySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CryptocurrencySelect) Scan

func (cs *CryptocurrencySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CryptocurrencySelect) ScanX

func (s *CryptocurrencySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CryptocurrencySelect) String

func (s *CryptocurrencySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CryptocurrencySelect) StringX

func (s *CryptocurrencySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CryptocurrencySelect) Strings

func (s *CryptocurrencySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CryptocurrencySelect) StringsX

func (s *CryptocurrencySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CryptocurrencyUpdate

type CryptocurrencyUpdate struct {
	// contains filtered or unexported fields
}

CryptocurrencyUpdate is the builder for updating Cryptocurrency entities.

func (*CryptocurrencyUpdate) AddBlockchainIDs

func (cu *CryptocurrencyUpdate) AddBlockchainIDs(ids ...pulid.PULID) *CryptocurrencyUpdate

AddBlockchainIDs adds the "blockchains" edge to the Blockchain entity by IDs.

func (*CryptocurrencyUpdate) AddBlockchains

func (cu *CryptocurrencyUpdate) AddBlockchains(b ...*Blockchain) *CryptocurrencyUpdate

AddBlockchains adds the "blockchains" edges to the Blockchain entity.

func (*CryptocurrencyUpdate) ClearAsset

func (cu *CryptocurrencyUpdate) ClearAsset() *CryptocurrencyUpdate

ClearAsset clears the "asset" edge to the Asset entity.

func (*CryptocurrencyUpdate) ClearBlockchains

func (cu *CryptocurrencyUpdate) ClearBlockchains() *CryptocurrencyUpdate

ClearBlockchains clears all "blockchains" edges to the Blockchain entity.

func (*CryptocurrencyUpdate) ClearDeletedAt

func (cu *CryptocurrencyUpdate) ClearDeletedAt() *CryptocurrencyUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*CryptocurrencyUpdate) ClearIcon

func (cu *CryptocurrencyUpdate) ClearIcon() *CryptocurrencyUpdate

ClearIcon clears the value of the "icon" field.

func (*CryptocurrencyUpdate) Exec

func (cu *CryptocurrencyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CryptocurrencyUpdate) ExecX

func (cu *CryptocurrencyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CryptocurrencyUpdate) Mutation

Mutation returns the CryptocurrencyMutation object of the builder.

func (*CryptocurrencyUpdate) RemoveBlockchainIDs

func (cu *CryptocurrencyUpdate) RemoveBlockchainIDs(ids ...pulid.PULID) *CryptocurrencyUpdate

RemoveBlockchainIDs removes the "blockchains" edge to Blockchain entities by IDs.

func (*CryptocurrencyUpdate) RemoveBlockchains

func (cu *CryptocurrencyUpdate) RemoveBlockchains(b ...*Blockchain) *CryptocurrencyUpdate

RemoveBlockchains removes "blockchains" edges to Blockchain entities.

func (*CryptocurrencyUpdate) Save

func (cu *CryptocurrencyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CryptocurrencyUpdate) SaveX

func (cu *CryptocurrencyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CryptocurrencyUpdate) SetAsset

SetAsset sets the "asset" edge to the Asset entity.

func (*CryptocurrencyUpdate) SetAssetID

SetAssetID sets the "asset_id" field.

func (*CryptocurrencyUpdate) SetDeletedAt

func (cu *CryptocurrencyUpdate) SetDeletedAt(t time.Time) *CryptocurrencyUpdate

SetDeletedAt sets the "deleted_at" field.

func (*CryptocurrencyUpdate) SetIcon

SetIcon sets the "icon" field.

func (*CryptocurrencyUpdate) SetInput

SetInput applies the change-set in the UpdateCryptocurrencyInput on the CryptocurrencyUpdate builder.

func (*CryptocurrencyUpdate) SetName

SetName sets the "name" field.

func (*CryptocurrencyUpdate) SetNillableIcon

func (cu *CryptocurrencyUpdate) SetNillableIcon(s *string) *CryptocurrencyUpdate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*CryptocurrencyUpdate) SetSymbol

SetSymbol sets the "symbol" field.

func (*CryptocurrencyUpdate) SetUpdatedAt

func (cu *CryptocurrencyUpdate) SetUpdatedAt(t time.Time) *CryptocurrencyUpdate

SetUpdatedAt sets the "updated_at" field.

func (*CryptocurrencyUpdate) Where

Where appends a list predicates to the CryptocurrencyUpdate builder.

type CryptocurrencyUpdateOne

type CryptocurrencyUpdateOne struct {
	// contains filtered or unexported fields
}

CryptocurrencyUpdateOne is the builder for updating a single Cryptocurrency entity.

func (*CryptocurrencyUpdateOne) AddBlockchainIDs

func (cuo *CryptocurrencyUpdateOne) AddBlockchainIDs(ids ...pulid.PULID) *CryptocurrencyUpdateOne

AddBlockchainIDs adds the "blockchains" edge to the Blockchain entity by IDs.

func (*CryptocurrencyUpdateOne) AddBlockchains

func (cuo *CryptocurrencyUpdateOne) AddBlockchains(b ...*Blockchain) *CryptocurrencyUpdateOne

AddBlockchains adds the "blockchains" edges to the Blockchain entity.

func (*CryptocurrencyUpdateOne) ClearAsset

ClearAsset clears the "asset" edge to the Asset entity.

func (*CryptocurrencyUpdateOne) ClearBlockchains

func (cuo *CryptocurrencyUpdateOne) ClearBlockchains() *CryptocurrencyUpdateOne

ClearBlockchains clears all "blockchains" edges to the Blockchain entity.

func (*CryptocurrencyUpdateOne) ClearDeletedAt

func (cuo *CryptocurrencyUpdateOne) ClearDeletedAt() *CryptocurrencyUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*CryptocurrencyUpdateOne) ClearIcon

ClearIcon clears the value of the "icon" field.

func (*CryptocurrencyUpdateOne) Exec

Exec executes the query on the entity.

func (*CryptocurrencyUpdateOne) ExecX

func (cuo *CryptocurrencyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CryptocurrencyUpdateOne) Mutation

Mutation returns the CryptocurrencyMutation object of the builder.

func (*CryptocurrencyUpdateOne) RemoveBlockchainIDs

func (cuo *CryptocurrencyUpdateOne) RemoveBlockchainIDs(ids ...pulid.PULID) *CryptocurrencyUpdateOne

RemoveBlockchainIDs removes the "blockchains" edge to Blockchain entities by IDs.

func (*CryptocurrencyUpdateOne) RemoveBlockchains

func (cuo *CryptocurrencyUpdateOne) RemoveBlockchains(b ...*Blockchain) *CryptocurrencyUpdateOne

RemoveBlockchains removes "blockchains" edges to Blockchain entities.

func (*CryptocurrencyUpdateOne) Save

Save executes the query and returns the updated Cryptocurrency entity.

func (*CryptocurrencyUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*CryptocurrencyUpdateOne) Select

func (cuo *CryptocurrencyUpdateOne) Select(field string, fields ...string) *CryptocurrencyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CryptocurrencyUpdateOne) SetAsset

SetAsset sets the "asset" edge to the Asset entity.

func (*CryptocurrencyUpdateOne) SetAssetID

SetAssetID sets the "asset_id" field.

func (*CryptocurrencyUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*CryptocurrencyUpdateOne) SetIcon

SetIcon sets the "icon" field.

func (*CryptocurrencyUpdateOne) SetInput

SetInput applies the change-set in the UpdateCryptocurrencyInput on the CryptocurrencyUpdateOne builder.

func (*CryptocurrencyUpdateOne) SetName

SetName sets the "name" field.

func (*CryptocurrencyUpdateOne) SetNillableIcon

func (cuo *CryptocurrencyUpdateOne) SetNillableIcon(s *string) *CryptocurrencyUpdateOne

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*CryptocurrencyUpdateOne) SetSymbol

SetSymbol sets the "symbol" field.

func (*CryptocurrencyUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type CryptocurrencyWhereInput

type CryptocurrencyWhereInput struct {
	Predicates []predicate.Cryptocurrency  `json:"-"`
	Not        *CryptocurrencyWhereInput   `json:"not,omitempty"`
	Or         []*CryptocurrencyWhereInput `json:"or,omitempty"`
	And        []*CryptocurrencyWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "symbol" field predicates.
	Symbol             *string  `json:"symbol,omitempty"`
	SymbolNEQ          *string  `json:"symbolNEQ,omitempty"`
	SymbolIn           []string `json:"symbolIn,omitempty"`
	SymbolNotIn        []string `json:"symbolNotIn,omitempty"`
	SymbolGT           *string  `json:"symbolGT,omitempty"`
	SymbolGTE          *string  `json:"symbolGTE,omitempty"`
	SymbolLT           *string  `json:"symbolLT,omitempty"`
	SymbolLTE          *string  `json:"symbolLTE,omitempty"`
	SymbolContains     *string  `json:"symbolContains,omitempty"`
	SymbolHasPrefix    *string  `json:"symbolHasPrefix,omitempty"`
	SymbolHasSuffix    *string  `json:"symbolHasSuffix,omitempty"`
	SymbolEqualFold    *string  `json:"symbolEqualFold,omitempty"`
	SymbolContainsFold *string  `json:"symbolContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "asset_id" field predicates.
	AssetID             *pulid.PULID  `json:"assetID,omitempty"`
	AssetIDNEQ          *pulid.PULID  `json:"assetIDNEQ,omitempty"`
	AssetIDIn           []pulid.PULID `json:"assetIDIn,omitempty"`
	AssetIDNotIn        []pulid.PULID `json:"assetIDNotIn,omitempty"`
	AssetIDGT           *pulid.PULID  `json:"assetIDGT,omitempty"`
	AssetIDGTE          *pulid.PULID  `json:"assetIDGTE,omitempty"`
	AssetIDLT           *pulid.PULID  `json:"assetIDLT,omitempty"`
	AssetIDLTE          *pulid.PULID  `json:"assetIDLTE,omitempty"`
	AssetIDContains     *pulid.PULID  `json:"assetIDContains,omitempty"`
	AssetIDHasPrefix    *pulid.PULID  `json:"assetIDHasPrefix,omitempty"`
	AssetIDHasSuffix    *pulid.PULID  `json:"assetIDHasSuffix,omitempty"`
	AssetIDEqualFold    *pulid.PULID  `json:"assetIDEqualFold,omitempty"`
	AssetIDContainsFold *pulid.PULID  `json:"assetIDContainsFold,omitempty"`

	// "asset" edge predicates.
	HasAsset     *bool              `json:"hasAsset,omitempty"`
	HasAssetWith []*AssetWhereInput `json:"hasAssetWith,omitempty"`

	// "blockchains" edge predicates.
	HasBlockchains     *bool                   `json:"hasBlockchains,omitempty"`
	HasBlockchainsWith []*BlockchainWhereInput `json:"hasBlockchainsWith,omitempty"`
}

CryptocurrencyWhereInput represents a where input for filtering Cryptocurrency queries.

func (*CryptocurrencyWhereInput) AddPredicates

func (i *CryptocurrencyWhereInput) AddPredicates(predicates ...predicate.Cryptocurrency)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*CryptocurrencyWhereInput) Filter

Filter applies the CryptocurrencyWhereInput filter on the CryptocurrencyQuery builder.

func (*CryptocurrencyWhereInput) P

P returns a predicate for filtering cryptocurrencies. An error is returned if the input is empty or invalid.

type Cursor

type Cursor struct {
	ID    pulid.PULID `msgpack:"i"`
	Value Value       `msgpack:"v,omitempty"`
}

Cursor of an edge type.

func (Cursor) MarshalGQL

func (c Cursor) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (*Cursor) UnmarshalGQL

func (c *Cursor) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type DailyAssetPrice

type DailyAssetPrice struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Time holds the value of the "time" field.
	Time time.Time `json:"time,omitempty"`
	// Open holds the value of the "open" field.
	Open *float64 `json:"open,omitempty"`
	// High holds the value of the "high" field.
	High *float64 `json:"high,omitempty"`
	// Low holds the value of the "low" field.
	Low *float64 `json:"low,omitempty"`
	// Close holds the value of the "close" field.
	Close *float64 `json:"close,omitempty"`
	// AdjustedClose holds the value of the "adjusted_close" field.
	AdjustedClose float64 `json:"adjustedClose,omitempty"`
	// AssetID holds the value of the "asset_id" field.
	AssetID pulid.PULID `json:"assetID,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DailyAssetPriceQuery when eager-loading is set.
	Edges DailyAssetPriceEdges `json:"edges"`
	// contains filtered or unexported fields
}

DailyAssetPrice is the model entity for the DailyAssetPrice schema.

func (*DailyAssetPrice) Asset

func (dap *DailyAssetPrice) Asset(ctx context.Context) (*Asset, error)

func (*DailyAssetPrice) Node

func (dap *DailyAssetPrice) Node(ctx context.Context) (node *Node, err error)

func (*DailyAssetPrice) QueryAsset

func (dap *DailyAssetPrice) QueryAsset() *AssetQuery

QueryAsset queries the "asset" edge of the DailyAssetPrice entity.

func (*DailyAssetPrice) String

func (dap *DailyAssetPrice) String() string

String implements the fmt.Stringer.

func (*DailyAssetPrice) ToEdge

ToEdge converts DailyAssetPrice into DailyAssetPriceEdge.

func (*DailyAssetPrice) Unwrap

func (dap *DailyAssetPrice) Unwrap() *DailyAssetPrice

Unwrap unwraps the DailyAssetPrice entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DailyAssetPrice) Update

Update returns a builder for updating this DailyAssetPrice. Note that you need to call DailyAssetPrice.Unwrap() before calling this method if this DailyAssetPrice was returned from a transaction, and the transaction was committed or rolled back.

type DailyAssetPriceClient

type DailyAssetPriceClient struct {
	// contains filtered or unexported fields
}

DailyAssetPriceClient is a client for the DailyAssetPrice schema.

func NewDailyAssetPriceClient

func NewDailyAssetPriceClient(c config) *DailyAssetPriceClient

NewDailyAssetPriceClient returns a client for the DailyAssetPrice from the given config.

func (*DailyAssetPriceClient) Create

Create returns a builder for creating a DailyAssetPrice entity.

func (*DailyAssetPriceClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DailyAssetPrice entities.

func (*DailyAssetPriceClient) Delete

Delete returns a delete builder for DailyAssetPrice.

func (*DailyAssetPriceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DailyAssetPriceClient) DeleteOneID

DeleteOne returns a builder for deleting the given entity by its id.

func (*DailyAssetPriceClient) Get

Get returns a DailyAssetPrice entity by its id.

func (*DailyAssetPriceClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DailyAssetPriceClient) Hooks

func (c *DailyAssetPriceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DailyAssetPriceClient) Query

Query returns a query builder for DailyAssetPrice.

func (*DailyAssetPriceClient) QueryAsset

func (c *DailyAssetPriceClient) QueryAsset(dap *DailyAssetPrice) *AssetQuery

QueryAsset queries the asset edge of a DailyAssetPrice.

func (*DailyAssetPriceClient) Update

Update returns an update builder for DailyAssetPrice.

func (*DailyAssetPriceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DailyAssetPriceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DailyAssetPriceClient) Use

func (c *DailyAssetPriceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dailyassetprice.Hooks(f(g(h())))`.

type DailyAssetPriceConnection

type DailyAssetPriceConnection struct {
	Edges      []*DailyAssetPriceEdge `json:"edges"`
	PageInfo   PageInfo               `json:"pageInfo"`
	TotalCount int                    `json:"totalCount"`
}

DailyAssetPriceConnection is the connection containing edges to DailyAssetPrice.

type DailyAssetPriceCreate

type DailyAssetPriceCreate struct {
	// contains filtered or unexported fields
}

DailyAssetPriceCreate is the builder for creating a DailyAssetPrice entity.

func (*DailyAssetPriceCreate) Exec

func (dapc *DailyAssetPriceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DailyAssetPriceCreate) ExecX

func (dapc *DailyAssetPriceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DailyAssetPriceCreate) Mutation

Mutation returns the DailyAssetPriceMutation object of the builder.

func (*DailyAssetPriceCreate) Save

Save creates the DailyAssetPrice in the database.

func (*DailyAssetPriceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DailyAssetPriceCreate) SetAdjustedClose

func (dapc *DailyAssetPriceCreate) SetAdjustedClose(f float64) *DailyAssetPriceCreate

SetAdjustedClose sets the "adjusted_close" field.

func (*DailyAssetPriceCreate) SetAsset

SetAsset sets the "asset" edge to the Asset entity.

func (*DailyAssetPriceCreate) SetAssetID

SetAssetID sets the "asset_id" field.

func (*DailyAssetPriceCreate) SetClose

SetClose sets the "close" field.

func (*DailyAssetPriceCreate) SetCreatedAt

func (dapc *DailyAssetPriceCreate) SetCreatedAt(t time.Time) *DailyAssetPriceCreate

SetCreatedAt sets the "created_at" field.

func (*DailyAssetPriceCreate) SetDeletedAt

func (dapc *DailyAssetPriceCreate) SetDeletedAt(t time.Time) *DailyAssetPriceCreate

SetDeletedAt sets the "deleted_at" field.

func (*DailyAssetPriceCreate) SetHigh

SetHigh sets the "high" field.

func (*DailyAssetPriceCreate) SetID

SetID sets the "id" field.

func (*DailyAssetPriceCreate) SetInput

SetInput applies the change-set in the CreateDailyAssetPriceInput on the DailyAssetPriceCreate builder.

func (*DailyAssetPriceCreate) SetLow

SetLow sets the "low" field.

func (*DailyAssetPriceCreate) SetNillableClose

func (dapc *DailyAssetPriceCreate) SetNillableClose(f *float64) *DailyAssetPriceCreate

SetNillableClose sets the "close" field if the given value is not nil.

func (*DailyAssetPriceCreate) SetNillableCreatedAt

func (dapc *DailyAssetPriceCreate) SetNillableCreatedAt(t *time.Time) *DailyAssetPriceCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DailyAssetPriceCreate) SetNillableDeletedAt

func (dapc *DailyAssetPriceCreate) SetNillableDeletedAt(t *time.Time) *DailyAssetPriceCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*DailyAssetPriceCreate) SetNillableHigh

func (dapc *DailyAssetPriceCreate) SetNillableHigh(f *float64) *DailyAssetPriceCreate

SetNillableHigh sets the "high" field if the given value is not nil.

func (*DailyAssetPriceCreate) SetNillableID

func (dapc *DailyAssetPriceCreate) SetNillableID(pu *pulid.PULID) *DailyAssetPriceCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*DailyAssetPriceCreate) SetNillableLow

func (dapc *DailyAssetPriceCreate) SetNillableLow(f *float64) *DailyAssetPriceCreate

SetNillableLow sets the "low" field if the given value is not nil.

func (*DailyAssetPriceCreate) SetNillableOpen

func (dapc *DailyAssetPriceCreate) SetNillableOpen(f *float64) *DailyAssetPriceCreate

SetNillableOpen sets the "open" field if the given value is not nil.

func (*DailyAssetPriceCreate) SetNillableUpdatedAt

func (dapc *DailyAssetPriceCreate) SetNillableUpdatedAt(t *time.Time) *DailyAssetPriceCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DailyAssetPriceCreate) SetOpen

SetOpen sets the "open" field.

func (*DailyAssetPriceCreate) SetTime

SetTime sets the "time" field.

func (*DailyAssetPriceCreate) SetUpdatedAt

func (dapc *DailyAssetPriceCreate) SetUpdatedAt(t time.Time) *DailyAssetPriceCreate

SetUpdatedAt sets the "updated_at" field.

type DailyAssetPriceCreateBulk

type DailyAssetPriceCreateBulk struct {
	// contains filtered or unexported fields
}

DailyAssetPriceCreateBulk is the builder for creating many DailyAssetPrice entities in bulk.

func (*DailyAssetPriceCreateBulk) Exec

Exec executes the query.

func (*DailyAssetPriceCreateBulk) ExecX

func (dapcb *DailyAssetPriceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DailyAssetPriceCreateBulk) Save

Save creates the DailyAssetPrice entities in the database.

func (*DailyAssetPriceCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DailyAssetPriceDelete

type DailyAssetPriceDelete struct {
	// contains filtered or unexported fields
}

DailyAssetPriceDelete is the builder for deleting a DailyAssetPrice entity.

func (*DailyAssetPriceDelete) Exec

func (dapd *DailyAssetPriceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DailyAssetPriceDelete) ExecX

func (dapd *DailyAssetPriceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DailyAssetPriceDelete) Where

Where appends a list predicates to the DailyAssetPriceDelete builder.

type DailyAssetPriceDeleteOne

type DailyAssetPriceDeleteOne struct {
	// contains filtered or unexported fields
}

DailyAssetPriceDeleteOne is the builder for deleting a single DailyAssetPrice entity.

func (*DailyAssetPriceDeleteOne) Exec

func (dapdo *DailyAssetPriceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DailyAssetPriceDeleteOne) ExecX

func (dapdo *DailyAssetPriceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type DailyAssetPriceEdge

type DailyAssetPriceEdge struct {
	Node   *DailyAssetPrice `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

DailyAssetPriceEdge is the edge representation of DailyAssetPrice.

type DailyAssetPriceEdges

type DailyAssetPriceEdges struct {
	// Asset holds the value of the asset edge.
	Asset *Asset `json:"asset,omitempty"`
	// contains filtered or unexported fields
}

DailyAssetPriceEdges holds the relations/edges for other nodes in the graph.

func (DailyAssetPriceEdges) AssetOrErr

func (e DailyAssetPriceEdges) AssetOrErr() (*Asset, error)

AssetOrErr returns the Asset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type DailyAssetPriceGroupBy

type DailyAssetPriceGroupBy struct {
	// contains filtered or unexported fields
}

DailyAssetPriceGroupBy is the group-by builder for DailyAssetPrice entities.

func (*DailyAssetPriceGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DailyAssetPriceGroupBy) Bool

func (s *DailyAssetPriceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceGroupBy) BoolX

func (s *DailyAssetPriceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DailyAssetPriceGroupBy) Bools

func (s *DailyAssetPriceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceGroupBy) BoolsX

func (s *DailyAssetPriceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DailyAssetPriceGroupBy) Float64

func (s *DailyAssetPriceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceGroupBy) Float64X

func (s *DailyAssetPriceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DailyAssetPriceGroupBy) Float64s

func (s *DailyAssetPriceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceGroupBy) Float64sX

func (s *DailyAssetPriceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DailyAssetPriceGroupBy) Int

func (s *DailyAssetPriceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceGroupBy) IntX

func (s *DailyAssetPriceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DailyAssetPriceGroupBy) Ints

func (s *DailyAssetPriceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceGroupBy) IntsX

func (s *DailyAssetPriceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DailyAssetPriceGroupBy) Scan

func (dapgb *DailyAssetPriceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*DailyAssetPriceGroupBy) ScanX

func (s *DailyAssetPriceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DailyAssetPriceGroupBy) String

func (s *DailyAssetPriceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceGroupBy) StringX

func (s *DailyAssetPriceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DailyAssetPriceGroupBy) Strings

func (s *DailyAssetPriceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceGroupBy) StringsX

func (s *DailyAssetPriceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DailyAssetPriceMutation

type DailyAssetPriceMutation struct {
	// contains filtered or unexported fields
}

DailyAssetPriceMutation represents an operation that mutates the DailyAssetPrice nodes in the graph.

func (*DailyAssetPriceMutation) AddAdjustedClose

func (m *DailyAssetPriceMutation) AddAdjustedClose(f float64)

AddAdjustedClose adds f to the "adjusted_close" field.

func (*DailyAssetPriceMutation) AddClose

func (m *DailyAssetPriceMutation) AddClose(f float64)

AddClose adds f to the "close" field.

func (*DailyAssetPriceMutation) AddField

func (m *DailyAssetPriceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DailyAssetPriceMutation) AddHigh

func (m *DailyAssetPriceMutation) AddHigh(f float64)

AddHigh adds f to the "high" field.

func (*DailyAssetPriceMutation) AddLow

func (m *DailyAssetPriceMutation) AddLow(f float64)

AddLow adds f to the "low" field.

func (*DailyAssetPriceMutation) AddOpen

func (m *DailyAssetPriceMutation) AddOpen(f float64)

AddOpen adds f to the "open" field.

func (*DailyAssetPriceMutation) AddedAdjustedClose

func (m *DailyAssetPriceMutation) AddedAdjustedClose() (r float64, exists bool)

AddedAdjustedClose returns the value that was added to the "adjusted_close" field in this mutation.

func (*DailyAssetPriceMutation) AddedClose

func (m *DailyAssetPriceMutation) AddedClose() (r float64, exists bool)

AddedClose returns the value that was added to the "close" field in this mutation.

func (*DailyAssetPriceMutation) AddedEdges

func (m *DailyAssetPriceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DailyAssetPriceMutation) AddedField

func (m *DailyAssetPriceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DailyAssetPriceMutation) AddedFields

func (m *DailyAssetPriceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DailyAssetPriceMutation) AddedHigh

func (m *DailyAssetPriceMutation) AddedHigh() (r float64, exists bool)

AddedHigh returns the value that was added to the "high" field in this mutation.

func (*DailyAssetPriceMutation) AddedIDs

func (m *DailyAssetPriceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DailyAssetPriceMutation) AddedLow

func (m *DailyAssetPriceMutation) AddedLow() (r float64, exists bool)

AddedLow returns the value that was added to the "low" field in this mutation.

func (*DailyAssetPriceMutation) AddedOpen

func (m *DailyAssetPriceMutation) AddedOpen() (r float64, exists bool)

AddedOpen returns the value that was added to the "open" field in this mutation.

func (*DailyAssetPriceMutation) AdjustedClose

func (m *DailyAssetPriceMutation) AdjustedClose() (r float64, exists bool)

AdjustedClose returns the value of the "adjusted_close" field in the mutation.

func (*DailyAssetPriceMutation) AssetCleared

func (m *DailyAssetPriceMutation) AssetCleared() bool

AssetCleared reports if the "asset" edge to the Asset entity was cleared.

func (*DailyAssetPriceMutation) AssetID

func (m *DailyAssetPriceMutation) AssetID() (r pulid.PULID, exists bool)

AssetID returns the value of the "asset_id" field in the mutation.

func (*DailyAssetPriceMutation) AssetIDs

func (m *DailyAssetPriceMutation) AssetIDs() (ids []pulid.PULID)

AssetIDs returns the "asset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AssetID instead. It exists only for internal usage by the builders.

func (*DailyAssetPriceMutation) ClearAsset

func (m *DailyAssetPriceMutation) ClearAsset()

ClearAsset clears the "asset" edge to the Asset entity.

func (*DailyAssetPriceMutation) ClearClose

func (m *DailyAssetPriceMutation) ClearClose()

ClearClose clears the value of the "close" field.

func (*DailyAssetPriceMutation) ClearDeletedAt

func (m *DailyAssetPriceMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*DailyAssetPriceMutation) ClearEdge

func (m *DailyAssetPriceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DailyAssetPriceMutation) ClearField

func (m *DailyAssetPriceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DailyAssetPriceMutation) ClearHigh

func (m *DailyAssetPriceMutation) ClearHigh()

ClearHigh clears the value of the "high" field.

func (*DailyAssetPriceMutation) ClearLow

func (m *DailyAssetPriceMutation) ClearLow()

ClearLow clears the value of the "low" field.

func (*DailyAssetPriceMutation) ClearOpen

func (m *DailyAssetPriceMutation) ClearOpen()

ClearOpen clears the value of the "open" field.

func (*DailyAssetPriceMutation) ClearedEdges

func (m *DailyAssetPriceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DailyAssetPriceMutation) ClearedFields

func (m *DailyAssetPriceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DailyAssetPriceMutation) Client

func (m DailyAssetPriceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DailyAssetPriceMutation) Close

func (m *DailyAssetPriceMutation) Close() (r float64, exists bool)

Close returns the value of the "close" field in the mutation.

func (*DailyAssetPriceMutation) CloseCleared

func (m *DailyAssetPriceMutation) CloseCleared() bool

CloseCleared returns if the "close" field was cleared in this mutation.

func (*DailyAssetPriceMutation) CreatedAt

func (m *DailyAssetPriceMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DailyAssetPriceMutation) DeletedAt

func (m *DailyAssetPriceMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*DailyAssetPriceMutation) DeletedAtCleared

func (m *DailyAssetPriceMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*DailyAssetPriceMutation) EdgeCleared

func (m *DailyAssetPriceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DailyAssetPriceMutation) Field

func (m *DailyAssetPriceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DailyAssetPriceMutation) FieldCleared

func (m *DailyAssetPriceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DailyAssetPriceMutation) Fields

func (m *DailyAssetPriceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DailyAssetPriceMutation) High

func (m *DailyAssetPriceMutation) High() (r float64, exists bool)

High returns the value of the "high" field in the mutation.

func (*DailyAssetPriceMutation) HighCleared

func (m *DailyAssetPriceMutation) HighCleared() bool

HighCleared returns if the "high" field was cleared in this mutation.

func (*DailyAssetPriceMutation) ID

func (m *DailyAssetPriceMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DailyAssetPriceMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DailyAssetPriceMutation) Low

func (m *DailyAssetPriceMutation) Low() (r float64, exists bool)

Low returns the value of the "low" field in the mutation.

func (*DailyAssetPriceMutation) LowCleared

func (m *DailyAssetPriceMutation) LowCleared() bool

LowCleared returns if the "low" field was cleared in this mutation.

func (*DailyAssetPriceMutation) OldAdjustedClose

func (m *DailyAssetPriceMutation) OldAdjustedClose(ctx context.Context) (v float64, err error)

OldAdjustedClose returns the old "adjusted_close" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldAssetID

func (m *DailyAssetPriceMutation) OldAssetID(ctx context.Context) (v pulid.PULID, err error)

OldAssetID returns the old "asset_id" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldClose

func (m *DailyAssetPriceMutation) OldClose(ctx context.Context) (v *float64, err error)

OldClose returns the old "close" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldCreatedAt

func (m *DailyAssetPriceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldDeletedAt

func (m *DailyAssetPriceMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldField

func (m *DailyAssetPriceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DailyAssetPriceMutation) OldHigh

func (m *DailyAssetPriceMutation) OldHigh(ctx context.Context) (v *float64, err error)

OldHigh returns the old "high" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldLow

func (m *DailyAssetPriceMutation) OldLow(ctx context.Context) (v *float64, err error)

OldLow returns the old "low" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldOpen

func (m *DailyAssetPriceMutation) OldOpen(ctx context.Context) (v *float64, err error)

OldOpen returns the old "open" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldTime

func (m *DailyAssetPriceMutation) OldTime(ctx context.Context) (v time.Time, err error)

OldTime returns the old "time" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) OldUpdatedAt

func (m *DailyAssetPriceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DailyAssetPrice entity. If the DailyAssetPrice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DailyAssetPriceMutation) Op

func (m *DailyAssetPriceMutation) Op() Op

Op returns the operation name.

func (*DailyAssetPriceMutation) Open

func (m *DailyAssetPriceMutation) Open() (r float64, exists bool)

Open returns the value of the "open" field in the mutation.

func (*DailyAssetPriceMutation) OpenCleared

func (m *DailyAssetPriceMutation) OpenCleared() bool

OpenCleared returns if the "open" field was cleared in this mutation.

func (*DailyAssetPriceMutation) RemovedEdges

func (m *DailyAssetPriceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DailyAssetPriceMutation) RemovedIDs

func (m *DailyAssetPriceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DailyAssetPriceMutation) ResetAdjustedClose

func (m *DailyAssetPriceMutation) ResetAdjustedClose()

ResetAdjustedClose resets all changes to the "adjusted_close" field.

func (*DailyAssetPriceMutation) ResetAsset

func (m *DailyAssetPriceMutation) ResetAsset()

ResetAsset resets all changes to the "asset" edge.

func (*DailyAssetPriceMutation) ResetAssetID

func (m *DailyAssetPriceMutation) ResetAssetID()

ResetAssetID resets all changes to the "asset_id" field.

func (*DailyAssetPriceMutation) ResetClose

func (m *DailyAssetPriceMutation) ResetClose()

ResetClose resets all changes to the "close" field.

func (*DailyAssetPriceMutation) ResetCreatedAt

func (m *DailyAssetPriceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DailyAssetPriceMutation) ResetDeletedAt

func (m *DailyAssetPriceMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*DailyAssetPriceMutation) ResetEdge

func (m *DailyAssetPriceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DailyAssetPriceMutation) ResetField

func (m *DailyAssetPriceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DailyAssetPriceMutation) ResetHigh

func (m *DailyAssetPriceMutation) ResetHigh()

ResetHigh resets all changes to the "high" field.

func (*DailyAssetPriceMutation) ResetLow

func (m *DailyAssetPriceMutation) ResetLow()

ResetLow resets all changes to the "low" field.

func (*DailyAssetPriceMutation) ResetOpen

func (m *DailyAssetPriceMutation) ResetOpen()

ResetOpen resets all changes to the "open" field.

func (*DailyAssetPriceMutation) ResetTime

func (m *DailyAssetPriceMutation) ResetTime()

ResetTime resets all changes to the "time" field.

func (*DailyAssetPriceMutation) ResetUpdatedAt

func (m *DailyAssetPriceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DailyAssetPriceMutation) SetAdjustedClose

func (m *DailyAssetPriceMutation) SetAdjustedClose(f float64)

SetAdjustedClose sets the "adjusted_close" field.

func (*DailyAssetPriceMutation) SetAssetID

func (m *DailyAssetPriceMutation) SetAssetID(pu pulid.PULID)

SetAssetID sets the "asset_id" field.

func (*DailyAssetPriceMutation) SetClose

func (m *DailyAssetPriceMutation) SetClose(f float64)

SetClose sets the "close" field.

func (*DailyAssetPriceMutation) SetCreatedAt

func (m *DailyAssetPriceMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DailyAssetPriceMutation) SetDeletedAt

func (m *DailyAssetPriceMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*DailyAssetPriceMutation) SetField

func (m *DailyAssetPriceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DailyAssetPriceMutation) SetHigh

func (m *DailyAssetPriceMutation) SetHigh(f float64)

SetHigh sets the "high" field.

func (*DailyAssetPriceMutation) SetID

func (m *DailyAssetPriceMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DailyAssetPrice entities.

func (*DailyAssetPriceMutation) SetLow

func (m *DailyAssetPriceMutation) SetLow(f float64)

SetLow sets the "low" field.

func (*DailyAssetPriceMutation) SetOpen

func (m *DailyAssetPriceMutation) SetOpen(f float64)

SetOpen sets the "open" field.

func (*DailyAssetPriceMutation) SetTime

func (m *DailyAssetPriceMutation) SetTime(t time.Time)

SetTime sets the "time" field.

func (*DailyAssetPriceMutation) SetUpdatedAt

func (m *DailyAssetPriceMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DailyAssetPriceMutation) Time

func (m *DailyAssetPriceMutation) Time() (r time.Time, exists bool)

Time returns the value of the "time" field in the mutation.

func (DailyAssetPriceMutation) Tx

func (m DailyAssetPriceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DailyAssetPriceMutation) Type

func (m *DailyAssetPriceMutation) Type() string

Type returns the node type of this mutation (DailyAssetPrice).

func (*DailyAssetPriceMutation) UpdatedAt

func (m *DailyAssetPriceMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DailyAssetPriceMutation) Where

Where appends a list predicates to the DailyAssetPriceMutation builder.

type DailyAssetPriceOrder

type DailyAssetPriceOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *DailyAssetPriceOrderField `json:"field"`
}

DailyAssetPriceOrder defines the ordering of DailyAssetPrice.

type DailyAssetPriceOrderField

type DailyAssetPriceOrderField struct {
	// contains filtered or unexported fields
}

DailyAssetPriceOrderField defines the ordering field of DailyAssetPrice.

func (DailyAssetPriceOrderField) MarshalGQL

func (f DailyAssetPriceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (DailyAssetPriceOrderField) String

func (f DailyAssetPriceOrderField) String() string

String implement fmt.Stringer interface.

func (*DailyAssetPriceOrderField) UnmarshalGQL

func (f *DailyAssetPriceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type DailyAssetPricePaginateOption

type DailyAssetPricePaginateOption func(*dailyassetpricePager) error

DailyAssetPricePaginateOption enables pagination customization.

func WithDailyAssetPriceFilter

func WithDailyAssetPriceFilter(filter func(*DailyAssetPriceQuery) (*DailyAssetPriceQuery, error)) DailyAssetPricePaginateOption

WithDailyAssetPriceFilter configures pagination filter.

func WithDailyAssetPriceOrder

func WithDailyAssetPriceOrder(order *DailyAssetPriceOrder) DailyAssetPricePaginateOption

WithDailyAssetPriceOrder configures pagination ordering.

type DailyAssetPriceQuery

type DailyAssetPriceQuery struct {
	// contains filtered or unexported fields
}

DailyAssetPriceQuery is the builder for querying DailyAssetPrice entities.

func (*DailyAssetPriceQuery) All

All executes the query and returns a list of DailyAssetPrices.

func (*DailyAssetPriceQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DailyAssetPriceQuery) Clone

Clone returns a duplicate of the DailyAssetPriceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DailyAssetPriceQuery) CollectFields

func (dap *DailyAssetPriceQuery) CollectFields(ctx context.Context, satisfies ...string) (*DailyAssetPriceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*DailyAssetPriceQuery) Count

func (dapq *DailyAssetPriceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DailyAssetPriceQuery) CountX

func (dapq *DailyAssetPriceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DailyAssetPriceQuery) Exist

func (dapq *DailyAssetPriceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DailyAssetPriceQuery) ExistX

func (dapq *DailyAssetPriceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DailyAssetPriceQuery) First

First returns the first DailyAssetPrice entity from the query. Returns a *NotFoundError when no DailyAssetPrice was found.

func (*DailyAssetPriceQuery) FirstID

func (dapq *DailyAssetPriceQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first DailyAssetPrice ID from the query. Returns a *NotFoundError when no DailyAssetPrice ID was found.

func (*DailyAssetPriceQuery) FirstIDX

func (dapq *DailyAssetPriceQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*DailyAssetPriceQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DailyAssetPriceQuery) GroupBy

func (dapq *DailyAssetPriceQuery) GroupBy(field string, fields ...string) *DailyAssetPriceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DailyAssetPrice.Query().
	GroupBy(dailyassetprice.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DailyAssetPriceQuery) IDs

func (dapq *DailyAssetPriceQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of DailyAssetPrice IDs.

func (*DailyAssetPriceQuery) IDsX

func (dapq *DailyAssetPriceQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*DailyAssetPriceQuery) Limit

func (dapq *DailyAssetPriceQuery) Limit(limit int) *DailyAssetPriceQuery

Limit adds a limit step to the query.

func (*DailyAssetPriceQuery) Offset

func (dapq *DailyAssetPriceQuery) Offset(offset int) *DailyAssetPriceQuery

Offset adds an offset step to the query.

func (*DailyAssetPriceQuery) Only

Only returns a single DailyAssetPrice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DailyAssetPrice entity is found. Returns a *NotFoundError when no DailyAssetPrice entities are found.

func (*DailyAssetPriceQuery) OnlyID

func (dapq *DailyAssetPriceQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only DailyAssetPrice ID in the query. Returns a *NotSingularError when more than one DailyAssetPrice ID is found. Returns a *NotFoundError when no entities are found.

func (*DailyAssetPriceQuery) OnlyIDX

func (dapq *DailyAssetPriceQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DailyAssetPriceQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DailyAssetPriceQuery) Order

Order adds an order step to the query.

func (*DailyAssetPriceQuery) Paginate

func (dap *DailyAssetPriceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DailyAssetPricePaginateOption,
) (*DailyAssetPriceConnection, error)

Paginate executes the query and returns a relay based cursor connection to DailyAssetPrice.

func (*DailyAssetPriceQuery) QueryAsset

func (dapq *DailyAssetPriceQuery) QueryAsset() *AssetQuery

QueryAsset chains the current query on the "asset" edge.

func (*DailyAssetPriceQuery) Select

func (dapq *DailyAssetPriceQuery) Select(fields ...string) *DailyAssetPriceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.DailyAssetPrice.Query().
	Select(dailyassetprice.FieldCreatedAt).
	Scan(ctx, &v)

func (*DailyAssetPriceQuery) Unique

func (dapq *DailyAssetPriceQuery) Unique(unique bool) *DailyAssetPriceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DailyAssetPriceQuery) Where

Where adds a new predicate for the DailyAssetPriceQuery builder.

func (*DailyAssetPriceQuery) WithAsset

func (dapq *DailyAssetPriceQuery) WithAsset(opts ...func(*AssetQuery)) *DailyAssetPriceQuery

WithAsset tells the query-builder to eager-load the nodes that are connected to the "asset" edge. The optional arguments are used to configure the query builder of the edge.

type DailyAssetPriceSelect

type DailyAssetPriceSelect struct {
	*DailyAssetPriceQuery
	// contains filtered or unexported fields
}

DailyAssetPriceSelect is the builder for selecting fields of DailyAssetPrice entities.

func (*DailyAssetPriceSelect) Bool

func (s *DailyAssetPriceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceSelect) BoolX

func (s *DailyAssetPriceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DailyAssetPriceSelect) Bools

func (s *DailyAssetPriceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceSelect) BoolsX

func (s *DailyAssetPriceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DailyAssetPriceSelect) Float64

func (s *DailyAssetPriceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceSelect) Float64X

func (s *DailyAssetPriceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DailyAssetPriceSelect) Float64s

func (s *DailyAssetPriceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceSelect) Float64sX

func (s *DailyAssetPriceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DailyAssetPriceSelect) Int

func (s *DailyAssetPriceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceSelect) IntX

func (s *DailyAssetPriceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DailyAssetPriceSelect) Ints

func (s *DailyAssetPriceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceSelect) IntsX

func (s *DailyAssetPriceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DailyAssetPriceSelect) Scan

func (daps *DailyAssetPriceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DailyAssetPriceSelect) ScanX

func (s *DailyAssetPriceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DailyAssetPriceSelect) String

func (s *DailyAssetPriceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceSelect) StringX

func (s *DailyAssetPriceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DailyAssetPriceSelect) Strings

func (s *DailyAssetPriceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DailyAssetPriceSelect) StringsX

func (s *DailyAssetPriceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DailyAssetPriceUpdate

type DailyAssetPriceUpdate struct {
	// contains filtered or unexported fields
}

DailyAssetPriceUpdate is the builder for updating DailyAssetPrice entities.

func (*DailyAssetPriceUpdate) AddAdjustedClose

func (dapu *DailyAssetPriceUpdate) AddAdjustedClose(f float64) *DailyAssetPriceUpdate

AddAdjustedClose adds f to the "adjusted_close" field.

func (*DailyAssetPriceUpdate) AddClose

AddClose adds f to the "close" field.

func (*DailyAssetPriceUpdate) AddHigh

AddHigh adds f to the "high" field.

func (*DailyAssetPriceUpdate) AddLow

AddLow adds f to the "low" field.

func (*DailyAssetPriceUpdate) AddOpen

AddOpen adds f to the "open" field.

func (*DailyAssetPriceUpdate) ClearAsset

func (dapu *DailyAssetPriceUpdate) ClearAsset() *DailyAssetPriceUpdate

ClearAsset clears the "asset" edge to the Asset entity.

func (*DailyAssetPriceUpdate) ClearClose

func (dapu *DailyAssetPriceUpdate) ClearClose() *DailyAssetPriceUpdate

ClearClose clears the value of the "close" field.

func (*DailyAssetPriceUpdate) ClearDeletedAt

func (dapu *DailyAssetPriceUpdate) ClearDeletedAt() *DailyAssetPriceUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*DailyAssetPriceUpdate) ClearHigh

func (dapu *DailyAssetPriceUpdate) ClearHigh() *DailyAssetPriceUpdate

ClearHigh clears the value of the "high" field.

func (*DailyAssetPriceUpdate) ClearLow

func (dapu *DailyAssetPriceUpdate) ClearLow() *DailyAssetPriceUpdate

ClearLow clears the value of the "low" field.

func (*DailyAssetPriceUpdate) ClearOpen

func (dapu *DailyAssetPriceUpdate) ClearOpen() *DailyAssetPriceUpdate

ClearOpen clears the value of the "open" field.

func (*DailyAssetPriceUpdate) Exec

func (dapu *DailyAssetPriceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DailyAssetPriceUpdate) ExecX

func (dapu *DailyAssetPriceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DailyAssetPriceUpdate) Mutation

Mutation returns the DailyAssetPriceMutation object of the builder.

func (*DailyAssetPriceUpdate) Save

func (dapu *DailyAssetPriceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DailyAssetPriceUpdate) SaveX

func (dapu *DailyAssetPriceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DailyAssetPriceUpdate) SetAdjustedClose

func (dapu *DailyAssetPriceUpdate) SetAdjustedClose(f float64) *DailyAssetPriceUpdate

SetAdjustedClose sets the "adjusted_close" field.

func (*DailyAssetPriceUpdate) SetAsset

SetAsset sets the "asset" edge to the Asset entity.

func (*DailyAssetPriceUpdate) SetAssetID

SetAssetID sets the "asset_id" field.

func (*DailyAssetPriceUpdate) SetClose

SetClose sets the "close" field.

func (*DailyAssetPriceUpdate) SetDeletedAt

func (dapu *DailyAssetPriceUpdate) SetDeletedAt(t time.Time) *DailyAssetPriceUpdate

SetDeletedAt sets the "deleted_at" field.

func (*DailyAssetPriceUpdate) SetHigh

SetHigh sets the "high" field.

func (*DailyAssetPriceUpdate) SetInput

SetInput applies the change-set in the UpdateDailyAssetPriceInput on the DailyAssetPriceUpdate builder.

func (*DailyAssetPriceUpdate) SetLow

SetLow sets the "low" field.

func (*DailyAssetPriceUpdate) SetNillableClose

func (dapu *DailyAssetPriceUpdate) SetNillableClose(f *float64) *DailyAssetPriceUpdate

SetNillableClose sets the "close" field if the given value is not nil.

func (*DailyAssetPriceUpdate) SetNillableHigh

func (dapu *DailyAssetPriceUpdate) SetNillableHigh(f *float64) *DailyAssetPriceUpdate

SetNillableHigh sets the "high" field if the given value is not nil.

func (*DailyAssetPriceUpdate) SetNillableLow

func (dapu *DailyAssetPriceUpdate) SetNillableLow(f *float64) *DailyAssetPriceUpdate

SetNillableLow sets the "low" field if the given value is not nil.

func (*DailyAssetPriceUpdate) SetNillableOpen

func (dapu *DailyAssetPriceUpdate) SetNillableOpen(f *float64) *DailyAssetPriceUpdate

SetNillableOpen sets the "open" field if the given value is not nil.

func (*DailyAssetPriceUpdate) SetOpen

SetOpen sets the "open" field.

func (*DailyAssetPriceUpdate) SetTime

SetTime sets the "time" field.

func (*DailyAssetPriceUpdate) SetUpdatedAt

func (dapu *DailyAssetPriceUpdate) SetUpdatedAt(t time.Time) *DailyAssetPriceUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DailyAssetPriceUpdate) Where

Where appends a list predicates to the DailyAssetPriceUpdate builder.

type DailyAssetPriceUpdateOne

type DailyAssetPriceUpdateOne struct {
	// contains filtered or unexported fields
}

DailyAssetPriceUpdateOne is the builder for updating a single DailyAssetPrice entity.

func (*DailyAssetPriceUpdateOne) AddAdjustedClose

func (dapuo *DailyAssetPriceUpdateOne) AddAdjustedClose(f float64) *DailyAssetPriceUpdateOne

AddAdjustedClose adds f to the "adjusted_close" field.

func (*DailyAssetPriceUpdateOne) AddClose

AddClose adds f to the "close" field.

func (*DailyAssetPriceUpdateOne) AddHigh

AddHigh adds f to the "high" field.

func (*DailyAssetPriceUpdateOne) AddLow

AddLow adds f to the "low" field.

func (*DailyAssetPriceUpdateOne) AddOpen

AddOpen adds f to the "open" field.

func (*DailyAssetPriceUpdateOne) ClearAsset

ClearAsset clears the "asset" edge to the Asset entity.

func (*DailyAssetPriceUpdateOne) ClearClose

ClearClose clears the value of the "close" field.

func (*DailyAssetPriceUpdateOne) ClearDeletedAt

func (dapuo *DailyAssetPriceUpdateOne) ClearDeletedAt() *DailyAssetPriceUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*DailyAssetPriceUpdateOne) ClearHigh

ClearHigh clears the value of the "high" field.

func (*DailyAssetPriceUpdateOne) ClearLow

ClearLow clears the value of the "low" field.

func (*DailyAssetPriceUpdateOne) ClearOpen

ClearOpen clears the value of the "open" field.

func (*DailyAssetPriceUpdateOne) Exec

func (dapuo *DailyAssetPriceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DailyAssetPriceUpdateOne) ExecX

func (dapuo *DailyAssetPriceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DailyAssetPriceUpdateOne) Mutation

Mutation returns the DailyAssetPriceMutation object of the builder.

func (*DailyAssetPriceUpdateOne) Save

Save executes the query and returns the updated DailyAssetPrice entity.

func (*DailyAssetPriceUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DailyAssetPriceUpdateOne) Select

func (dapuo *DailyAssetPriceUpdateOne) Select(field string, fields ...string) *DailyAssetPriceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DailyAssetPriceUpdateOne) SetAdjustedClose

func (dapuo *DailyAssetPriceUpdateOne) SetAdjustedClose(f float64) *DailyAssetPriceUpdateOne

SetAdjustedClose sets the "adjusted_close" field.

func (*DailyAssetPriceUpdateOne) SetAsset

SetAsset sets the "asset" edge to the Asset entity.

func (*DailyAssetPriceUpdateOne) SetAssetID

SetAssetID sets the "asset_id" field.

func (*DailyAssetPriceUpdateOne) SetClose

SetClose sets the "close" field.

func (*DailyAssetPriceUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*DailyAssetPriceUpdateOne) SetHigh

SetHigh sets the "high" field.

func (*DailyAssetPriceUpdateOne) SetInput

SetInput applies the change-set in the UpdateDailyAssetPriceInput on the DailyAssetPriceUpdateOne builder.

func (*DailyAssetPriceUpdateOne) SetLow

SetLow sets the "low" field.

func (*DailyAssetPriceUpdateOne) SetNillableClose

func (dapuo *DailyAssetPriceUpdateOne) SetNillableClose(f *float64) *DailyAssetPriceUpdateOne

SetNillableClose sets the "close" field if the given value is not nil.

func (*DailyAssetPriceUpdateOne) SetNillableHigh

func (dapuo *DailyAssetPriceUpdateOne) SetNillableHigh(f *float64) *DailyAssetPriceUpdateOne

SetNillableHigh sets the "high" field if the given value is not nil.

func (*DailyAssetPriceUpdateOne) SetNillableLow

func (dapuo *DailyAssetPriceUpdateOne) SetNillableLow(f *float64) *DailyAssetPriceUpdateOne

SetNillableLow sets the "low" field if the given value is not nil.

func (*DailyAssetPriceUpdateOne) SetNillableOpen

func (dapuo *DailyAssetPriceUpdateOne) SetNillableOpen(f *float64) *DailyAssetPriceUpdateOne

SetNillableOpen sets the "open" field if the given value is not nil.

func (*DailyAssetPriceUpdateOne) SetOpen

SetOpen sets the "open" field.

func (*DailyAssetPriceUpdateOne) SetTime

SetTime sets the "time" field.

func (*DailyAssetPriceUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type DailyAssetPriceWhereInput

type DailyAssetPriceWhereInput struct {
	Predicates []predicate.DailyAssetPrice  `json:"-"`
	Not        *DailyAssetPriceWhereInput   `json:"not,omitempty"`
	Or         []*DailyAssetPriceWhereInput `json:"or,omitempty"`
	And        []*DailyAssetPriceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "time" field predicates.
	Time      *time.Time  `json:"time,omitempty"`
	TimeNEQ   *time.Time  `json:"timeNEQ,omitempty"`
	TimeIn    []time.Time `json:"timeIn,omitempty"`
	TimeNotIn []time.Time `json:"timeNotIn,omitempty"`
	TimeGT    *time.Time  `json:"timeGT,omitempty"`
	TimeGTE   *time.Time  `json:"timeGTE,omitempty"`
	TimeLT    *time.Time  `json:"timeLT,omitempty"`
	TimeLTE   *time.Time  `json:"timeLTE,omitempty"`

	// "open" field predicates.
	Open       *float64  `json:"open,omitempty"`
	OpenNEQ    *float64  `json:"openNEQ,omitempty"`
	OpenIn     []float64 `json:"openIn,omitempty"`
	OpenNotIn  []float64 `json:"openNotIn,omitempty"`
	OpenGT     *float64  `json:"openGT,omitempty"`
	OpenGTE    *float64  `json:"openGTE,omitempty"`
	OpenLT     *float64  `json:"openLT,omitempty"`
	OpenLTE    *float64  `json:"openLTE,omitempty"`
	OpenIsNil  bool      `json:"openIsNil,omitempty"`
	OpenNotNil bool      `json:"openNotNil,omitempty"`

	// "high" field predicates.
	High       *float64  `json:"high,omitempty"`
	HighNEQ    *float64  `json:"highNEQ,omitempty"`
	HighIn     []float64 `json:"highIn,omitempty"`
	HighNotIn  []float64 `json:"highNotIn,omitempty"`
	HighGT     *float64  `json:"highGT,omitempty"`
	HighGTE    *float64  `json:"highGTE,omitempty"`
	HighLT     *float64  `json:"highLT,omitempty"`
	HighLTE    *float64  `json:"highLTE,omitempty"`
	HighIsNil  bool      `json:"highIsNil,omitempty"`
	HighNotNil bool      `json:"highNotNil,omitempty"`

	// "low" field predicates.
	Low       *float64  `json:"low,omitempty"`
	LowNEQ    *float64  `json:"lowNEQ,omitempty"`
	LowIn     []float64 `json:"lowIn,omitempty"`
	LowNotIn  []float64 `json:"lowNotIn,omitempty"`
	LowGT     *float64  `json:"lowGT,omitempty"`
	LowGTE    *float64  `json:"lowGTE,omitempty"`
	LowLT     *float64  `json:"lowLT,omitempty"`
	LowLTE    *float64  `json:"lowLTE,omitempty"`
	LowIsNil  bool      `json:"lowIsNil,omitempty"`
	LowNotNil bool      `json:"lowNotNil,omitempty"`

	// "close" field predicates.
	Close       *float64  `json:"close,omitempty"`
	CloseNEQ    *float64  `json:"closeNEQ,omitempty"`
	CloseIn     []float64 `json:"closeIn,omitempty"`
	CloseNotIn  []float64 `json:"closeNotIn,omitempty"`
	CloseGT     *float64  `json:"closeGT,omitempty"`
	CloseGTE    *float64  `json:"closeGTE,omitempty"`
	CloseLT     *float64  `json:"closeLT,omitempty"`
	CloseLTE    *float64  `json:"closeLTE,omitempty"`
	CloseIsNil  bool      `json:"closeIsNil,omitempty"`
	CloseNotNil bool      `json:"closeNotNil,omitempty"`

	// "adjusted_close" field predicates.
	AdjustedClose      *float64  `json:"adjustedClose,omitempty"`
	AdjustedCloseNEQ   *float64  `json:"adjustedCloseNEQ,omitempty"`
	AdjustedCloseIn    []float64 `json:"adjustedCloseIn,omitempty"`
	AdjustedCloseNotIn []float64 `json:"adjustedCloseNotIn,omitempty"`
	AdjustedCloseGT    *float64  `json:"adjustedCloseGT,omitempty"`
	AdjustedCloseGTE   *float64  `json:"adjustedCloseGTE,omitempty"`
	AdjustedCloseLT    *float64  `json:"adjustedCloseLT,omitempty"`
	AdjustedCloseLTE   *float64  `json:"adjustedCloseLTE,omitempty"`

	// "asset_id" field predicates.
	AssetID             *pulid.PULID  `json:"assetID,omitempty"`
	AssetIDNEQ          *pulid.PULID  `json:"assetIDNEQ,omitempty"`
	AssetIDIn           []pulid.PULID `json:"assetIDIn,omitempty"`
	AssetIDNotIn        []pulid.PULID `json:"assetIDNotIn,omitempty"`
	AssetIDGT           *pulid.PULID  `json:"assetIDGT,omitempty"`
	AssetIDGTE          *pulid.PULID  `json:"assetIDGTE,omitempty"`
	AssetIDLT           *pulid.PULID  `json:"assetIDLT,omitempty"`
	AssetIDLTE          *pulid.PULID  `json:"assetIDLTE,omitempty"`
	AssetIDContains     *pulid.PULID  `json:"assetIDContains,omitempty"`
	AssetIDHasPrefix    *pulid.PULID  `json:"assetIDHasPrefix,omitempty"`
	AssetIDHasSuffix    *pulid.PULID  `json:"assetIDHasSuffix,omitempty"`
	AssetIDEqualFold    *pulid.PULID  `json:"assetIDEqualFold,omitempty"`
	AssetIDContainsFold *pulid.PULID  `json:"assetIDContainsFold,omitempty"`

	// "asset" edge predicates.
	HasAsset     *bool              `json:"hasAsset,omitempty"`
	HasAssetWith []*AssetWhereInput `json:"hasAssetWith,omitempty"`
}

DailyAssetPriceWhereInput represents a where input for filtering DailyAssetPrice queries.

func (*DailyAssetPriceWhereInput) AddPredicates

func (i *DailyAssetPriceWhereInput) AddPredicates(predicates ...predicate.DailyAssetPrice)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*DailyAssetPriceWhereInput) Filter

Filter applies the DailyAssetPriceWhereInput filter on the DailyAssetPriceQuery builder.

func (*DailyAssetPriceWhereInput) P

P returns a predicate for filtering dailyassetprices. An error is returned if the input is empty or invalid.

type DailyAssetPrices

type DailyAssetPrices []*DailyAssetPrice

DailyAssetPrices is a parsable slice of DailyAssetPrice.

type Edge

type Edge struct {
	Type string        `json:"type,omitempty"` // edge type.
	Name string        `json:"name,omitempty"` // edge name.
	IDs  []pulid.PULID `json:"ids,omitempty"`  // node ids (where this edge point to).
}

Edges between two nodes.

type Exchange

type Exchange struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Icon holds the value of the "icon" field.
	Icon *string `json:"icon,omitempty"`
	// A url to the exchange site.
	URL *string `json:"url,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ExchangeQuery when eager-loading is set.
	Edges ExchangeEdges `json:"edges"`
	// contains filtered or unexported fields
}

Exchange is the model entity for the Exchange schema.

func (*Exchange) NamedTransactions

func (e *Exchange) NamedTransactions(name string) ([]*Transaction, error)

NamedTransactions returns the Transactions named value or an error if the edge was not loaded in eager-loading with this name.

func (*Exchange) Node

func (e *Exchange) Node(ctx context.Context) (node *Node, err error)

func (*Exchange) QueryTransactions

func (e *Exchange) QueryTransactions() *TransactionQuery

QueryTransactions queries the "transactions" edge of the Exchange entity.

func (*Exchange) String

func (e *Exchange) String() string

String implements the fmt.Stringer.

func (*Exchange) ToEdge

func (e *Exchange) ToEdge(order *ExchangeOrder) *ExchangeEdge

ToEdge converts Exchange into ExchangeEdge.

func (*Exchange) Transactions

func (e *Exchange) Transactions(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *TransactionOrder, where *TransactionWhereInput,
) (*TransactionConnection, error)

func (*Exchange) Unwrap

func (e *Exchange) Unwrap() *Exchange

Unwrap unwraps the Exchange entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Exchange) Update

func (e *Exchange) Update() *ExchangeUpdateOne

Update returns a builder for updating this Exchange. Note that you need to call Exchange.Unwrap() before calling this method if this Exchange was returned from a transaction, and the transaction was committed or rolled back.

type ExchangeClient

type ExchangeClient struct {
	// contains filtered or unexported fields
}

ExchangeClient is a client for the Exchange schema.

func NewExchangeClient

func NewExchangeClient(c config) *ExchangeClient

NewExchangeClient returns a client for the Exchange from the given config.

func (*ExchangeClient) Create

func (c *ExchangeClient) Create() *ExchangeCreate

Create returns a builder for creating a Exchange entity.

func (*ExchangeClient) CreateBulk

func (c *ExchangeClient) CreateBulk(builders ...*ExchangeCreate) *ExchangeCreateBulk

CreateBulk returns a builder for creating a bulk of Exchange entities.

func (*ExchangeClient) Delete

func (c *ExchangeClient) Delete() *ExchangeDelete

Delete returns a delete builder for Exchange.

func (*ExchangeClient) DeleteOne

func (c *ExchangeClient) DeleteOne(e *Exchange) *ExchangeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ExchangeClient) DeleteOneID

func (c *ExchangeClient) DeleteOneID(id pulid.PULID) *ExchangeDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*ExchangeClient) Get

func (c *ExchangeClient) Get(ctx context.Context, id pulid.PULID) (*Exchange, error)

Get returns a Exchange entity by its id.

func (*ExchangeClient) GetX

func (c *ExchangeClient) GetX(ctx context.Context, id pulid.PULID) *Exchange

GetX is like Get, but panics if an error occurs.

func (*ExchangeClient) Hooks

func (c *ExchangeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ExchangeClient) Query

func (c *ExchangeClient) Query() *ExchangeQuery

Query returns a query builder for Exchange.

func (*ExchangeClient) QueryTransactions

func (c *ExchangeClient) QueryTransactions(e *Exchange) *TransactionQuery

QueryTransactions queries the transactions edge of a Exchange.

func (*ExchangeClient) Update

func (c *ExchangeClient) Update() *ExchangeUpdate

Update returns an update builder for Exchange.

func (*ExchangeClient) UpdateOne

func (c *ExchangeClient) UpdateOne(e *Exchange) *ExchangeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ExchangeClient) UpdateOneID

func (c *ExchangeClient) UpdateOneID(id pulid.PULID) *ExchangeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ExchangeClient) Use

func (c *ExchangeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `exchange.Hooks(f(g(h())))`.

type ExchangeConnection

type ExchangeConnection struct {
	Edges      []*ExchangeEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

ExchangeConnection is the connection containing edges to Exchange.

type ExchangeCreate

type ExchangeCreate struct {
	// contains filtered or unexported fields
}

ExchangeCreate is the builder for creating a Exchange entity.

func (*ExchangeCreate) AddTransactionIDs

func (ec *ExchangeCreate) AddTransactionIDs(ids ...pulid.PULID) *ExchangeCreate

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*ExchangeCreate) AddTransactions

func (ec *ExchangeCreate) AddTransactions(t ...*Transaction) *ExchangeCreate

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*ExchangeCreate) Exec

func (ec *ExchangeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ExchangeCreate) ExecX

func (ec *ExchangeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExchangeCreate) Mutation

func (ec *ExchangeCreate) Mutation() *ExchangeMutation

Mutation returns the ExchangeMutation object of the builder.

func (*ExchangeCreate) Save

func (ec *ExchangeCreate) Save(ctx context.Context) (*Exchange, error)

Save creates the Exchange in the database.

func (*ExchangeCreate) SaveX

func (ec *ExchangeCreate) SaveX(ctx context.Context) *Exchange

SaveX calls Save and panics if Save returns an error.

func (*ExchangeCreate) SetCreatedAt

func (ec *ExchangeCreate) SetCreatedAt(t time.Time) *ExchangeCreate

SetCreatedAt sets the "created_at" field.

func (*ExchangeCreate) SetDeletedAt

func (ec *ExchangeCreate) SetDeletedAt(t time.Time) *ExchangeCreate

SetDeletedAt sets the "deleted_at" field.

func (*ExchangeCreate) SetID

func (ec *ExchangeCreate) SetID(pu pulid.PULID) *ExchangeCreate

SetID sets the "id" field.

func (*ExchangeCreate) SetIcon

func (ec *ExchangeCreate) SetIcon(s string) *ExchangeCreate

SetIcon sets the "icon" field.

func (*ExchangeCreate) SetInput

SetInput applies the change-set in the CreateExchangeInput on the ExchangeCreate builder.

func (*ExchangeCreate) SetName

func (ec *ExchangeCreate) SetName(s string) *ExchangeCreate

SetName sets the "name" field.

func (*ExchangeCreate) SetNillableCreatedAt

func (ec *ExchangeCreate) SetNillableCreatedAt(t *time.Time) *ExchangeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ExchangeCreate) SetNillableDeletedAt

func (ec *ExchangeCreate) SetNillableDeletedAt(t *time.Time) *ExchangeCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*ExchangeCreate) SetNillableID

func (ec *ExchangeCreate) SetNillableID(pu *pulid.PULID) *ExchangeCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ExchangeCreate) SetNillableIcon

func (ec *ExchangeCreate) SetNillableIcon(s *string) *ExchangeCreate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*ExchangeCreate) SetNillableURL

func (ec *ExchangeCreate) SetNillableURL(s *string) *ExchangeCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*ExchangeCreate) SetNillableUpdatedAt

func (ec *ExchangeCreate) SetNillableUpdatedAt(t *time.Time) *ExchangeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ExchangeCreate) SetURL

func (ec *ExchangeCreate) SetURL(s string) *ExchangeCreate

SetURL sets the "url" field.

func (*ExchangeCreate) SetUpdatedAt

func (ec *ExchangeCreate) SetUpdatedAt(t time.Time) *ExchangeCreate

SetUpdatedAt sets the "updated_at" field.

type ExchangeCreateBulk

type ExchangeCreateBulk struct {
	// contains filtered or unexported fields
}

ExchangeCreateBulk is the builder for creating many Exchange entities in bulk.

func (*ExchangeCreateBulk) Exec

func (ecb *ExchangeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ExchangeCreateBulk) ExecX

func (ecb *ExchangeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExchangeCreateBulk) Save

func (ecb *ExchangeCreateBulk) Save(ctx context.Context) ([]*Exchange, error)

Save creates the Exchange entities in the database.

func (*ExchangeCreateBulk) SaveX

func (ecb *ExchangeCreateBulk) SaveX(ctx context.Context) []*Exchange

SaveX is like Save, but panics if an error occurs.

type ExchangeDelete

type ExchangeDelete struct {
	// contains filtered or unexported fields
}

ExchangeDelete is the builder for deleting a Exchange entity.

func (*ExchangeDelete) Exec

func (ed *ExchangeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ExchangeDelete) ExecX

func (ed *ExchangeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ExchangeDelete) Where

func (ed *ExchangeDelete) Where(ps ...predicate.Exchange) *ExchangeDelete

Where appends a list predicates to the ExchangeDelete builder.

type ExchangeDeleteOne

type ExchangeDeleteOne struct {
	// contains filtered or unexported fields
}

ExchangeDeleteOne is the builder for deleting a single Exchange entity.

func (*ExchangeDeleteOne) Exec

func (edo *ExchangeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ExchangeDeleteOne) ExecX

func (edo *ExchangeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ExchangeEdge

type ExchangeEdge struct {
	Node   *Exchange `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

ExchangeEdge is the edge representation of Exchange.

type ExchangeEdges

type ExchangeEdges struct {
	// Transactions holds the value of the transactions edge.
	Transactions []*Transaction `json:"transactions,omitempty"`
	// contains filtered or unexported fields
}

ExchangeEdges holds the relations/edges for other nodes in the graph.

func (ExchangeEdges) TransactionsOrErr

func (e ExchangeEdges) TransactionsOrErr() ([]*Transaction, error)

TransactionsOrErr returns the Transactions value or an error if the edge was not loaded in eager-loading.

type ExchangeGroupBy

type ExchangeGroupBy struct {
	// contains filtered or unexported fields
}

ExchangeGroupBy is the group-by builder for Exchange entities.

func (*ExchangeGroupBy) Aggregate

func (egb *ExchangeGroupBy) Aggregate(fns ...AggregateFunc) *ExchangeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ExchangeGroupBy) Bool

func (s *ExchangeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ExchangeGroupBy) BoolX

func (s *ExchangeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ExchangeGroupBy) Bools

func (s *ExchangeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ExchangeGroupBy) BoolsX

func (s *ExchangeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ExchangeGroupBy) Float64

func (s *ExchangeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ExchangeGroupBy) Float64X

func (s *ExchangeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ExchangeGroupBy) Float64s

func (s *ExchangeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ExchangeGroupBy) Float64sX

func (s *ExchangeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ExchangeGroupBy) Int

func (s *ExchangeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ExchangeGroupBy) IntX

func (s *ExchangeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ExchangeGroupBy) Ints

func (s *ExchangeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ExchangeGroupBy) IntsX

func (s *ExchangeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ExchangeGroupBy) Scan

func (egb *ExchangeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*ExchangeGroupBy) ScanX

func (s *ExchangeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ExchangeGroupBy) String

func (s *ExchangeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ExchangeGroupBy) StringX

func (s *ExchangeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ExchangeGroupBy) Strings

func (s *ExchangeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ExchangeGroupBy) StringsX

func (s *ExchangeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ExchangeMutation

type ExchangeMutation struct {
	// contains filtered or unexported fields
}

ExchangeMutation represents an operation that mutates the Exchange nodes in the graph.

func (*ExchangeMutation) AddField

func (m *ExchangeMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ExchangeMutation) AddTransactionIDs

func (m *ExchangeMutation) AddTransactionIDs(ids ...pulid.PULID)

AddTransactionIDs adds the "transactions" edge to the Transaction entity by ids.

func (*ExchangeMutation) AddedEdges

func (m *ExchangeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ExchangeMutation) AddedField

func (m *ExchangeMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ExchangeMutation) AddedFields

func (m *ExchangeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ExchangeMutation) AddedIDs

func (m *ExchangeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ExchangeMutation) ClearDeletedAt

func (m *ExchangeMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ExchangeMutation) ClearEdge

func (m *ExchangeMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ExchangeMutation) ClearField

func (m *ExchangeMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ExchangeMutation) ClearIcon

func (m *ExchangeMutation) ClearIcon()

ClearIcon clears the value of the "icon" field.

func (*ExchangeMutation) ClearTransactions

func (m *ExchangeMutation) ClearTransactions()

ClearTransactions clears the "transactions" edge to the Transaction entity.

func (*ExchangeMutation) ClearURL

func (m *ExchangeMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*ExchangeMutation) ClearedEdges

func (m *ExchangeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ExchangeMutation) ClearedFields

func (m *ExchangeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ExchangeMutation) Client

func (m ExchangeMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ExchangeMutation) CreatedAt

func (m *ExchangeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ExchangeMutation) DeletedAt

func (m *ExchangeMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*ExchangeMutation) DeletedAtCleared

func (m *ExchangeMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*ExchangeMutation) EdgeCleared

func (m *ExchangeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ExchangeMutation) Field

func (m *ExchangeMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ExchangeMutation) FieldCleared

func (m *ExchangeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ExchangeMutation) Fields

func (m *ExchangeMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ExchangeMutation) ID

func (m *ExchangeMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ExchangeMutation) IDs

func (m *ExchangeMutation) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ExchangeMutation) Icon

func (m *ExchangeMutation) Icon() (r string, exists bool)

Icon returns the value of the "icon" field in the mutation.

func (*ExchangeMutation) IconCleared

func (m *ExchangeMutation) IconCleared() bool

IconCleared returns if the "icon" field was cleared in this mutation.

func (*ExchangeMutation) Name

func (m *ExchangeMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ExchangeMutation) OldCreatedAt

func (m *ExchangeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Exchange entity. If the Exchange object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ExchangeMutation) OldDeletedAt

func (m *ExchangeMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Exchange entity. If the Exchange object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ExchangeMutation) OldField

func (m *ExchangeMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ExchangeMutation) OldIcon

func (m *ExchangeMutation) OldIcon(ctx context.Context) (v *string, err error)

OldIcon returns the old "icon" field's value of the Exchange entity. If the Exchange object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ExchangeMutation) OldName

func (m *ExchangeMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Exchange entity. If the Exchange object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ExchangeMutation) OldURL

func (m *ExchangeMutation) OldURL(ctx context.Context) (v *string, err error)

OldURL returns the old "url" field's value of the Exchange entity. If the Exchange object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ExchangeMutation) OldUpdatedAt

func (m *ExchangeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Exchange entity. If the Exchange object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ExchangeMutation) Op

func (m *ExchangeMutation) Op() Op

Op returns the operation name.

func (*ExchangeMutation) RemoveTransactionIDs

func (m *ExchangeMutation) RemoveTransactionIDs(ids ...pulid.PULID)

RemoveTransactionIDs removes the "transactions" edge to the Transaction entity by IDs.

func (*ExchangeMutation) RemovedEdges

func (m *ExchangeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ExchangeMutation) RemovedIDs

func (m *ExchangeMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ExchangeMutation) RemovedTransactionsIDs

func (m *ExchangeMutation) RemovedTransactionsIDs() (ids []pulid.PULID)

RemovedTransactions returns the removed IDs of the "transactions" edge to the Transaction entity.

func (*ExchangeMutation) ResetCreatedAt

func (m *ExchangeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ExchangeMutation) ResetDeletedAt

func (m *ExchangeMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*ExchangeMutation) ResetEdge

func (m *ExchangeMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ExchangeMutation) ResetField

func (m *ExchangeMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ExchangeMutation) ResetIcon

func (m *ExchangeMutation) ResetIcon()

ResetIcon resets all changes to the "icon" field.

func (*ExchangeMutation) ResetName

func (m *ExchangeMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ExchangeMutation) ResetTransactions

func (m *ExchangeMutation) ResetTransactions()

ResetTransactions resets all changes to the "transactions" edge.

func (*ExchangeMutation) ResetURL

func (m *ExchangeMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*ExchangeMutation) ResetUpdatedAt

func (m *ExchangeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ExchangeMutation) SetCreatedAt

func (m *ExchangeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ExchangeMutation) SetDeletedAt

func (m *ExchangeMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*ExchangeMutation) SetField

func (m *ExchangeMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ExchangeMutation) SetID

func (m *ExchangeMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Exchange entities.

func (*ExchangeMutation) SetIcon

func (m *ExchangeMutation) SetIcon(s string)

SetIcon sets the "icon" field.

func (*ExchangeMutation) SetName

func (m *ExchangeMutation) SetName(s string)

SetName sets the "name" field.

func (*ExchangeMutation) SetURL

func (m *ExchangeMutation) SetURL(s string)

SetURL sets the "url" field.

func (*ExchangeMutation) SetUpdatedAt

func (m *ExchangeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ExchangeMutation) TransactionsCleared

func (m *ExchangeMutation) TransactionsCleared() bool

TransactionsCleared reports if the "transactions" edge to the Transaction entity was cleared.

func (*ExchangeMutation) TransactionsIDs

func (m *ExchangeMutation) TransactionsIDs() (ids []pulid.PULID)

TransactionsIDs returns the "transactions" edge IDs in the mutation.

func (ExchangeMutation) Tx

func (m ExchangeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ExchangeMutation) Type

func (m *ExchangeMutation) Type() string

Type returns the node type of this mutation (Exchange).

func (*ExchangeMutation) URL

func (m *ExchangeMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*ExchangeMutation) URLCleared

func (m *ExchangeMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*ExchangeMutation) UpdatedAt

func (m *ExchangeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ExchangeMutation) Where

func (m *ExchangeMutation) Where(ps ...predicate.Exchange)

Where appends a list predicates to the ExchangeMutation builder.

type ExchangeOrder

type ExchangeOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *ExchangeOrderField `json:"field"`
}

ExchangeOrder defines the ordering of Exchange.

type ExchangeOrderField

type ExchangeOrderField struct {
	// contains filtered or unexported fields
}

ExchangeOrderField defines the ordering field of Exchange.

func (ExchangeOrderField) MarshalGQL

func (f ExchangeOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ExchangeOrderField) String

func (f ExchangeOrderField) String() string

String implement fmt.Stringer interface.

func (*ExchangeOrderField) UnmarshalGQL

func (f *ExchangeOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ExchangePaginateOption

type ExchangePaginateOption func(*exchangePager) error

ExchangePaginateOption enables pagination customization.

func WithExchangeFilter

func WithExchangeFilter(filter func(*ExchangeQuery) (*ExchangeQuery, error)) ExchangePaginateOption

WithExchangeFilter configures pagination filter.

func WithExchangeOrder

func WithExchangeOrder(order *ExchangeOrder) ExchangePaginateOption

WithExchangeOrder configures pagination ordering.

type ExchangeQuery

type ExchangeQuery struct {
	// contains filtered or unexported fields
}

ExchangeQuery is the builder for querying Exchange entities.

func (*ExchangeQuery) All

func (eq *ExchangeQuery) All(ctx context.Context) ([]*Exchange, error)

All executes the query and returns a list of Exchanges.

func (*ExchangeQuery) AllX

func (eq *ExchangeQuery) AllX(ctx context.Context) []*Exchange

AllX is like All, but panics if an error occurs.

func (*ExchangeQuery) Clone

func (eq *ExchangeQuery) Clone() *ExchangeQuery

Clone returns a duplicate of the ExchangeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ExchangeQuery) CollectFields

func (e *ExchangeQuery) CollectFields(ctx context.Context, satisfies ...string) (*ExchangeQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ExchangeQuery) Count

func (eq *ExchangeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ExchangeQuery) CountX

func (eq *ExchangeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ExchangeQuery) Exist

func (eq *ExchangeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ExchangeQuery) ExistX

func (eq *ExchangeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ExchangeQuery) First

func (eq *ExchangeQuery) First(ctx context.Context) (*Exchange, error)

First returns the first Exchange entity from the query. Returns a *NotFoundError when no Exchange was found.

func (*ExchangeQuery) FirstID

func (eq *ExchangeQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Exchange ID from the query. Returns a *NotFoundError when no Exchange ID was found.

func (*ExchangeQuery) FirstIDX

func (eq *ExchangeQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ExchangeQuery) FirstX

func (eq *ExchangeQuery) FirstX(ctx context.Context) *Exchange

FirstX is like First, but panics if an error occurs.

func (*ExchangeQuery) GroupBy

func (eq *ExchangeQuery) GroupBy(field string, fields ...string) *ExchangeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Exchange.Query().
	GroupBy(exchange.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ExchangeQuery) IDs

func (eq *ExchangeQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Exchange IDs.

func (*ExchangeQuery) IDsX

func (eq *ExchangeQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*ExchangeQuery) Limit

func (eq *ExchangeQuery) Limit(limit int) *ExchangeQuery

Limit adds a limit step to the query.

func (*ExchangeQuery) Offset

func (eq *ExchangeQuery) Offset(offset int) *ExchangeQuery

Offset adds an offset step to the query.

func (*ExchangeQuery) Only

func (eq *ExchangeQuery) Only(ctx context.Context) (*Exchange, error)

Only returns a single Exchange entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Exchange entity is found. Returns a *NotFoundError when no Exchange entities are found.

func (*ExchangeQuery) OnlyID

func (eq *ExchangeQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Exchange ID in the query. Returns a *NotSingularError when more than one Exchange ID is found. Returns a *NotFoundError when no entities are found.

func (*ExchangeQuery) OnlyIDX

func (eq *ExchangeQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ExchangeQuery) OnlyX

func (eq *ExchangeQuery) OnlyX(ctx context.Context) *Exchange

OnlyX is like Only, but panics if an error occurs.

func (*ExchangeQuery) Order

func (eq *ExchangeQuery) Order(o ...OrderFunc) *ExchangeQuery

Order adds an order step to the query.

func (*ExchangeQuery) Paginate

func (e *ExchangeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ExchangePaginateOption,
) (*ExchangeConnection, error)

Paginate executes the query and returns a relay based cursor connection to Exchange.

func (*ExchangeQuery) QueryTransactions

func (eq *ExchangeQuery) QueryTransactions() *TransactionQuery

QueryTransactions chains the current query on the "transactions" edge.

func (*ExchangeQuery) Select

func (eq *ExchangeQuery) Select(fields ...string) *ExchangeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Exchange.Query().
	Select(exchange.FieldCreatedAt).
	Scan(ctx, &v)

func (*ExchangeQuery) Unique

func (eq *ExchangeQuery) Unique(unique bool) *ExchangeQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ExchangeQuery) Where

func (eq *ExchangeQuery) Where(ps ...predicate.Exchange) *ExchangeQuery

Where adds a new predicate for the ExchangeQuery builder.

func (*ExchangeQuery) WithNamedTransactions

func (eq *ExchangeQuery) WithNamedTransactions(name string, opts ...func(*TransactionQuery)) *ExchangeQuery

WithNamedTransactions tells the query-builder to eager-load the nodes that are connected to the "transactions" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ExchangeQuery) WithTransactions

func (eq *ExchangeQuery) WithTransactions(opts ...func(*TransactionQuery)) *ExchangeQuery

WithTransactions tells the query-builder to eager-load the nodes that are connected to the "transactions" edge. The optional arguments are used to configure the query builder of the edge.

type ExchangeSelect

type ExchangeSelect struct {
	*ExchangeQuery
	// contains filtered or unexported fields
}

ExchangeSelect is the builder for selecting fields of Exchange entities.

func (*ExchangeSelect) Bool

func (s *ExchangeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ExchangeSelect) BoolX

func (s *ExchangeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ExchangeSelect) Bools

func (s *ExchangeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ExchangeSelect) BoolsX

func (s *ExchangeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ExchangeSelect) Float64

func (s *ExchangeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ExchangeSelect) Float64X

func (s *ExchangeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ExchangeSelect) Float64s

func (s *ExchangeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ExchangeSelect) Float64sX

func (s *ExchangeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ExchangeSelect) Int

func (s *ExchangeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ExchangeSelect) IntX

func (s *ExchangeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ExchangeSelect) Ints

func (s *ExchangeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ExchangeSelect) IntsX

func (s *ExchangeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ExchangeSelect) Scan

func (es *ExchangeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ExchangeSelect) ScanX

func (s *ExchangeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ExchangeSelect) String

func (s *ExchangeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ExchangeSelect) StringX

func (s *ExchangeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ExchangeSelect) Strings

func (s *ExchangeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ExchangeSelect) StringsX

func (s *ExchangeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ExchangeUpdate

type ExchangeUpdate struct {
	// contains filtered or unexported fields
}

ExchangeUpdate is the builder for updating Exchange entities.

func (*ExchangeUpdate) AddTransactionIDs

func (eu *ExchangeUpdate) AddTransactionIDs(ids ...pulid.PULID) *ExchangeUpdate

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*ExchangeUpdate) AddTransactions

func (eu *ExchangeUpdate) AddTransactions(t ...*Transaction) *ExchangeUpdate

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*ExchangeUpdate) ClearDeletedAt

func (eu *ExchangeUpdate) ClearDeletedAt() *ExchangeUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ExchangeUpdate) ClearIcon

func (eu *ExchangeUpdate) ClearIcon() *ExchangeUpdate

ClearIcon clears the value of the "icon" field.

func (*ExchangeUpdate) ClearTransactions

func (eu *ExchangeUpdate) ClearTransactions() *ExchangeUpdate

ClearTransactions clears all "transactions" edges to the Transaction entity.

func (*ExchangeUpdate) ClearURL

func (eu *ExchangeUpdate) ClearURL() *ExchangeUpdate

ClearURL clears the value of the "url" field.

func (*ExchangeUpdate) Exec

func (eu *ExchangeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ExchangeUpdate) ExecX

func (eu *ExchangeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExchangeUpdate) Mutation

func (eu *ExchangeUpdate) Mutation() *ExchangeMutation

Mutation returns the ExchangeMutation object of the builder.

func (*ExchangeUpdate) RemoveTransactionIDs

func (eu *ExchangeUpdate) RemoveTransactionIDs(ids ...pulid.PULID) *ExchangeUpdate

RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.

func (*ExchangeUpdate) RemoveTransactions

func (eu *ExchangeUpdate) RemoveTransactions(t ...*Transaction) *ExchangeUpdate

RemoveTransactions removes "transactions" edges to Transaction entities.

func (*ExchangeUpdate) Save

func (eu *ExchangeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ExchangeUpdate) SaveX

func (eu *ExchangeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ExchangeUpdate) SetDeletedAt

func (eu *ExchangeUpdate) SetDeletedAt(t time.Time) *ExchangeUpdate

SetDeletedAt sets the "deleted_at" field.

func (*ExchangeUpdate) SetIcon

func (eu *ExchangeUpdate) SetIcon(s string) *ExchangeUpdate

SetIcon sets the "icon" field.

func (*ExchangeUpdate) SetInput

SetInput applies the change-set in the UpdateExchangeInput on the ExchangeUpdate builder.

func (*ExchangeUpdate) SetName

func (eu *ExchangeUpdate) SetName(s string) *ExchangeUpdate

SetName sets the "name" field.

func (*ExchangeUpdate) SetNillableIcon

func (eu *ExchangeUpdate) SetNillableIcon(s *string) *ExchangeUpdate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*ExchangeUpdate) SetNillableURL

func (eu *ExchangeUpdate) SetNillableURL(s *string) *ExchangeUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*ExchangeUpdate) SetURL

func (eu *ExchangeUpdate) SetURL(s string) *ExchangeUpdate

SetURL sets the "url" field.

func (*ExchangeUpdate) SetUpdatedAt

func (eu *ExchangeUpdate) SetUpdatedAt(t time.Time) *ExchangeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ExchangeUpdate) Where

func (eu *ExchangeUpdate) Where(ps ...predicate.Exchange) *ExchangeUpdate

Where appends a list predicates to the ExchangeUpdate builder.

type ExchangeUpdateOne

type ExchangeUpdateOne struct {
	// contains filtered or unexported fields
}

ExchangeUpdateOne is the builder for updating a single Exchange entity.

func (*ExchangeUpdateOne) AddTransactionIDs

func (euo *ExchangeUpdateOne) AddTransactionIDs(ids ...pulid.PULID) *ExchangeUpdateOne

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*ExchangeUpdateOne) AddTransactions

func (euo *ExchangeUpdateOne) AddTransactions(t ...*Transaction) *ExchangeUpdateOne

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*ExchangeUpdateOne) ClearDeletedAt

func (euo *ExchangeUpdateOne) ClearDeletedAt() *ExchangeUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ExchangeUpdateOne) ClearIcon

func (euo *ExchangeUpdateOne) ClearIcon() *ExchangeUpdateOne

ClearIcon clears the value of the "icon" field.

func (*ExchangeUpdateOne) ClearTransactions

func (euo *ExchangeUpdateOne) ClearTransactions() *ExchangeUpdateOne

ClearTransactions clears all "transactions" edges to the Transaction entity.

func (*ExchangeUpdateOne) ClearURL

func (euo *ExchangeUpdateOne) ClearURL() *ExchangeUpdateOne

ClearURL clears the value of the "url" field.

func (*ExchangeUpdateOne) Exec

func (euo *ExchangeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ExchangeUpdateOne) ExecX

func (euo *ExchangeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExchangeUpdateOne) Mutation

func (euo *ExchangeUpdateOne) Mutation() *ExchangeMutation

Mutation returns the ExchangeMutation object of the builder.

func (*ExchangeUpdateOne) RemoveTransactionIDs

func (euo *ExchangeUpdateOne) RemoveTransactionIDs(ids ...pulid.PULID) *ExchangeUpdateOne

RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.

func (*ExchangeUpdateOne) RemoveTransactions

func (euo *ExchangeUpdateOne) RemoveTransactions(t ...*Transaction) *ExchangeUpdateOne

RemoveTransactions removes "transactions" edges to Transaction entities.

func (*ExchangeUpdateOne) Save

func (euo *ExchangeUpdateOne) Save(ctx context.Context) (*Exchange, error)

Save executes the query and returns the updated Exchange entity.

func (*ExchangeUpdateOne) SaveX

func (euo *ExchangeUpdateOne) SaveX(ctx context.Context) *Exchange

SaveX is like Save, but panics if an error occurs.

func (*ExchangeUpdateOne) Select

func (euo *ExchangeUpdateOne) Select(field string, fields ...string) *ExchangeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ExchangeUpdateOne) SetDeletedAt

func (euo *ExchangeUpdateOne) SetDeletedAt(t time.Time) *ExchangeUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*ExchangeUpdateOne) SetIcon

func (euo *ExchangeUpdateOne) SetIcon(s string) *ExchangeUpdateOne

SetIcon sets the "icon" field.

func (*ExchangeUpdateOne) SetInput

SetInput applies the change-set in the UpdateExchangeInput on the ExchangeUpdateOne builder.

func (*ExchangeUpdateOne) SetName

func (euo *ExchangeUpdateOne) SetName(s string) *ExchangeUpdateOne

SetName sets the "name" field.

func (*ExchangeUpdateOne) SetNillableIcon

func (euo *ExchangeUpdateOne) SetNillableIcon(s *string) *ExchangeUpdateOne

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*ExchangeUpdateOne) SetNillableURL

func (euo *ExchangeUpdateOne) SetNillableURL(s *string) *ExchangeUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*ExchangeUpdateOne) SetURL

func (euo *ExchangeUpdateOne) SetURL(s string) *ExchangeUpdateOne

SetURL sets the "url" field.

func (*ExchangeUpdateOne) SetUpdatedAt

func (euo *ExchangeUpdateOne) SetUpdatedAt(t time.Time) *ExchangeUpdateOne

SetUpdatedAt sets the "updated_at" field.

type ExchangeWhereInput

type ExchangeWhereInput struct {
	Predicates []predicate.Exchange  `json:"-"`
	Not        *ExchangeWhereInput   `json:"not,omitempty"`
	Or         []*ExchangeWhereInput `json:"or,omitempty"`
	And        []*ExchangeWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "url" field predicates.
	URL             *string  `json:"url,omitempty"`
	URLNEQ          *string  `json:"urlNEQ,omitempty"`
	URLIn           []string `json:"urlIn,omitempty"`
	URLNotIn        []string `json:"urlNotIn,omitempty"`
	URLGT           *string  `json:"urlGT,omitempty"`
	URLGTE          *string  `json:"urlGTE,omitempty"`
	URLLT           *string  `json:"urlLT,omitempty"`
	URLLTE          *string  `json:"urlLTE,omitempty"`
	URLContains     *string  `json:"urlContains,omitempty"`
	URLHasPrefix    *string  `json:"urlHasPrefix,omitempty"`
	URLHasSuffix    *string  `json:"urlHasSuffix,omitempty"`
	URLIsNil        bool     `json:"urlIsNil,omitempty"`
	URLNotNil       bool     `json:"urlNotNil,omitempty"`
	URLEqualFold    *string  `json:"urlEqualFold,omitempty"`
	URLContainsFold *string  `json:"urlContainsFold,omitempty"`

	// "transactions" edge predicates.
	HasTransactions     *bool                    `json:"hasTransactions,omitempty"`
	HasTransactionsWith []*TransactionWhereInput `json:"hasTransactionsWith,omitempty"`
}

ExchangeWhereInput represents a where input for filtering Exchange queries.

func (*ExchangeWhereInput) AddPredicates

func (i *ExchangeWhereInput) AddPredicates(predicates ...predicate.Exchange)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ExchangeWhereInput) Filter

Filter applies the ExchangeWhereInput filter on the ExchangeQuery builder.

func (*ExchangeWhereInput) P

P returns a predicate for filtering exchanges. An error is returned if the input is empty or invalid.

type Exchanges

type Exchanges []*Exchange

Exchanges is a parsable slice of Exchange.

type Field

type Field struct {
	Type  string `json:"type,omitempty"`  // field type.
	Name  string `json:"name,omitempty"`  // field name (as in struct).
	Value string `json:"value,omitempty"` // stringified value.
}

Field of a node.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type Node

type Node struct {
	ID     pulid.PULID `json:"id,omitempty"`     // node id.
	Type   string      `json:"type,omitempty"`   // node type.
	Fields []*Field    `json:"fields,omitempty"` // node fields.
	Edges  []*Edge     `json:"edges,omitempty"`  // node edges.
}

Node in the graph.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, pulid.PULID) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	Node(context.Context) (*Node, error)
}

Noder wraps the basic Node method.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection string

OrderDirection defines the directions in which to order a list of items.

const (
	// OrderDirectionAsc specifies an ascending order.
	OrderDirectionAsc OrderDirection = "ASC"
	// OrderDirectionDesc specifies a descending order.
	OrderDirectionDesc OrderDirection = "DESC"
)

func (OrderDirection) MarshalGQL

func (o OrderDirection) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (OrderDirection) String

func (o OrderDirection) String() string

String implements fmt.Stringer interface.

func (*OrderDirection) UnmarshalGQL

func (o *OrderDirection) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

func (OrderDirection) Validate

func (o OrderDirection) Validate() error

Validate the order direction value.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type PageInfo

type PageInfo struct {
	HasNextPage     bool    `json:"hasNextPage"`
	HasPreviousPage bool    `json:"hasPreviousPage"`
	StartCursor     *Cursor `json:"startCursor"`
	EndCursor       *Cursor `json:"endCursor"`
}

PageInfo of a connection type.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Portfolio

type Portfolio struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Whether this portfolio is visible to others.
	IsPublic bool `json:"isPublic,omitempty"`
	// Whether this portfolio is visible to the owner.
	IsVisible bool `json:"isVisible,omitempty"`
	// AccountID holds the value of the "account_id" field.
	AccountID pulid.PULID `json:"accountID,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PortfolioQuery when eager-loading is set.
	Edges PortfolioEdges `json:"edges"`
	// contains filtered or unexported fields
}

Portfolio is the model entity for the Portfolio schema.

func (*Portfolio) Account

func (po *Portfolio) Account(ctx context.Context) (*Account, error)

func (*Portfolio) Connections

func (po *Portfolio) Connections(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *ConnectionOrder, where *ConnectionWhereInput,
) (*ConnectionConnection, error)

func (*Portfolio) NamedConnections

func (po *Portfolio) NamedConnections(name string) ([]*Connection, error)

NamedConnections returns the Connections named value or an error if the edge was not loaded in eager-loading with this name.

func (*Portfolio) NamedTransactions

func (po *Portfolio) NamedTransactions(name string) ([]*Transaction, error)

NamedTransactions returns the Transactions named value or an error if the edge was not loaded in eager-loading with this name.

func (*Portfolio) Node

func (po *Portfolio) Node(ctx context.Context) (node *Node, err error)

func (*Portfolio) QueryAccount

func (po *Portfolio) QueryAccount() *AccountQuery

QueryAccount queries the "account" edge of the Portfolio entity.

func (*Portfolio) QueryConnections

func (po *Portfolio) QueryConnections() *ConnectionQuery

QueryConnections queries the "connections" edge of the Portfolio entity.

func (*Portfolio) QueryTransactions

func (po *Portfolio) QueryTransactions() *TransactionQuery

QueryTransactions queries the "transactions" edge of the Portfolio entity.

func (*Portfolio) String

func (po *Portfolio) String() string

String implements the fmt.Stringer.

func (*Portfolio) ToEdge

func (po *Portfolio) ToEdge(order *PortfolioOrder) *PortfolioEdge

ToEdge converts Portfolio into PortfolioEdge.

func (*Portfolio) Transactions

func (po *Portfolio) Transactions(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *TransactionOrder,
) (*TransactionConnection, error)

func (*Portfolio) Unwrap

func (po *Portfolio) Unwrap() *Portfolio

Unwrap unwraps the Portfolio entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Portfolio) Update

func (po *Portfolio) Update() *PortfolioUpdateOne

Update returns a builder for updating this Portfolio. Note that you need to call Portfolio.Unwrap() before calling this method if this Portfolio was returned from a transaction, and the transaction was committed or rolled back.

type PortfolioClient

type PortfolioClient struct {
	// contains filtered or unexported fields
}

PortfolioClient is a client for the Portfolio schema.

func NewPortfolioClient

func NewPortfolioClient(c config) *PortfolioClient

NewPortfolioClient returns a client for the Portfolio from the given config.

func (*PortfolioClient) Create

func (c *PortfolioClient) Create() *PortfolioCreate

Create returns a builder for creating a Portfolio entity.

func (*PortfolioClient) CreateBulk

func (c *PortfolioClient) CreateBulk(builders ...*PortfolioCreate) *PortfolioCreateBulk

CreateBulk returns a builder for creating a bulk of Portfolio entities.

func (*PortfolioClient) Delete

func (c *PortfolioClient) Delete() *PortfolioDelete

Delete returns a delete builder for Portfolio.

func (*PortfolioClient) DeleteOne

func (c *PortfolioClient) DeleteOne(po *Portfolio) *PortfolioDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PortfolioClient) DeleteOneID

func (c *PortfolioClient) DeleteOneID(id pulid.PULID) *PortfolioDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*PortfolioClient) Get

Get returns a Portfolio entity by its id.

func (*PortfolioClient) GetX

func (c *PortfolioClient) GetX(ctx context.Context, id pulid.PULID) *Portfolio

GetX is like Get, but panics if an error occurs.

func (*PortfolioClient) Hooks

func (c *PortfolioClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PortfolioClient) Query

func (c *PortfolioClient) Query() *PortfolioQuery

Query returns a query builder for Portfolio.

func (*PortfolioClient) QueryAccount

func (c *PortfolioClient) QueryAccount(po *Portfolio) *AccountQuery

QueryAccount queries the account edge of a Portfolio.

func (*PortfolioClient) QueryConnections

func (c *PortfolioClient) QueryConnections(po *Portfolio) *ConnectionQuery

QueryConnections queries the connections edge of a Portfolio.

func (*PortfolioClient) QueryTransactions

func (c *PortfolioClient) QueryTransactions(po *Portfolio) *TransactionQuery

QueryTransactions queries the transactions edge of a Portfolio.

func (*PortfolioClient) Update

func (c *PortfolioClient) Update() *PortfolioUpdate

Update returns an update builder for Portfolio.

func (*PortfolioClient) UpdateOne

func (c *PortfolioClient) UpdateOne(po *Portfolio) *PortfolioUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PortfolioClient) UpdateOneID

func (c *PortfolioClient) UpdateOneID(id pulid.PULID) *PortfolioUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PortfolioClient) Use

func (c *PortfolioClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `portfolio.Hooks(f(g(h())))`.

type PortfolioConnection

type PortfolioConnection struct {
	Edges      []*PortfolioEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

PortfolioConnection is the connection containing edges to Portfolio.

type PortfolioCreate

type PortfolioCreate struct {
	// contains filtered or unexported fields
}

PortfolioCreate is the builder for creating a Portfolio entity.

func (*PortfolioCreate) AddConnectionIDs

func (pc *PortfolioCreate) AddConnectionIDs(ids ...pulid.PULID) *PortfolioCreate

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*PortfolioCreate) AddConnections

func (pc *PortfolioCreate) AddConnections(c ...*Connection) *PortfolioCreate

AddConnections adds the "connections" edges to the Connection entity.

func (*PortfolioCreate) AddTransactionIDs

func (pc *PortfolioCreate) AddTransactionIDs(ids ...pulid.PULID) *PortfolioCreate

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*PortfolioCreate) AddTransactions

func (pc *PortfolioCreate) AddTransactions(t ...*Transaction) *PortfolioCreate

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*PortfolioCreate) Exec

func (pc *PortfolioCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PortfolioCreate) ExecX

func (pc *PortfolioCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PortfolioCreate) Mutation

func (pc *PortfolioCreate) Mutation() *PortfolioMutation

Mutation returns the PortfolioMutation object of the builder.

func (*PortfolioCreate) Save

func (pc *PortfolioCreate) Save(ctx context.Context) (*Portfolio, error)

Save creates the Portfolio in the database.

func (*PortfolioCreate) SaveX

func (pc *PortfolioCreate) SaveX(ctx context.Context) *Portfolio

SaveX calls Save and panics if Save returns an error.

func (*PortfolioCreate) SetAccount

func (pc *PortfolioCreate) SetAccount(a *Account) *PortfolioCreate

SetAccount sets the "account" edge to the Account entity.

func (*PortfolioCreate) SetAccountID

func (pc *PortfolioCreate) SetAccountID(pu pulid.PULID) *PortfolioCreate

SetAccountID sets the "account_id" field.

func (*PortfolioCreate) SetCreatedAt

func (pc *PortfolioCreate) SetCreatedAt(t time.Time) *PortfolioCreate

SetCreatedAt sets the "created_at" field.

func (*PortfolioCreate) SetDeletedAt

func (pc *PortfolioCreate) SetDeletedAt(t time.Time) *PortfolioCreate

SetDeletedAt sets the "deleted_at" field.

func (*PortfolioCreate) SetID

func (pc *PortfolioCreate) SetID(pu pulid.PULID) *PortfolioCreate

SetID sets the "id" field.

func (*PortfolioCreate) SetInput

SetInput applies the change-set in the CreatePortfolioInput on the PortfolioCreate builder.

func (*PortfolioCreate) SetIsPublic

func (pc *PortfolioCreate) SetIsPublic(b bool) *PortfolioCreate

SetIsPublic sets the "is_public" field.

func (*PortfolioCreate) SetIsVisible

func (pc *PortfolioCreate) SetIsVisible(b bool) *PortfolioCreate

SetIsVisible sets the "is_visible" field.

func (*PortfolioCreate) SetName

func (pc *PortfolioCreate) SetName(s string) *PortfolioCreate

SetName sets the "name" field.

func (*PortfolioCreate) SetNillableCreatedAt

func (pc *PortfolioCreate) SetNillableCreatedAt(t *time.Time) *PortfolioCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PortfolioCreate) SetNillableDeletedAt

func (pc *PortfolioCreate) SetNillableDeletedAt(t *time.Time) *PortfolioCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*PortfolioCreate) SetNillableID

func (pc *PortfolioCreate) SetNillableID(pu *pulid.PULID) *PortfolioCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PortfolioCreate) SetNillableIsPublic

func (pc *PortfolioCreate) SetNillableIsPublic(b *bool) *PortfolioCreate

SetNillableIsPublic sets the "is_public" field if the given value is not nil.

func (*PortfolioCreate) SetNillableIsVisible

func (pc *PortfolioCreate) SetNillableIsVisible(b *bool) *PortfolioCreate

SetNillableIsVisible sets the "is_visible" field if the given value is not nil.

func (*PortfolioCreate) SetNillableUpdatedAt

func (pc *PortfolioCreate) SetNillableUpdatedAt(t *time.Time) *PortfolioCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PortfolioCreate) SetUpdatedAt

func (pc *PortfolioCreate) SetUpdatedAt(t time.Time) *PortfolioCreate

SetUpdatedAt sets the "updated_at" field.

type PortfolioCreateBulk

type PortfolioCreateBulk struct {
	// contains filtered or unexported fields
}

PortfolioCreateBulk is the builder for creating many Portfolio entities in bulk.

func (*PortfolioCreateBulk) Exec

func (pcb *PortfolioCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PortfolioCreateBulk) ExecX

func (pcb *PortfolioCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PortfolioCreateBulk) Save

func (pcb *PortfolioCreateBulk) Save(ctx context.Context) ([]*Portfolio, error)

Save creates the Portfolio entities in the database.

func (*PortfolioCreateBulk) SaveX

func (pcb *PortfolioCreateBulk) SaveX(ctx context.Context) []*Portfolio

SaveX is like Save, but panics if an error occurs.

type PortfolioDelete

type PortfolioDelete struct {
	// contains filtered or unexported fields
}

PortfolioDelete is the builder for deleting a Portfolio entity.

func (*PortfolioDelete) Exec

func (pd *PortfolioDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PortfolioDelete) ExecX

func (pd *PortfolioDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PortfolioDelete) Where

Where appends a list predicates to the PortfolioDelete builder.

type PortfolioDeleteOne

type PortfolioDeleteOne struct {
	// contains filtered or unexported fields
}

PortfolioDeleteOne is the builder for deleting a single Portfolio entity.

func (*PortfolioDeleteOne) Exec

func (pdo *PortfolioDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PortfolioDeleteOne) ExecX

func (pdo *PortfolioDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type PortfolioEdge

type PortfolioEdge struct {
	Node   *Portfolio `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

PortfolioEdge is the edge representation of Portfolio.

type PortfolioEdges

type PortfolioEdges struct {
	// Account holds the value of the account edge.
	Account *Account `json:"account,omitempty"`
	// Transactions holds the value of the transactions edge.
	Transactions []*Transaction `json:"transactions,omitempty"`
	// Connections holds the value of the connections edge.
	Connections []*Connection `json:"connections,omitempty"`
	// contains filtered or unexported fields
}

PortfolioEdges holds the relations/edges for other nodes in the graph.

func (PortfolioEdges) AccountOrErr

func (e PortfolioEdges) AccountOrErr() (*Account, error)

AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PortfolioEdges) ConnectionsOrErr

func (e PortfolioEdges) ConnectionsOrErr() ([]*Connection, error)

ConnectionsOrErr returns the Connections value or an error if the edge was not loaded in eager-loading.

func (PortfolioEdges) TransactionsOrErr

func (e PortfolioEdges) TransactionsOrErr() ([]*Transaction, error)

TransactionsOrErr returns the Transactions value or an error if the edge was not loaded in eager-loading.

type PortfolioGroupBy

type PortfolioGroupBy struct {
	// contains filtered or unexported fields
}

PortfolioGroupBy is the group-by builder for Portfolio entities.

func (*PortfolioGroupBy) Aggregate

func (pgb *PortfolioGroupBy) Aggregate(fns ...AggregateFunc) *PortfolioGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PortfolioGroupBy) Bool

func (s *PortfolioGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PortfolioGroupBy) BoolX

func (s *PortfolioGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PortfolioGroupBy) Bools

func (s *PortfolioGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PortfolioGroupBy) BoolsX

func (s *PortfolioGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PortfolioGroupBy) Float64

func (s *PortfolioGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PortfolioGroupBy) Float64X

func (s *PortfolioGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PortfolioGroupBy) Float64s

func (s *PortfolioGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PortfolioGroupBy) Float64sX

func (s *PortfolioGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PortfolioGroupBy) Int

func (s *PortfolioGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PortfolioGroupBy) IntX

func (s *PortfolioGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PortfolioGroupBy) Ints

func (s *PortfolioGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PortfolioGroupBy) IntsX

func (s *PortfolioGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PortfolioGroupBy) Scan

func (pgb *PortfolioGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*PortfolioGroupBy) ScanX

func (s *PortfolioGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PortfolioGroupBy) String

func (s *PortfolioGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PortfolioGroupBy) StringX

func (s *PortfolioGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PortfolioGroupBy) Strings

func (s *PortfolioGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PortfolioGroupBy) StringsX

func (s *PortfolioGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PortfolioMutation

type PortfolioMutation struct {
	// contains filtered or unexported fields
}

PortfolioMutation represents an operation that mutates the Portfolio nodes in the graph.

func (*PortfolioMutation) AccountCleared

func (m *PortfolioMutation) AccountCleared() bool

AccountCleared reports if the "account" edge to the Account entity was cleared.

func (*PortfolioMutation) AccountID

func (m *PortfolioMutation) AccountID() (r pulid.PULID, exists bool)

AccountID returns the value of the "account_id" field in the mutation.

func (*PortfolioMutation) AccountIDs

func (m *PortfolioMutation) AccountIDs() (ids []pulid.PULID)

AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.

func (*PortfolioMutation) AddConnectionIDs

func (m *PortfolioMutation) AddConnectionIDs(ids ...pulid.PULID)

AddConnectionIDs adds the "connections" edge to the Connection entity by ids.

func (*PortfolioMutation) AddField

func (m *PortfolioMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PortfolioMutation) AddTransactionIDs

func (m *PortfolioMutation) AddTransactionIDs(ids ...pulid.PULID)

AddTransactionIDs adds the "transactions" edge to the Transaction entity by ids.

func (*PortfolioMutation) AddedEdges

func (m *PortfolioMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PortfolioMutation) AddedField

func (m *PortfolioMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PortfolioMutation) AddedFields

func (m *PortfolioMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PortfolioMutation) AddedIDs

func (m *PortfolioMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PortfolioMutation) ClearAccount

func (m *PortfolioMutation) ClearAccount()

ClearAccount clears the "account" edge to the Account entity.

func (*PortfolioMutation) ClearConnections

func (m *PortfolioMutation) ClearConnections()

ClearConnections clears the "connections" edge to the Connection entity.

func (*PortfolioMutation) ClearDeletedAt

func (m *PortfolioMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*PortfolioMutation) ClearEdge

func (m *PortfolioMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PortfolioMutation) ClearField

func (m *PortfolioMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PortfolioMutation) ClearTransactions

func (m *PortfolioMutation) ClearTransactions()

ClearTransactions clears the "transactions" edge to the Transaction entity.

func (*PortfolioMutation) ClearedEdges

func (m *PortfolioMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PortfolioMutation) ClearedFields

func (m *PortfolioMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PortfolioMutation) Client

func (m PortfolioMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PortfolioMutation) ConnectionsCleared

func (m *PortfolioMutation) ConnectionsCleared() bool

ConnectionsCleared reports if the "connections" edge to the Connection entity was cleared.

func (*PortfolioMutation) ConnectionsIDs

func (m *PortfolioMutation) ConnectionsIDs() (ids []pulid.PULID)

ConnectionsIDs returns the "connections" edge IDs in the mutation.

func (*PortfolioMutation) CreatedAt

func (m *PortfolioMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PortfolioMutation) DeletedAt

func (m *PortfolioMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*PortfolioMutation) DeletedAtCleared

func (m *PortfolioMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*PortfolioMutation) EdgeCleared

func (m *PortfolioMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PortfolioMutation) Field

func (m *PortfolioMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PortfolioMutation) FieldCleared

func (m *PortfolioMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PortfolioMutation) Fields

func (m *PortfolioMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PortfolioMutation) ID

func (m *PortfolioMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PortfolioMutation) IDs

func (m *PortfolioMutation) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PortfolioMutation) IsPublic

func (m *PortfolioMutation) IsPublic() (r bool, exists bool)

IsPublic returns the value of the "is_public" field in the mutation.

func (*PortfolioMutation) IsVisible

func (m *PortfolioMutation) IsVisible() (r bool, exists bool)

IsVisible returns the value of the "is_visible" field in the mutation.

func (*PortfolioMutation) Name

func (m *PortfolioMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PortfolioMutation) OldAccountID

func (m *PortfolioMutation) OldAccountID(ctx context.Context) (v pulid.PULID, err error)

OldAccountID returns the old "account_id" field's value of the Portfolio entity. If the Portfolio object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortfolioMutation) OldCreatedAt

func (m *PortfolioMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Portfolio entity. If the Portfolio object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortfolioMutation) OldDeletedAt

func (m *PortfolioMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Portfolio entity. If the Portfolio object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortfolioMutation) OldField

func (m *PortfolioMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PortfolioMutation) OldIsPublic

func (m *PortfolioMutation) OldIsPublic(ctx context.Context) (v bool, err error)

OldIsPublic returns the old "is_public" field's value of the Portfolio entity. If the Portfolio object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortfolioMutation) OldIsVisible

func (m *PortfolioMutation) OldIsVisible(ctx context.Context) (v bool, err error)

OldIsVisible returns the old "is_visible" field's value of the Portfolio entity. If the Portfolio object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortfolioMutation) OldName

func (m *PortfolioMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Portfolio entity. If the Portfolio object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortfolioMutation) OldUpdatedAt

func (m *PortfolioMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Portfolio entity. If the Portfolio object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortfolioMutation) Op

func (m *PortfolioMutation) Op() Op

Op returns the operation name.

func (*PortfolioMutation) RemoveConnectionIDs

func (m *PortfolioMutation) RemoveConnectionIDs(ids ...pulid.PULID)

RemoveConnectionIDs removes the "connections" edge to the Connection entity by IDs.

func (*PortfolioMutation) RemoveTransactionIDs

func (m *PortfolioMutation) RemoveTransactionIDs(ids ...pulid.PULID)

RemoveTransactionIDs removes the "transactions" edge to the Transaction entity by IDs.

func (*PortfolioMutation) RemovedConnectionsIDs

func (m *PortfolioMutation) RemovedConnectionsIDs() (ids []pulid.PULID)

RemovedConnections returns the removed IDs of the "connections" edge to the Connection entity.

func (*PortfolioMutation) RemovedEdges

func (m *PortfolioMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PortfolioMutation) RemovedIDs

func (m *PortfolioMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PortfolioMutation) RemovedTransactionsIDs

func (m *PortfolioMutation) RemovedTransactionsIDs() (ids []pulid.PULID)

RemovedTransactions returns the removed IDs of the "transactions" edge to the Transaction entity.

func (*PortfolioMutation) ResetAccount

func (m *PortfolioMutation) ResetAccount()

ResetAccount resets all changes to the "account" edge.

func (*PortfolioMutation) ResetAccountID

func (m *PortfolioMutation) ResetAccountID()

ResetAccountID resets all changes to the "account_id" field.

func (*PortfolioMutation) ResetConnections

func (m *PortfolioMutation) ResetConnections()

ResetConnections resets all changes to the "connections" edge.

func (*PortfolioMutation) ResetCreatedAt

func (m *PortfolioMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PortfolioMutation) ResetDeletedAt

func (m *PortfolioMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*PortfolioMutation) ResetEdge

func (m *PortfolioMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PortfolioMutation) ResetField

func (m *PortfolioMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PortfolioMutation) ResetIsPublic

func (m *PortfolioMutation) ResetIsPublic()

ResetIsPublic resets all changes to the "is_public" field.

func (*PortfolioMutation) ResetIsVisible

func (m *PortfolioMutation) ResetIsVisible()

ResetIsVisible resets all changes to the "is_visible" field.

func (*PortfolioMutation) ResetName

func (m *PortfolioMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PortfolioMutation) ResetTransactions

func (m *PortfolioMutation) ResetTransactions()

ResetTransactions resets all changes to the "transactions" edge.

func (*PortfolioMutation) ResetUpdatedAt

func (m *PortfolioMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PortfolioMutation) SetAccountID

func (m *PortfolioMutation) SetAccountID(pu pulid.PULID)

SetAccountID sets the "account_id" field.

func (*PortfolioMutation) SetCreatedAt

func (m *PortfolioMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PortfolioMutation) SetDeletedAt

func (m *PortfolioMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*PortfolioMutation) SetField

func (m *PortfolioMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PortfolioMutation) SetID

func (m *PortfolioMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Portfolio entities.

func (*PortfolioMutation) SetIsPublic

func (m *PortfolioMutation) SetIsPublic(b bool)

SetIsPublic sets the "is_public" field.

func (*PortfolioMutation) SetIsVisible

func (m *PortfolioMutation) SetIsVisible(b bool)

SetIsVisible sets the "is_visible" field.

func (*PortfolioMutation) SetName

func (m *PortfolioMutation) SetName(s string)

SetName sets the "name" field.

func (*PortfolioMutation) SetUpdatedAt

func (m *PortfolioMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*PortfolioMutation) TransactionsCleared

func (m *PortfolioMutation) TransactionsCleared() bool

TransactionsCleared reports if the "transactions" edge to the Transaction entity was cleared.

func (*PortfolioMutation) TransactionsIDs

func (m *PortfolioMutation) TransactionsIDs() (ids []pulid.PULID)

TransactionsIDs returns the "transactions" edge IDs in the mutation.

func (PortfolioMutation) Tx

func (m PortfolioMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PortfolioMutation) Type

func (m *PortfolioMutation) Type() string

Type returns the node type of this mutation (Portfolio).

func (*PortfolioMutation) UpdatedAt

func (m *PortfolioMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PortfolioMutation) Where

func (m *PortfolioMutation) Where(ps ...predicate.Portfolio)

Where appends a list predicates to the PortfolioMutation builder.

type PortfolioOrder

type PortfolioOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *PortfolioOrderField `json:"field"`
}

PortfolioOrder defines the ordering of Portfolio.

type PortfolioOrderField

type PortfolioOrderField struct {
	// contains filtered or unexported fields
}

PortfolioOrderField defines the ordering field of Portfolio.

func (PortfolioOrderField) MarshalGQL

func (f PortfolioOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (PortfolioOrderField) String

func (f PortfolioOrderField) String() string

String implement fmt.Stringer interface.

func (*PortfolioOrderField) UnmarshalGQL

func (f *PortfolioOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type PortfolioPaginateOption

type PortfolioPaginateOption func(*portfolioPager) error

PortfolioPaginateOption enables pagination customization.

func WithPortfolioFilter

func WithPortfolioFilter(filter func(*PortfolioQuery) (*PortfolioQuery, error)) PortfolioPaginateOption

WithPortfolioFilter configures pagination filter.

func WithPortfolioOrder

func WithPortfolioOrder(order *PortfolioOrder) PortfolioPaginateOption

WithPortfolioOrder configures pagination ordering.

type PortfolioQuery

type PortfolioQuery struct {
	// contains filtered or unexported fields
}

PortfolioQuery is the builder for querying Portfolio entities.

func (*PortfolioQuery) All

func (pq *PortfolioQuery) All(ctx context.Context) ([]*Portfolio, error)

All executes the query and returns a list of Portfolios.

func (*PortfolioQuery) AllX

func (pq *PortfolioQuery) AllX(ctx context.Context) []*Portfolio

AllX is like All, but panics if an error occurs.

func (*PortfolioQuery) Clone

func (pq *PortfolioQuery) Clone() *PortfolioQuery

Clone returns a duplicate of the PortfolioQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PortfolioQuery) CollectFields

func (po *PortfolioQuery) CollectFields(ctx context.Context, satisfies ...string) (*PortfolioQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PortfolioQuery) Count

func (pq *PortfolioQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PortfolioQuery) CountX

func (pq *PortfolioQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PortfolioQuery) Exist

func (pq *PortfolioQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PortfolioQuery) ExistX

func (pq *PortfolioQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PortfolioQuery) First

func (pq *PortfolioQuery) First(ctx context.Context) (*Portfolio, error)

First returns the first Portfolio entity from the query. Returns a *NotFoundError when no Portfolio was found.

func (*PortfolioQuery) FirstID

func (pq *PortfolioQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Portfolio ID from the query. Returns a *NotFoundError when no Portfolio ID was found.

func (*PortfolioQuery) FirstIDX

func (pq *PortfolioQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PortfolioQuery) FirstX

func (pq *PortfolioQuery) FirstX(ctx context.Context) *Portfolio

FirstX is like First, but panics if an error occurs.

func (*PortfolioQuery) GroupBy

func (pq *PortfolioQuery) GroupBy(field string, fields ...string) *PortfolioGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Portfolio.Query().
	GroupBy(portfolio.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PortfolioQuery) IDs

func (pq *PortfolioQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Portfolio IDs.

func (*PortfolioQuery) IDsX

func (pq *PortfolioQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*PortfolioQuery) Limit

func (pq *PortfolioQuery) Limit(limit int) *PortfolioQuery

Limit adds a limit step to the query.

func (*PortfolioQuery) Offset

func (pq *PortfolioQuery) Offset(offset int) *PortfolioQuery

Offset adds an offset step to the query.

func (*PortfolioQuery) Only

func (pq *PortfolioQuery) Only(ctx context.Context) (*Portfolio, error)

Only returns a single Portfolio entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Portfolio entity is found. Returns a *NotFoundError when no Portfolio entities are found.

func (*PortfolioQuery) OnlyID

func (pq *PortfolioQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Portfolio ID in the query. Returns a *NotSingularError when more than one Portfolio ID is found. Returns a *NotFoundError when no entities are found.

func (*PortfolioQuery) OnlyIDX

func (pq *PortfolioQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PortfolioQuery) OnlyX

func (pq *PortfolioQuery) OnlyX(ctx context.Context) *Portfolio

OnlyX is like Only, but panics if an error occurs.

func (*PortfolioQuery) Order

func (pq *PortfolioQuery) Order(o ...OrderFunc) *PortfolioQuery

Order adds an order step to the query.

func (*PortfolioQuery) Paginate

func (po *PortfolioQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PortfolioPaginateOption,
) (*PortfolioConnection, error)

Paginate executes the query and returns a relay based cursor connection to Portfolio.

func (*PortfolioQuery) QueryAccount

func (pq *PortfolioQuery) QueryAccount() *AccountQuery

QueryAccount chains the current query on the "account" edge.

func (*PortfolioQuery) QueryConnections

func (pq *PortfolioQuery) QueryConnections() *ConnectionQuery

QueryConnections chains the current query on the "connections" edge.

func (*PortfolioQuery) QueryTransactions

func (pq *PortfolioQuery) QueryTransactions() *TransactionQuery

QueryTransactions chains the current query on the "transactions" edge.

func (*PortfolioQuery) Select

func (pq *PortfolioQuery) Select(fields ...string) *PortfolioSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Portfolio.Query().
	Select(portfolio.FieldCreatedAt).
	Scan(ctx, &v)

func (*PortfolioQuery) Unique

func (pq *PortfolioQuery) Unique(unique bool) *PortfolioQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PortfolioQuery) Where

Where adds a new predicate for the PortfolioQuery builder.

func (*PortfolioQuery) WithAccount

func (pq *PortfolioQuery) WithAccount(opts ...func(*AccountQuery)) *PortfolioQuery

WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.

func (*PortfolioQuery) WithConnections

func (pq *PortfolioQuery) WithConnections(opts ...func(*ConnectionQuery)) *PortfolioQuery

WithConnections tells the query-builder to eager-load the nodes that are connected to the "connections" edge. The optional arguments are used to configure the query builder of the edge.

func (*PortfolioQuery) WithNamedConnections

func (pq *PortfolioQuery) WithNamedConnections(name string, opts ...func(*ConnectionQuery)) *PortfolioQuery

WithNamedConnections tells the query-builder to eager-load the nodes that are connected to the "connections" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PortfolioQuery) WithNamedTransactions

func (pq *PortfolioQuery) WithNamedTransactions(name string, opts ...func(*TransactionQuery)) *PortfolioQuery

WithNamedTransactions tells the query-builder to eager-load the nodes that are connected to the "transactions" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PortfolioQuery) WithTransactions

func (pq *PortfolioQuery) WithTransactions(opts ...func(*TransactionQuery)) *PortfolioQuery

WithTransactions tells the query-builder to eager-load the nodes that are connected to the "transactions" edge. The optional arguments are used to configure the query builder of the edge.

type PortfolioSelect

type PortfolioSelect struct {
	*PortfolioQuery
	// contains filtered or unexported fields
}

PortfolioSelect is the builder for selecting fields of Portfolio entities.

func (*PortfolioSelect) Bool

func (s *PortfolioSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PortfolioSelect) BoolX

func (s *PortfolioSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PortfolioSelect) Bools

func (s *PortfolioSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PortfolioSelect) BoolsX

func (s *PortfolioSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PortfolioSelect) Float64

func (s *PortfolioSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PortfolioSelect) Float64X

func (s *PortfolioSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PortfolioSelect) Float64s

func (s *PortfolioSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PortfolioSelect) Float64sX

func (s *PortfolioSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PortfolioSelect) Int

func (s *PortfolioSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PortfolioSelect) IntX

func (s *PortfolioSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PortfolioSelect) Ints

func (s *PortfolioSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PortfolioSelect) IntsX

func (s *PortfolioSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PortfolioSelect) Scan

func (ps *PortfolioSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PortfolioSelect) ScanX

func (s *PortfolioSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PortfolioSelect) String

func (s *PortfolioSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PortfolioSelect) StringX

func (s *PortfolioSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PortfolioSelect) Strings

func (s *PortfolioSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PortfolioSelect) StringsX

func (s *PortfolioSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PortfolioUpdate

type PortfolioUpdate struct {
	// contains filtered or unexported fields
}

PortfolioUpdate is the builder for updating Portfolio entities.

func (*PortfolioUpdate) AddConnectionIDs

func (pu *PortfolioUpdate) AddConnectionIDs(ids ...pulid.PULID) *PortfolioUpdate

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*PortfolioUpdate) AddConnections

func (pu *PortfolioUpdate) AddConnections(c ...*Connection) *PortfolioUpdate

AddConnections adds the "connections" edges to the Connection entity.

func (*PortfolioUpdate) AddTransactionIDs

func (pu *PortfolioUpdate) AddTransactionIDs(ids ...pulid.PULID) *PortfolioUpdate

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*PortfolioUpdate) AddTransactions

func (pu *PortfolioUpdate) AddTransactions(t ...*Transaction) *PortfolioUpdate

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*PortfolioUpdate) ClearAccount

func (pu *PortfolioUpdate) ClearAccount() *PortfolioUpdate

ClearAccount clears the "account" edge to the Account entity.

func (*PortfolioUpdate) ClearConnections

func (pu *PortfolioUpdate) ClearConnections() *PortfolioUpdate

ClearConnections clears all "connections" edges to the Connection entity.

func (*PortfolioUpdate) ClearDeletedAt

func (pu *PortfolioUpdate) ClearDeletedAt() *PortfolioUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*PortfolioUpdate) ClearTransactions

func (pu *PortfolioUpdate) ClearTransactions() *PortfolioUpdate

ClearTransactions clears all "transactions" edges to the Transaction entity.

func (*PortfolioUpdate) Exec

func (pu *PortfolioUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PortfolioUpdate) ExecX

func (pu *PortfolioUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PortfolioUpdate) Mutation

func (pu *PortfolioUpdate) Mutation() *PortfolioMutation

Mutation returns the PortfolioMutation object of the builder.

func (*PortfolioUpdate) RemoveConnectionIDs

func (pu *PortfolioUpdate) RemoveConnectionIDs(ids ...pulid.PULID) *PortfolioUpdate

RemoveConnectionIDs removes the "connections" edge to Connection entities by IDs.

func (*PortfolioUpdate) RemoveConnections

func (pu *PortfolioUpdate) RemoveConnections(c ...*Connection) *PortfolioUpdate

RemoveConnections removes "connections" edges to Connection entities.

func (*PortfolioUpdate) RemoveTransactionIDs

func (pu *PortfolioUpdate) RemoveTransactionIDs(ids ...pulid.PULID) *PortfolioUpdate

RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.

func (*PortfolioUpdate) RemoveTransactions

func (pu *PortfolioUpdate) RemoveTransactions(t ...*Transaction) *PortfolioUpdate

RemoveTransactions removes "transactions" edges to Transaction entities.

func (*PortfolioUpdate) Save

func (pu *PortfolioUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PortfolioUpdate) SaveX

func (pu *PortfolioUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PortfolioUpdate) SetAccount

func (pu *PortfolioUpdate) SetAccount(a *Account) *PortfolioUpdate

SetAccount sets the "account" edge to the Account entity.

func (*PortfolioUpdate) SetAccountID

func (pu *PortfolioUpdate) SetAccountID(value pulid.PULID) *PortfolioUpdate

SetAccountID sets the "account_id" field.

func (*PortfolioUpdate) SetDeletedAt

func (pu *PortfolioUpdate) SetDeletedAt(t time.Time) *PortfolioUpdate

SetDeletedAt sets the "deleted_at" field.

func (*PortfolioUpdate) SetInput

SetInput applies the change-set in the UpdatePortfolioInput on the PortfolioUpdate builder.

func (*PortfolioUpdate) SetIsPublic

func (pu *PortfolioUpdate) SetIsPublic(b bool) *PortfolioUpdate

SetIsPublic sets the "is_public" field.

func (*PortfolioUpdate) SetIsVisible

func (pu *PortfolioUpdate) SetIsVisible(b bool) *PortfolioUpdate

SetIsVisible sets the "is_visible" field.

func (*PortfolioUpdate) SetName

func (pu *PortfolioUpdate) SetName(s string) *PortfolioUpdate

SetName sets the "name" field.

func (*PortfolioUpdate) SetNillableIsPublic

func (pu *PortfolioUpdate) SetNillableIsPublic(b *bool) *PortfolioUpdate

SetNillableIsPublic sets the "is_public" field if the given value is not nil.

func (*PortfolioUpdate) SetNillableIsVisible

func (pu *PortfolioUpdate) SetNillableIsVisible(b *bool) *PortfolioUpdate

SetNillableIsVisible sets the "is_visible" field if the given value is not nil.

func (*PortfolioUpdate) SetUpdatedAt

func (pu *PortfolioUpdate) SetUpdatedAt(t time.Time) *PortfolioUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PortfolioUpdate) Where

Where appends a list predicates to the PortfolioUpdate builder.

type PortfolioUpdateOne

type PortfolioUpdateOne struct {
	// contains filtered or unexported fields
}

PortfolioUpdateOne is the builder for updating a single Portfolio entity.

func (*PortfolioUpdateOne) AddConnectionIDs

func (puo *PortfolioUpdateOne) AddConnectionIDs(ids ...pulid.PULID) *PortfolioUpdateOne

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*PortfolioUpdateOne) AddConnections

func (puo *PortfolioUpdateOne) AddConnections(c ...*Connection) *PortfolioUpdateOne

AddConnections adds the "connections" edges to the Connection entity.

func (*PortfolioUpdateOne) AddTransactionIDs

func (puo *PortfolioUpdateOne) AddTransactionIDs(ids ...pulid.PULID) *PortfolioUpdateOne

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*PortfolioUpdateOne) AddTransactions

func (puo *PortfolioUpdateOne) AddTransactions(t ...*Transaction) *PortfolioUpdateOne

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*PortfolioUpdateOne) ClearAccount

func (puo *PortfolioUpdateOne) ClearAccount() *PortfolioUpdateOne

ClearAccount clears the "account" edge to the Account entity.

func (*PortfolioUpdateOne) ClearConnections

func (puo *PortfolioUpdateOne) ClearConnections() *PortfolioUpdateOne

ClearConnections clears all "connections" edges to the Connection entity.

func (*PortfolioUpdateOne) ClearDeletedAt

func (puo *PortfolioUpdateOne) ClearDeletedAt() *PortfolioUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*PortfolioUpdateOne) ClearTransactions

func (puo *PortfolioUpdateOne) ClearTransactions() *PortfolioUpdateOne

ClearTransactions clears all "transactions" edges to the Transaction entity.

func (*PortfolioUpdateOne) Exec

func (puo *PortfolioUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PortfolioUpdateOne) ExecX

func (puo *PortfolioUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PortfolioUpdateOne) Mutation

func (puo *PortfolioUpdateOne) Mutation() *PortfolioMutation

Mutation returns the PortfolioMutation object of the builder.

func (*PortfolioUpdateOne) RemoveConnectionIDs

func (puo *PortfolioUpdateOne) RemoveConnectionIDs(ids ...pulid.PULID) *PortfolioUpdateOne

RemoveConnectionIDs removes the "connections" edge to Connection entities by IDs.

func (*PortfolioUpdateOne) RemoveConnections

func (puo *PortfolioUpdateOne) RemoveConnections(c ...*Connection) *PortfolioUpdateOne

RemoveConnections removes "connections" edges to Connection entities.

func (*PortfolioUpdateOne) RemoveTransactionIDs

func (puo *PortfolioUpdateOne) RemoveTransactionIDs(ids ...pulid.PULID) *PortfolioUpdateOne

RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.

func (*PortfolioUpdateOne) RemoveTransactions

func (puo *PortfolioUpdateOne) RemoveTransactions(t ...*Transaction) *PortfolioUpdateOne

RemoveTransactions removes "transactions" edges to Transaction entities.

func (*PortfolioUpdateOne) Save

func (puo *PortfolioUpdateOne) Save(ctx context.Context) (*Portfolio, error)

Save executes the query and returns the updated Portfolio entity.

func (*PortfolioUpdateOne) SaveX

func (puo *PortfolioUpdateOne) SaveX(ctx context.Context) *Portfolio

SaveX is like Save, but panics if an error occurs.

func (*PortfolioUpdateOne) Select

func (puo *PortfolioUpdateOne) Select(field string, fields ...string) *PortfolioUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PortfolioUpdateOne) SetAccount

func (puo *PortfolioUpdateOne) SetAccount(a *Account) *PortfolioUpdateOne

SetAccount sets the "account" edge to the Account entity.

func (*PortfolioUpdateOne) SetAccountID

func (puo *PortfolioUpdateOne) SetAccountID(pu pulid.PULID) *PortfolioUpdateOne

SetAccountID sets the "account_id" field.

func (*PortfolioUpdateOne) SetDeletedAt

func (puo *PortfolioUpdateOne) SetDeletedAt(t time.Time) *PortfolioUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*PortfolioUpdateOne) SetInput

SetInput applies the change-set in the UpdatePortfolioInput on the PortfolioUpdateOne builder.

func (*PortfolioUpdateOne) SetIsPublic

func (puo *PortfolioUpdateOne) SetIsPublic(b bool) *PortfolioUpdateOne

SetIsPublic sets the "is_public" field.

func (*PortfolioUpdateOne) SetIsVisible

func (puo *PortfolioUpdateOne) SetIsVisible(b bool) *PortfolioUpdateOne

SetIsVisible sets the "is_visible" field.

func (*PortfolioUpdateOne) SetName

func (puo *PortfolioUpdateOne) SetName(s string) *PortfolioUpdateOne

SetName sets the "name" field.

func (*PortfolioUpdateOne) SetNillableIsPublic

func (puo *PortfolioUpdateOne) SetNillableIsPublic(b *bool) *PortfolioUpdateOne

SetNillableIsPublic sets the "is_public" field if the given value is not nil.

func (*PortfolioUpdateOne) SetNillableIsVisible

func (puo *PortfolioUpdateOne) SetNillableIsVisible(b *bool) *PortfolioUpdateOne

SetNillableIsVisible sets the "is_visible" field if the given value is not nil.

func (*PortfolioUpdateOne) SetUpdatedAt

func (puo *PortfolioUpdateOne) SetUpdatedAt(t time.Time) *PortfolioUpdateOne

SetUpdatedAt sets the "updated_at" field.

type PortfolioWhereInput

type PortfolioWhereInput struct {
	Predicates []predicate.Portfolio  `json:"-"`
	Not        *PortfolioWhereInput   `json:"not,omitempty"`
	Or         []*PortfolioWhereInput `json:"or,omitempty"`
	And        []*PortfolioWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "is_public" field predicates.
	IsPublic    *bool `json:"isPublic,omitempty"`
	IsPublicNEQ *bool `json:"isPublicNEQ,omitempty"`

	// "is_visible" field predicates.
	IsVisible    *bool `json:"isVisible,omitempty"`
	IsVisibleNEQ *bool `json:"isVisibleNEQ,omitempty"`

	// "account_id" field predicates.
	AccountID             *pulid.PULID  `json:"accountID,omitempty"`
	AccountIDNEQ          *pulid.PULID  `json:"accountIDNEQ,omitempty"`
	AccountIDIn           []pulid.PULID `json:"accountIDIn,omitempty"`
	AccountIDNotIn        []pulid.PULID `json:"accountIDNotIn,omitempty"`
	AccountIDGT           *pulid.PULID  `json:"accountIDGT,omitempty"`
	AccountIDGTE          *pulid.PULID  `json:"accountIDGTE,omitempty"`
	AccountIDLT           *pulid.PULID  `json:"accountIDLT,omitempty"`
	AccountIDLTE          *pulid.PULID  `json:"accountIDLTE,omitempty"`
	AccountIDContains     *pulid.PULID  `json:"accountIDContains,omitempty"`
	AccountIDHasPrefix    *pulid.PULID  `json:"accountIDHasPrefix,omitempty"`
	AccountIDHasSuffix    *pulid.PULID  `json:"accountIDHasSuffix,omitempty"`
	AccountIDEqualFold    *pulid.PULID  `json:"accountIDEqualFold,omitempty"`
	AccountIDContainsFold *pulid.PULID  `json:"accountIDContainsFold,omitempty"`

	// "account" edge predicates.
	HasAccount     *bool                `json:"hasAccount,omitempty"`
	HasAccountWith []*AccountWhereInput `json:"hasAccountWith,omitempty"`

	// "connections" edge predicates.
	HasConnections     *bool                   `json:"hasConnections,omitempty"`
	HasConnectionsWith []*ConnectionWhereInput `json:"hasConnectionsWith,omitempty"`
}

PortfolioWhereInput represents a where input for filtering Portfolio queries.

func (*PortfolioWhereInput) AddPredicates

func (i *PortfolioWhereInput) AddPredicates(predicates ...predicate.Portfolio)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*PortfolioWhereInput) Filter

Filter applies the PortfolioWhereInput filter on the PortfolioQuery builder.

func (*PortfolioWhereInput) P

P returns a predicate for filtering portfolios. An error is returned if the input is empty or invalid.

type Portfolios

type Portfolios []*Portfolio

Portfolios is a parsable slice of Portfolio.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type Source

type Source struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Icon holds the value of the "icon" field.
	Icon *string `json:"icon,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SourceQuery when eager-loading is set.
	Edges SourceEdges `json:"edges"`
	// contains filtered or unexported fields
}

Source is the model entity for the Source schema.

func (*Source) Connections

func (s *Source) Connections(ctx context.Context) ([]*Connection, error)

func (*Source) NamedConnections

func (s *Source) NamedConnections(name string) ([]*Connection, error)

NamedConnections returns the Connections named value or an error if the edge was not loaded in eager-loading with this name.

func (*Source) Node

func (s *Source) Node(ctx context.Context) (node *Node, err error)

func (*Source) QueryConnections

func (s *Source) QueryConnections() *ConnectionQuery

QueryConnections queries the "connections" edge of the Source entity.

func (*Source) QuerySourceType

func (s *Source) QuerySourceType() *SourceTypeQuery

QuerySourceType queries the "source_type" edge of the Source entity.

func (*Source) SourceType

func (s *Source) SourceType(ctx context.Context) (*SourceType, error)

func (*Source) String

func (s *Source) String() string

String implements the fmt.Stringer.

func (*Source) ToEdge

func (s *Source) ToEdge(order *SourceOrder) *SourceEdge

ToEdge converts Source into SourceEdge.

func (*Source) Unwrap

func (s *Source) Unwrap() *Source

Unwrap unwraps the Source entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Source) Update

func (s *Source) Update() *SourceUpdateOne

Update returns a builder for updating this Source. Note that you need to call Source.Unwrap() before calling this method if this Source was returned from a transaction, and the transaction was committed or rolled back.

type SourceClient

type SourceClient struct {
	// contains filtered or unexported fields
}

SourceClient is a client for the Source schema.

func NewSourceClient

func NewSourceClient(c config) *SourceClient

NewSourceClient returns a client for the Source from the given config.

func (*SourceClient) Create

func (c *SourceClient) Create() *SourceCreate

Create returns a builder for creating a Source entity.

func (*SourceClient) CreateBulk

func (c *SourceClient) CreateBulk(builders ...*SourceCreate) *SourceCreateBulk

CreateBulk returns a builder for creating a bulk of Source entities.

func (*SourceClient) Delete

func (c *SourceClient) Delete() *SourceDelete

Delete returns a delete builder for Source.

func (*SourceClient) DeleteOne

func (c *SourceClient) DeleteOne(s *Source) *SourceDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SourceClient) DeleteOneID

func (c *SourceClient) DeleteOneID(id pulid.PULID) *SourceDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*SourceClient) Get

func (c *SourceClient) Get(ctx context.Context, id pulid.PULID) (*Source, error)

Get returns a Source entity by its id.

func (*SourceClient) GetX

func (c *SourceClient) GetX(ctx context.Context, id pulid.PULID) *Source

GetX is like Get, but panics if an error occurs.

func (*SourceClient) Hooks

func (c *SourceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SourceClient) Query

func (c *SourceClient) Query() *SourceQuery

Query returns a query builder for Source.

func (*SourceClient) QueryConnections

func (c *SourceClient) QueryConnections(s *Source) *ConnectionQuery

QueryConnections queries the connections edge of a Source.

func (*SourceClient) QuerySourceType

func (c *SourceClient) QuerySourceType(s *Source) *SourceTypeQuery

QuerySourceType queries the source_type edge of a Source.

func (*SourceClient) Update

func (c *SourceClient) Update() *SourceUpdate

Update returns an update builder for Source.

func (*SourceClient) UpdateOne

func (c *SourceClient) UpdateOne(s *Source) *SourceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SourceClient) UpdateOneID

func (c *SourceClient) UpdateOneID(id pulid.PULID) *SourceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SourceClient) Use

func (c *SourceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `source.Hooks(f(g(h())))`.

type SourceConnection

type SourceConnection struct {
	Edges      []*SourceEdge `json:"edges"`
	PageInfo   PageInfo      `json:"pageInfo"`
	TotalCount int           `json:"totalCount"`
}

SourceConnection is the connection containing edges to Source.

type SourceCreate

type SourceCreate struct {
	// contains filtered or unexported fields
}

SourceCreate is the builder for creating a Source entity.

func (*SourceCreate) AddConnectionIDs

func (sc *SourceCreate) AddConnectionIDs(ids ...pulid.PULID) *SourceCreate

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*SourceCreate) AddConnections

func (sc *SourceCreate) AddConnections(c ...*Connection) *SourceCreate

AddConnections adds the "connections" edges to the Connection entity.

func (*SourceCreate) Exec

func (sc *SourceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceCreate) ExecX

func (sc *SourceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceCreate) Mutation

func (sc *SourceCreate) Mutation() *SourceMutation

Mutation returns the SourceMutation object of the builder.

func (*SourceCreate) Save

func (sc *SourceCreate) Save(ctx context.Context) (*Source, error)

Save creates the Source in the database.

func (*SourceCreate) SaveX

func (sc *SourceCreate) SaveX(ctx context.Context) *Source

SaveX calls Save and panics if Save returns an error.

func (*SourceCreate) SetCreatedAt

func (sc *SourceCreate) SetCreatedAt(t time.Time) *SourceCreate

SetCreatedAt sets the "created_at" field.

func (*SourceCreate) SetDeletedAt

func (sc *SourceCreate) SetDeletedAt(t time.Time) *SourceCreate

SetDeletedAt sets the "deleted_at" field.

func (*SourceCreate) SetID

func (sc *SourceCreate) SetID(pu pulid.PULID) *SourceCreate

SetID sets the "id" field.

func (*SourceCreate) SetIcon

func (sc *SourceCreate) SetIcon(s string) *SourceCreate

SetIcon sets the "icon" field.

func (*SourceCreate) SetInput

SetInput applies the change-set in the CreateSourceInput on the SourceCreate builder.

func (*SourceCreate) SetName

func (sc *SourceCreate) SetName(s string) *SourceCreate

SetName sets the "name" field.

func (*SourceCreate) SetNillableCreatedAt

func (sc *SourceCreate) SetNillableCreatedAt(t *time.Time) *SourceCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SourceCreate) SetNillableDeletedAt

func (sc *SourceCreate) SetNillableDeletedAt(t *time.Time) *SourceCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SourceCreate) SetNillableID

func (sc *SourceCreate) SetNillableID(pu *pulid.PULID) *SourceCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SourceCreate) SetNillableIcon

func (sc *SourceCreate) SetNillableIcon(s *string) *SourceCreate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*SourceCreate) SetNillableUpdatedAt

func (sc *SourceCreate) SetNillableUpdatedAt(t *time.Time) *SourceCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SourceCreate) SetSourceType

func (sc *SourceCreate) SetSourceType(s *SourceType) *SourceCreate

SetSourceType sets the "source_type" edge to the SourceType entity.

func (*SourceCreate) SetSourceTypeID

func (sc *SourceCreate) SetSourceTypeID(id pulid.PULID) *SourceCreate

SetSourceTypeID sets the "source_type" edge to the SourceType entity by ID.

func (*SourceCreate) SetUpdatedAt

func (sc *SourceCreate) SetUpdatedAt(t time.Time) *SourceCreate

SetUpdatedAt sets the "updated_at" field.

type SourceCreateBulk

type SourceCreateBulk struct {
	// contains filtered or unexported fields
}

SourceCreateBulk is the builder for creating many Source entities in bulk.

func (*SourceCreateBulk) Exec

func (scb *SourceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceCreateBulk) ExecX

func (scb *SourceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceCreateBulk) Save

func (scb *SourceCreateBulk) Save(ctx context.Context) ([]*Source, error)

Save creates the Source entities in the database.

func (*SourceCreateBulk) SaveX

func (scb *SourceCreateBulk) SaveX(ctx context.Context) []*Source

SaveX is like Save, but panics if an error occurs.

type SourceDelete

type SourceDelete struct {
	// contains filtered or unexported fields
}

SourceDelete is the builder for deleting a Source entity.

func (*SourceDelete) Exec

func (sd *SourceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SourceDelete) ExecX

func (sd *SourceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SourceDelete) Where

func (sd *SourceDelete) Where(ps ...predicate.Source) *SourceDelete

Where appends a list predicates to the SourceDelete builder.

type SourceDeleteOne

type SourceDeleteOne struct {
	// contains filtered or unexported fields
}

SourceDeleteOne is the builder for deleting a single Source entity.

func (*SourceDeleteOne) Exec

func (sdo *SourceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SourceDeleteOne) ExecX

func (sdo *SourceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SourceEdge

type SourceEdge struct {
	Node   *Source `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

SourceEdge is the edge representation of Source.

type SourceEdges

type SourceEdges struct {
	// Connections holds the value of the connections edge.
	Connections []*Connection `json:"connections,omitempty"`
	// SourceType holds the value of the source_type edge.
	SourceType *SourceType `json:"sourceType,omitempty"`
	// contains filtered or unexported fields
}

SourceEdges holds the relations/edges for other nodes in the graph.

func (SourceEdges) ConnectionsOrErr

func (e SourceEdges) ConnectionsOrErr() ([]*Connection, error)

ConnectionsOrErr returns the Connections value or an error if the edge was not loaded in eager-loading.

func (SourceEdges) SourceTypeOrErr

func (e SourceEdges) SourceTypeOrErr() (*SourceType, error)

SourceTypeOrErr returns the SourceType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SourceGroupBy

type SourceGroupBy struct {
	// contains filtered or unexported fields
}

SourceGroupBy is the group-by builder for Source entities.

func (*SourceGroupBy) Aggregate

func (sgb *SourceGroupBy) Aggregate(fns ...AggregateFunc) *SourceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SourceGroupBy) Bool

func (s *SourceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceGroupBy) BoolX

func (s *SourceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceGroupBy) Bools

func (s *SourceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceGroupBy) BoolsX

func (s *SourceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceGroupBy) Float64

func (s *SourceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceGroupBy) Float64X

func (s *SourceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceGroupBy) Float64s

func (s *SourceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceGroupBy) Float64sX

func (s *SourceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceGroupBy) Int

func (s *SourceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceGroupBy) IntX

func (s *SourceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceGroupBy) Ints

func (s *SourceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceGroupBy) IntsX

func (s *SourceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceGroupBy) Scan

func (sgb *SourceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*SourceGroupBy) ScanX

func (s *SourceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceGroupBy) String

func (s *SourceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceGroupBy) StringX

func (s *SourceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceGroupBy) Strings

func (s *SourceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceGroupBy) StringsX

func (s *SourceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceMutation

type SourceMutation struct {
	// contains filtered or unexported fields
}

SourceMutation represents an operation that mutates the Source nodes in the graph.

func (*SourceMutation) AddConnectionIDs

func (m *SourceMutation) AddConnectionIDs(ids ...pulid.PULID)

AddConnectionIDs adds the "connections" edge to the Connection entity by ids.

func (*SourceMutation) AddField

func (m *SourceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SourceMutation) AddedEdges

func (m *SourceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SourceMutation) AddedField

func (m *SourceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SourceMutation) AddedFields

func (m *SourceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SourceMutation) AddedIDs

func (m *SourceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SourceMutation) ClearConnections

func (m *SourceMutation) ClearConnections()

ClearConnections clears the "connections" edge to the Connection entity.

func (*SourceMutation) ClearDeletedAt

func (m *SourceMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SourceMutation) ClearEdge

func (m *SourceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*SourceMutation) ClearField

func (m *SourceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*SourceMutation) ClearIcon

func (m *SourceMutation) ClearIcon()

ClearIcon clears the value of the "icon" field.

func (*SourceMutation) ClearSourceType

func (m *SourceMutation) ClearSourceType()

ClearSourceType clears the "source_type" edge to the SourceType entity.

func (*SourceMutation) ClearedEdges

func (m *SourceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SourceMutation) ClearedFields

func (m *SourceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SourceMutation) Client

func (m SourceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*SourceMutation) ConnectionsCleared

func (m *SourceMutation) ConnectionsCleared() bool

ConnectionsCleared reports if the "connections" edge to the Connection entity was cleared.

func (*SourceMutation) ConnectionsIDs

func (m *SourceMutation) ConnectionsIDs() (ids []pulid.PULID)

ConnectionsIDs returns the "connections" edge IDs in the mutation.

func (*SourceMutation) CreatedAt

func (m *SourceMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SourceMutation) DeletedAt

func (m *SourceMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*SourceMutation) DeletedAtCleared

func (m *SourceMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*SourceMutation) EdgeCleared

func (m *SourceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SourceMutation) Field

func (m *SourceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SourceMutation) FieldCleared

func (m *SourceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SourceMutation) Fields

func (m *SourceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*SourceMutation) ID

func (m *SourceMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SourceMutation) IDs

func (m *SourceMutation) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SourceMutation) Icon

func (m *SourceMutation) Icon() (r string, exists bool)

Icon returns the value of the "icon" field in the mutation.

func (*SourceMutation) IconCleared

func (m *SourceMutation) IconCleared() bool

IconCleared returns if the "icon" field was cleared in this mutation.

func (*SourceMutation) Name

func (m *SourceMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SourceMutation) OldCreatedAt

func (m *SourceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceMutation) OldDeletedAt

func (m *SourceMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceMutation) OldField

func (m *SourceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SourceMutation) OldIcon

func (m *SourceMutation) OldIcon(ctx context.Context) (v *string, err error)

OldIcon returns the old "icon" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceMutation) OldName

func (m *SourceMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceMutation) OldUpdatedAt

func (m *SourceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceMutation) Op

func (m *SourceMutation) Op() Op

Op returns the operation name.

func (*SourceMutation) RemoveConnectionIDs

func (m *SourceMutation) RemoveConnectionIDs(ids ...pulid.PULID)

RemoveConnectionIDs removes the "connections" edge to the Connection entity by IDs.

func (*SourceMutation) RemovedConnectionsIDs

func (m *SourceMutation) RemovedConnectionsIDs() (ids []pulid.PULID)

RemovedConnections returns the removed IDs of the "connections" edge to the Connection entity.

func (*SourceMutation) RemovedEdges

func (m *SourceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SourceMutation) RemovedIDs

func (m *SourceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*SourceMutation) ResetConnections

func (m *SourceMutation) ResetConnections()

ResetConnections resets all changes to the "connections" edge.

func (*SourceMutation) ResetCreatedAt

func (m *SourceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SourceMutation) ResetDeletedAt

func (m *SourceMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SourceMutation) ResetEdge

func (m *SourceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*SourceMutation) ResetField

func (m *SourceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*SourceMutation) ResetIcon

func (m *SourceMutation) ResetIcon()

ResetIcon resets all changes to the "icon" field.

func (*SourceMutation) ResetName

func (m *SourceMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SourceMutation) ResetSourceType

func (m *SourceMutation) ResetSourceType()

ResetSourceType resets all changes to the "source_type" edge.

func (*SourceMutation) ResetUpdatedAt

func (m *SourceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SourceMutation) SetCreatedAt

func (m *SourceMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SourceMutation) SetDeletedAt

func (m *SourceMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*SourceMutation) SetField

func (m *SourceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SourceMutation) SetID

func (m *SourceMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Source entities.

func (*SourceMutation) SetIcon

func (m *SourceMutation) SetIcon(s string)

SetIcon sets the "icon" field.

func (*SourceMutation) SetName

func (m *SourceMutation) SetName(s string)

SetName sets the "name" field.

func (*SourceMutation) SetSourceTypeID

func (m *SourceMutation) SetSourceTypeID(id pulid.PULID)

SetSourceTypeID sets the "source_type" edge to the SourceType entity by id.

func (*SourceMutation) SetUpdatedAt

func (m *SourceMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SourceMutation) SourceTypeCleared

func (m *SourceMutation) SourceTypeCleared() bool

SourceTypeCleared reports if the "source_type" edge to the SourceType entity was cleared.

func (*SourceMutation) SourceTypeID

func (m *SourceMutation) SourceTypeID() (id pulid.PULID, exists bool)

SourceTypeID returns the "source_type" edge ID in the mutation.

func (*SourceMutation) SourceTypeIDs

func (m *SourceMutation) SourceTypeIDs() (ids []pulid.PULID)

SourceTypeIDs returns the "source_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceTypeID instead. It exists only for internal usage by the builders.

func (SourceMutation) Tx

func (m SourceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SourceMutation) Type

func (m *SourceMutation) Type() string

Type returns the node type of this mutation (Source).

func (*SourceMutation) UpdatedAt

func (m *SourceMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SourceMutation) Where

func (m *SourceMutation) Where(ps ...predicate.Source)

Where appends a list predicates to the SourceMutation builder.

type SourceOrder

type SourceOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *SourceOrderField `json:"field"`
}

SourceOrder defines the ordering of Source.

type SourceOrderField

type SourceOrderField struct {
	// contains filtered or unexported fields
}

SourceOrderField defines the ordering field of Source.

func (SourceOrderField) MarshalGQL

func (f SourceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (SourceOrderField) String

func (f SourceOrderField) String() string

String implement fmt.Stringer interface.

func (*SourceOrderField) UnmarshalGQL

func (f *SourceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type SourcePaginateOption

type SourcePaginateOption func(*sourcePager) error

SourcePaginateOption enables pagination customization.

func WithSourceFilter

func WithSourceFilter(filter func(*SourceQuery) (*SourceQuery, error)) SourcePaginateOption

WithSourceFilter configures pagination filter.

func WithSourceOrder

func WithSourceOrder(order *SourceOrder) SourcePaginateOption

WithSourceOrder configures pagination ordering.

type SourceQuery

type SourceQuery struct {
	// contains filtered or unexported fields
}

SourceQuery is the builder for querying Source entities.

func (*SourceQuery) All

func (sq *SourceQuery) All(ctx context.Context) ([]*Source, error)

All executes the query and returns a list of Sources.

func (*SourceQuery) AllX

func (sq *SourceQuery) AllX(ctx context.Context) []*Source

AllX is like All, but panics if an error occurs.

func (*SourceQuery) Clone

func (sq *SourceQuery) Clone() *SourceQuery

Clone returns a duplicate of the SourceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SourceQuery) CollectFields

func (s *SourceQuery) CollectFields(ctx context.Context, satisfies ...string) (*SourceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SourceQuery) Count

func (sq *SourceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SourceQuery) CountX

func (sq *SourceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SourceQuery) Exist

func (sq *SourceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SourceQuery) ExistX

func (sq *SourceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SourceQuery) First

func (sq *SourceQuery) First(ctx context.Context) (*Source, error)

First returns the first Source entity from the query. Returns a *NotFoundError when no Source was found.

func (*SourceQuery) FirstID

func (sq *SourceQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Source ID from the query. Returns a *NotFoundError when no Source ID was found.

func (*SourceQuery) FirstIDX

func (sq *SourceQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SourceQuery) FirstX

func (sq *SourceQuery) FirstX(ctx context.Context) *Source

FirstX is like First, but panics if an error occurs.

func (*SourceQuery) GroupBy

func (sq *SourceQuery) GroupBy(field string, fields ...string) *SourceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Source.Query().
	GroupBy(source.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SourceQuery) IDs

func (sq *SourceQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Source IDs.

func (*SourceQuery) IDsX

func (sq *SourceQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*SourceQuery) Limit

func (sq *SourceQuery) Limit(limit int) *SourceQuery

Limit adds a limit step to the query.

func (*SourceQuery) Offset

func (sq *SourceQuery) Offset(offset int) *SourceQuery

Offset adds an offset step to the query.

func (*SourceQuery) Only

func (sq *SourceQuery) Only(ctx context.Context) (*Source, error)

Only returns a single Source entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Source entity is found. Returns a *NotFoundError when no Source entities are found.

func (*SourceQuery) OnlyID

func (sq *SourceQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Source ID in the query. Returns a *NotSingularError when more than one Source ID is found. Returns a *NotFoundError when no entities are found.

func (*SourceQuery) OnlyIDX

func (sq *SourceQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SourceQuery) OnlyX

func (sq *SourceQuery) OnlyX(ctx context.Context) *Source

OnlyX is like Only, but panics if an error occurs.

func (*SourceQuery) Order

func (sq *SourceQuery) Order(o ...OrderFunc) *SourceQuery

Order adds an order step to the query.

func (*SourceQuery) Paginate

func (s *SourceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SourcePaginateOption,
) (*SourceConnection, error)

Paginate executes the query and returns a relay based cursor connection to Source.

func (*SourceQuery) QueryConnections

func (sq *SourceQuery) QueryConnections() *ConnectionQuery

QueryConnections chains the current query on the "connections" edge.

func (*SourceQuery) QuerySourceType

func (sq *SourceQuery) QuerySourceType() *SourceTypeQuery

QuerySourceType chains the current query on the "source_type" edge.

func (*SourceQuery) Select

func (sq *SourceQuery) Select(fields ...string) *SourceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Source.Query().
	Select(source.FieldCreatedAt).
	Scan(ctx, &v)

func (*SourceQuery) Unique

func (sq *SourceQuery) Unique(unique bool) *SourceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SourceQuery) Where

func (sq *SourceQuery) Where(ps ...predicate.Source) *SourceQuery

Where adds a new predicate for the SourceQuery builder.

func (*SourceQuery) WithConnections

func (sq *SourceQuery) WithConnections(opts ...func(*ConnectionQuery)) *SourceQuery

WithConnections tells the query-builder to eager-load the nodes that are connected to the "connections" edge. The optional arguments are used to configure the query builder of the edge.

func (*SourceQuery) WithNamedConnections

func (sq *SourceQuery) WithNamedConnections(name string, opts ...func(*ConnectionQuery)) *SourceQuery

WithNamedConnections tells the query-builder to eager-load the nodes that are connected to the "connections" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceQuery) WithSourceType

func (sq *SourceQuery) WithSourceType(opts ...func(*SourceTypeQuery)) *SourceQuery

WithSourceType tells the query-builder to eager-load the nodes that are connected to the "source_type" edge. The optional arguments are used to configure the query builder of the edge.

type SourceSelect

type SourceSelect struct {
	*SourceQuery
	// contains filtered or unexported fields
}

SourceSelect is the builder for selecting fields of Source entities.

func (*SourceSelect) Bool

func (s *SourceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceSelect) BoolX

func (s *SourceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceSelect) Bools

func (s *SourceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceSelect) BoolsX

func (s *SourceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceSelect) Float64

func (s *SourceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceSelect) Float64X

func (s *SourceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceSelect) Float64s

func (s *SourceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceSelect) Float64sX

func (s *SourceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceSelect) Int

func (s *SourceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceSelect) IntX

func (s *SourceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceSelect) Ints

func (s *SourceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceSelect) IntsX

func (s *SourceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceSelect) Scan

func (ss *SourceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SourceSelect) ScanX

func (s *SourceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceSelect) String

func (s *SourceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceSelect) StringX

func (s *SourceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceSelect) Strings

func (s *SourceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceSelect) StringsX

func (s *SourceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceType

type SourceType struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Value holds the value of the "value" field.
	Value sourcetype.Value `json:"value,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SourceTypeQuery when eager-loading is set.
	Edges SourceTypeEdges `json:"edges"`
	// contains filtered or unexported fields
}

SourceType is the model entity for the SourceType schema.

func (*SourceType) NamedSources

func (st *SourceType) NamedSources(name string) ([]*Source, error)

NamedSources returns the Sources named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceType) Node

func (st *SourceType) Node(ctx context.Context) (node *Node, err error)

func (*SourceType) QuerySources

func (st *SourceType) QuerySources() *SourceQuery

QuerySources queries the "sources" edge of the SourceType entity.

func (*SourceType) Sources

func (st *SourceType) Sources(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *SourceOrder,
) (*SourceConnection, error)

func (*SourceType) String

func (st *SourceType) String() string

String implements the fmt.Stringer.

func (*SourceType) ToEdge

func (st *SourceType) ToEdge(order *SourceTypeOrder) *SourceTypeEdge

ToEdge converts SourceType into SourceTypeEdge.

func (*SourceType) Unwrap

func (st *SourceType) Unwrap() *SourceType

Unwrap unwraps the SourceType entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*SourceType) Update

func (st *SourceType) Update() *SourceTypeUpdateOne

Update returns a builder for updating this SourceType. Note that you need to call SourceType.Unwrap() before calling this method if this SourceType was returned from a transaction, and the transaction was committed or rolled back.

type SourceTypeClient

type SourceTypeClient struct {
	// contains filtered or unexported fields
}

SourceTypeClient is a client for the SourceType schema.

func NewSourceTypeClient

func NewSourceTypeClient(c config) *SourceTypeClient

NewSourceTypeClient returns a client for the SourceType from the given config.

func (*SourceTypeClient) Create

func (c *SourceTypeClient) Create() *SourceTypeCreate

Create returns a builder for creating a SourceType entity.

func (*SourceTypeClient) CreateBulk

func (c *SourceTypeClient) CreateBulk(builders ...*SourceTypeCreate) *SourceTypeCreateBulk

CreateBulk returns a builder for creating a bulk of SourceType entities.

func (*SourceTypeClient) Delete

func (c *SourceTypeClient) Delete() *SourceTypeDelete

Delete returns a delete builder for SourceType.

func (*SourceTypeClient) DeleteOne

func (c *SourceTypeClient) DeleteOne(st *SourceType) *SourceTypeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SourceTypeClient) DeleteOneID

func (c *SourceTypeClient) DeleteOneID(id pulid.PULID) *SourceTypeDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*SourceTypeClient) Get

Get returns a SourceType entity by its id.

func (*SourceTypeClient) GetX

GetX is like Get, but panics if an error occurs.

func (*SourceTypeClient) Hooks

func (c *SourceTypeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SourceTypeClient) Query

func (c *SourceTypeClient) Query() *SourceTypeQuery

Query returns a query builder for SourceType.

func (*SourceTypeClient) QuerySources

func (c *SourceTypeClient) QuerySources(st *SourceType) *SourceQuery

QuerySources queries the sources edge of a SourceType.

func (*SourceTypeClient) Update

func (c *SourceTypeClient) Update() *SourceTypeUpdate

Update returns an update builder for SourceType.

func (*SourceTypeClient) UpdateOne

func (c *SourceTypeClient) UpdateOne(st *SourceType) *SourceTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SourceTypeClient) UpdateOneID

func (c *SourceTypeClient) UpdateOneID(id pulid.PULID) *SourceTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SourceTypeClient) Use

func (c *SourceTypeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sourcetype.Hooks(f(g(h())))`.

type SourceTypeConnection

type SourceTypeConnection struct {
	Edges      []*SourceTypeEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

SourceTypeConnection is the connection containing edges to SourceType.

type SourceTypeCreate

type SourceTypeCreate struct {
	// contains filtered or unexported fields
}

SourceTypeCreate is the builder for creating a SourceType entity.

func (*SourceTypeCreate) AddSourceIDs

func (stc *SourceTypeCreate) AddSourceIDs(ids ...pulid.PULID) *SourceTypeCreate

AddSourceIDs adds the "sources" edge to the Source entity by IDs.

func (*SourceTypeCreate) AddSources

func (stc *SourceTypeCreate) AddSources(s ...*Source) *SourceTypeCreate

AddSources adds the "sources" edges to the Source entity.

func (*SourceTypeCreate) Exec

func (stc *SourceTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceTypeCreate) ExecX

func (stc *SourceTypeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeCreate) Mutation

func (stc *SourceTypeCreate) Mutation() *SourceTypeMutation

Mutation returns the SourceTypeMutation object of the builder.

func (*SourceTypeCreate) Save

func (stc *SourceTypeCreate) Save(ctx context.Context) (*SourceType, error)

Save creates the SourceType in the database.

func (*SourceTypeCreate) SaveX

func (stc *SourceTypeCreate) SaveX(ctx context.Context) *SourceType

SaveX calls Save and panics if Save returns an error.

func (*SourceTypeCreate) SetCreatedAt

func (stc *SourceTypeCreate) SetCreatedAt(t time.Time) *SourceTypeCreate

SetCreatedAt sets the "created_at" field.

func (*SourceTypeCreate) SetDeletedAt

func (stc *SourceTypeCreate) SetDeletedAt(t time.Time) *SourceTypeCreate

SetDeletedAt sets the "deleted_at" field.

func (*SourceTypeCreate) SetDescription

func (stc *SourceTypeCreate) SetDescription(s string) *SourceTypeCreate

SetDescription sets the "description" field.

func (*SourceTypeCreate) SetID

func (stc *SourceTypeCreate) SetID(pu pulid.PULID) *SourceTypeCreate

SetID sets the "id" field.

func (*SourceTypeCreate) SetInput

SetInput applies the change-set in the CreateSourceTypeInput on the SourceTypeCreate builder.

func (*SourceTypeCreate) SetNillableCreatedAt

func (stc *SourceTypeCreate) SetNillableCreatedAt(t *time.Time) *SourceTypeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SourceTypeCreate) SetNillableDeletedAt

func (stc *SourceTypeCreate) SetNillableDeletedAt(t *time.Time) *SourceTypeCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SourceTypeCreate) SetNillableDescription

func (stc *SourceTypeCreate) SetNillableDescription(s *string) *SourceTypeCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SourceTypeCreate) SetNillableID

func (stc *SourceTypeCreate) SetNillableID(pu *pulid.PULID) *SourceTypeCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SourceTypeCreate) SetNillableUpdatedAt

func (stc *SourceTypeCreate) SetNillableUpdatedAt(t *time.Time) *SourceTypeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SourceTypeCreate) SetUpdatedAt

func (stc *SourceTypeCreate) SetUpdatedAt(t time.Time) *SourceTypeCreate

SetUpdatedAt sets the "updated_at" field.

func (*SourceTypeCreate) SetValue

SetValue sets the "value" field.

type SourceTypeCreateBulk

type SourceTypeCreateBulk struct {
	// contains filtered or unexported fields
}

SourceTypeCreateBulk is the builder for creating many SourceType entities in bulk.

func (*SourceTypeCreateBulk) Exec

func (stcb *SourceTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceTypeCreateBulk) ExecX

func (stcb *SourceTypeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeCreateBulk) Save

func (stcb *SourceTypeCreateBulk) Save(ctx context.Context) ([]*SourceType, error)

Save creates the SourceType entities in the database.

func (*SourceTypeCreateBulk) SaveX

func (stcb *SourceTypeCreateBulk) SaveX(ctx context.Context) []*SourceType

SaveX is like Save, but panics if an error occurs.

type SourceTypeDelete

type SourceTypeDelete struct {
	// contains filtered or unexported fields
}

SourceTypeDelete is the builder for deleting a SourceType entity.

func (*SourceTypeDelete) Exec

func (std *SourceTypeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SourceTypeDelete) ExecX

func (std *SourceTypeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeDelete) Where

Where appends a list predicates to the SourceTypeDelete builder.

type SourceTypeDeleteOne

type SourceTypeDeleteOne struct {
	// contains filtered or unexported fields
}

SourceTypeDeleteOne is the builder for deleting a single SourceType entity.

func (*SourceTypeDeleteOne) Exec

func (stdo *SourceTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SourceTypeDeleteOne) ExecX

func (stdo *SourceTypeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SourceTypeEdge

type SourceTypeEdge struct {
	Node   *SourceType `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

SourceTypeEdge is the edge representation of SourceType.

type SourceTypeEdges

type SourceTypeEdges struct {
	// Sources holds the value of the sources edge.
	Sources []*Source `json:"sources,omitempty"`
	// contains filtered or unexported fields
}

SourceTypeEdges holds the relations/edges for other nodes in the graph.

func (SourceTypeEdges) SourcesOrErr

func (e SourceTypeEdges) SourcesOrErr() ([]*Source, error)

SourcesOrErr returns the Sources value or an error if the edge was not loaded in eager-loading.

type SourceTypeGroupBy

type SourceTypeGroupBy struct {
	// contains filtered or unexported fields
}

SourceTypeGroupBy is the group-by builder for SourceType entities.

func (*SourceTypeGroupBy) Aggregate

func (stgb *SourceTypeGroupBy) Aggregate(fns ...AggregateFunc) *SourceTypeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SourceTypeGroupBy) Bool

func (s *SourceTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) BoolX

func (s *SourceTypeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceTypeGroupBy) Bools

func (s *SourceTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) BoolsX

func (s *SourceTypeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceTypeGroupBy) Float64

func (s *SourceTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) Float64X

func (s *SourceTypeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceTypeGroupBy) Float64s

func (s *SourceTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) Float64sX

func (s *SourceTypeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceTypeGroupBy) Int

func (s *SourceTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) IntX

func (s *SourceTypeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceTypeGroupBy) Ints

func (s *SourceTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) IntsX

func (s *SourceTypeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceTypeGroupBy) Scan

func (stgb *SourceTypeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*SourceTypeGroupBy) ScanX

func (s *SourceTypeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceTypeGroupBy) String

func (s *SourceTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) StringX

func (s *SourceTypeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceTypeGroupBy) Strings

func (s *SourceTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) StringsX

func (s *SourceTypeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceTypeMutation

type SourceTypeMutation struct {
	// contains filtered or unexported fields
}

SourceTypeMutation represents an operation that mutates the SourceType nodes in the graph.

func (*SourceTypeMutation) AddField

func (m *SourceTypeMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SourceTypeMutation) AddSourceIDs

func (m *SourceTypeMutation) AddSourceIDs(ids ...pulid.PULID)

AddSourceIDs adds the "sources" edge to the Source entity by ids.

func (*SourceTypeMutation) AddedEdges

func (m *SourceTypeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SourceTypeMutation) AddedField

func (m *SourceTypeMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SourceTypeMutation) AddedFields

func (m *SourceTypeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SourceTypeMutation) AddedIDs

func (m *SourceTypeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SourceTypeMutation) ClearDeletedAt

func (m *SourceTypeMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SourceTypeMutation) ClearDescription

func (m *SourceTypeMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*SourceTypeMutation) ClearEdge

func (m *SourceTypeMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*SourceTypeMutation) ClearField

func (m *SourceTypeMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*SourceTypeMutation) ClearSources

func (m *SourceTypeMutation) ClearSources()

ClearSources clears the "sources" edge to the Source entity.

func (*SourceTypeMutation) ClearedEdges

func (m *SourceTypeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SourceTypeMutation) ClearedFields

func (m *SourceTypeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SourceTypeMutation) Client

func (m SourceTypeMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*SourceTypeMutation) CreatedAt

func (m *SourceTypeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SourceTypeMutation) DeletedAt

func (m *SourceTypeMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*SourceTypeMutation) DeletedAtCleared

func (m *SourceTypeMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*SourceTypeMutation) Description

func (m *SourceTypeMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*SourceTypeMutation) DescriptionCleared

func (m *SourceTypeMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*SourceTypeMutation) EdgeCleared

func (m *SourceTypeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SourceTypeMutation) Field

func (m *SourceTypeMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SourceTypeMutation) FieldCleared

func (m *SourceTypeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SourceTypeMutation) Fields

func (m *SourceTypeMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*SourceTypeMutation) ID

func (m *SourceTypeMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SourceTypeMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SourceTypeMutation) OldCreatedAt

func (m *SourceTypeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the SourceType entity. If the SourceType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceTypeMutation) OldDeletedAt

func (m *SourceTypeMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the SourceType entity. If the SourceType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceTypeMutation) OldDescription

func (m *SourceTypeMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" field's value of the SourceType entity. If the SourceType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceTypeMutation) OldField

func (m *SourceTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SourceTypeMutation) OldUpdatedAt

func (m *SourceTypeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the SourceType entity. If the SourceType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceTypeMutation) OldValue

func (m *SourceTypeMutation) OldValue(ctx context.Context) (v sourcetype.Value, err error)

OldValue returns the old "value" field's value of the SourceType entity. If the SourceType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceTypeMutation) Op

func (m *SourceTypeMutation) Op() Op

Op returns the operation name.

func (*SourceTypeMutation) RemoveSourceIDs

func (m *SourceTypeMutation) RemoveSourceIDs(ids ...pulid.PULID)

RemoveSourceIDs removes the "sources" edge to the Source entity by IDs.

func (*SourceTypeMutation) RemovedEdges

func (m *SourceTypeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SourceTypeMutation) RemovedIDs

func (m *SourceTypeMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*SourceTypeMutation) RemovedSourcesIDs

func (m *SourceTypeMutation) RemovedSourcesIDs() (ids []pulid.PULID)

RemovedSources returns the removed IDs of the "sources" edge to the Source entity.

func (*SourceTypeMutation) ResetCreatedAt

func (m *SourceTypeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SourceTypeMutation) ResetDeletedAt

func (m *SourceTypeMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SourceTypeMutation) ResetDescription

func (m *SourceTypeMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*SourceTypeMutation) ResetEdge

func (m *SourceTypeMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*SourceTypeMutation) ResetField

func (m *SourceTypeMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*SourceTypeMutation) ResetSources

func (m *SourceTypeMutation) ResetSources()

ResetSources resets all changes to the "sources" edge.

func (*SourceTypeMutation) ResetUpdatedAt

func (m *SourceTypeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SourceTypeMutation) ResetValue

func (m *SourceTypeMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*SourceTypeMutation) SetCreatedAt

func (m *SourceTypeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SourceTypeMutation) SetDeletedAt

func (m *SourceTypeMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*SourceTypeMutation) SetDescription

func (m *SourceTypeMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*SourceTypeMutation) SetField

func (m *SourceTypeMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SourceTypeMutation) SetID

func (m *SourceTypeMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SourceType entities.

func (*SourceTypeMutation) SetUpdatedAt

func (m *SourceTypeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SourceTypeMutation) SetValue

func (m *SourceTypeMutation) SetValue(s sourcetype.Value)

SetValue sets the "value" field.

func (*SourceTypeMutation) SourcesCleared

func (m *SourceTypeMutation) SourcesCleared() bool

SourcesCleared reports if the "sources" edge to the Source entity was cleared.

func (*SourceTypeMutation) SourcesIDs

func (m *SourceTypeMutation) SourcesIDs() (ids []pulid.PULID)

SourcesIDs returns the "sources" edge IDs in the mutation.

func (SourceTypeMutation) Tx

func (m SourceTypeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SourceTypeMutation) Type

func (m *SourceTypeMutation) Type() string

Type returns the node type of this mutation (SourceType).

func (*SourceTypeMutation) UpdatedAt

func (m *SourceTypeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SourceTypeMutation) Value

func (m *SourceTypeMutation) Value() (r sourcetype.Value, exists bool)

Value returns the value of the "value" field in the mutation.

func (*SourceTypeMutation) Where

func (m *SourceTypeMutation) Where(ps ...predicate.SourceType)

Where appends a list predicates to the SourceTypeMutation builder.

type SourceTypeOrder

type SourceTypeOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *SourceTypeOrderField `json:"field"`
}

SourceTypeOrder defines the ordering of SourceType.

type SourceTypeOrderField

type SourceTypeOrderField struct {
	// contains filtered or unexported fields
}

SourceTypeOrderField defines the ordering field of SourceType.

func (SourceTypeOrderField) MarshalGQL

func (f SourceTypeOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (SourceTypeOrderField) String

func (f SourceTypeOrderField) String() string

String implement fmt.Stringer interface.

func (*SourceTypeOrderField) UnmarshalGQL

func (f *SourceTypeOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type SourceTypePaginateOption

type SourceTypePaginateOption func(*sourcetypePager) error

SourceTypePaginateOption enables pagination customization.

func WithSourceTypeFilter

func WithSourceTypeFilter(filter func(*SourceTypeQuery) (*SourceTypeQuery, error)) SourceTypePaginateOption

WithSourceTypeFilter configures pagination filter.

func WithSourceTypeOrder

func WithSourceTypeOrder(order *SourceTypeOrder) SourceTypePaginateOption

WithSourceTypeOrder configures pagination ordering.

type SourceTypeQuery

type SourceTypeQuery struct {
	// contains filtered or unexported fields
}

SourceTypeQuery is the builder for querying SourceType entities.

func (*SourceTypeQuery) All

func (stq *SourceTypeQuery) All(ctx context.Context) ([]*SourceType, error)

All executes the query and returns a list of SourceTypes.

func (*SourceTypeQuery) AllX

func (stq *SourceTypeQuery) AllX(ctx context.Context) []*SourceType

AllX is like All, but panics if an error occurs.

func (*SourceTypeQuery) Clone

func (stq *SourceTypeQuery) Clone() *SourceTypeQuery

Clone returns a duplicate of the SourceTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SourceTypeQuery) CollectFields

func (st *SourceTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*SourceTypeQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SourceTypeQuery) Count

func (stq *SourceTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SourceTypeQuery) CountX

func (stq *SourceTypeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SourceTypeQuery) Exist

func (stq *SourceTypeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SourceTypeQuery) ExistX

func (stq *SourceTypeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SourceTypeQuery) First

func (stq *SourceTypeQuery) First(ctx context.Context) (*SourceType, error)

First returns the first SourceType entity from the query. Returns a *NotFoundError when no SourceType was found.

func (*SourceTypeQuery) FirstID

func (stq *SourceTypeQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first SourceType ID from the query. Returns a *NotFoundError when no SourceType ID was found.

func (*SourceTypeQuery) FirstIDX

func (stq *SourceTypeQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SourceTypeQuery) FirstX

func (stq *SourceTypeQuery) FirstX(ctx context.Context) *SourceType

FirstX is like First, but panics if an error occurs.

func (*SourceTypeQuery) GroupBy

func (stq *SourceTypeQuery) GroupBy(field string, fields ...string) *SourceTypeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SourceType.Query().
	GroupBy(sourcetype.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SourceTypeQuery) IDs

func (stq *SourceTypeQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of SourceType IDs.

func (*SourceTypeQuery) IDsX

func (stq *SourceTypeQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*SourceTypeQuery) Limit

func (stq *SourceTypeQuery) Limit(limit int) *SourceTypeQuery

Limit adds a limit step to the query.

func (*SourceTypeQuery) Offset

func (stq *SourceTypeQuery) Offset(offset int) *SourceTypeQuery

Offset adds an offset step to the query.

func (*SourceTypeQuery) Only

func (stq *SourceTypeQuery) Only(ctx context.Context) (*SourceType, error)

Only returns a single SourceType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SourceType entity is found. Returns a *NotFoundError when no SourceType entities are found.

func (*SourceTypeQuery) OnlyID

func (stq *SourceTypeQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only SourceType ID in the query. Returns a *NotSingularError when more than one SourceType ID is found. Returns a *NotFoundError when no entities are found.

func (*SourceTypeQuery) OnlyIDX

func (stq *SourceTypeQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SourceTypeQuery) OnlyX

func (stq *SourceTypeQuery) OnlyX(ctx context.Context) *SourceType

OnlyX is like Only, but panics if an error occurs.

func (*SourceTypeQuery) Order

func (stq *SourceTypeQuery) Order(o ...OrderFunc) *SourceTypeQuery

Order adds an order step to the query.

func (*SourceTypeQuery) Paginate

func (st *SourceTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SourceTypePaginateOption,
) (*SourceTypeConnection, error)

Paginate executes the query and returns a relay based cursor connection to SourceType.

func (*SourceTypeQuery) QuerySources

func (stq *SourceTypeQuery) QuerySources() *SourceQuery

QuerySources chains the current query on the "sources" edge.

func (*SourceTypeQuery) Select

func (stq *SourceTypeQuery) Select(fields ...string) *SourceTypeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.SourceType.Query().
	Select(sourcetype.FieldCreatedAt).
	Scan(ctx, &v)

func (*SourceTypeQuery) Unique

func (stq *SourceTypeQuery) Unique(unique bool) *SourceTypeQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SourceTypeQuery) Where

Where adds a new predicate for the SourceTypeQuery builder.

func (*SourceTypeQuery) WithNamedSources

func (stq *SourceTypeQuery) WithNamedSources(name string, opts ...func(*SourceQuery)) *SourceTypeQuery

WithNamedSources tells the query-builder to eager-load the nodes that are connected to the "sources" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceTypeQuery) WithSources

func (stq *SourceTypeQuery) WithSources(opts ...func(*SourceQuery)) *SourceTypeQuery

WithSources tells the query-builder to eager-load the nodes that are connected to the "sources" edge. The optional arguments are used to configure the query builder of the edge.

type SourceTypeSelect

type SourceTypeSelect struct {
	*SourceTypeQuery
	// contains filtered or unexported fields
}

SourceTypeSelect is the builder for selecting fields of SourceType entities.

func (*SourceTypeSelect) Bool

func (s *SourceTypeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) BoolX

func (s *SourceTypeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceTypeSelect) Bools

func (s *SourceTypeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) BoolsX

func (s *SourceTypeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceTypeSelect) Float64

func (s *SourceTypeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) Float64X

func (s *SourceTypeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceTypeSelect) Float64s

func (s *SourceTypeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) Float64sX

func (s *SourceTypeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceTypeSelect) Int

func (s *SourceTypeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) IntX

func (s *SourceTypeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceTypeSelect) Ints

func (s *SourceTypeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) IntsX

func (s *SourceTypeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceTypeSelect) Scan

func (sts *SourceTypeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SourceTypeSelect) ScanX

func (s *SourceTypeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceTypeSelect) String

func (s *SourceTypeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) StringX

func (s *SourceTypeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceTypeSelect) Strings

func (s *SourceTypeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) StringsX

func (s *SourceTypeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceTypeUpdate

type SourceTypeUpdate struct {
	// contains filtered or unexported fields
}

SourceTypeUpdate is the builder for updating SourceType entities.

func (*SourceTypeUpdate) AddSourceIDs

func (stu *SourceTypeUpdate) AddSourceIDs(ids ...pulid.PULID) *SourceTypeUpdate

AddSourceIDs adds the "sources" edge to the Source entity by IDs.

func (*SourceTypeUpdate) AddSources

func (stu *SourceTypeUpdate) AddSources(s ...*Source) *SourceTypeUpdate

AddSources adds the "sources" edges to the Source entity.

func (*SourceTypeUpdate) ClearDeletedAt

func (stu *SourceTypeUpdate) ClearDeletedAt() *SourceTypeUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SourceTypeUpdate) ClearDescription

func (stu *SourceTypeUpdate) ClearDescription() *SourceTypeUpdate

ClearDescription clears the value of the "description" field.

func (*SourceTypeUpdate) ClearSources

func (stu *SourceTypeUpdate) ClearSources() *SourceTypeUpdate

ClearSources clears all "sources" edges to the Source entity.

func (*SourceTypeUpdate) Exec

func (stu *SourceTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceTypeUpdate) ExecX

func (stu *SourceTypeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeUpdate) Mutation

func (stu *SourceTypeUpdate) Mutation() *SourceTypeMutation

Mutation returns the SourceTypeMutation object of the builder.

func (*SourceTypeUpdate) RemoveSourceIDs

func (stu *SourceTypeUpdate) RemoveSourceIDs(ids ...pulid.PULID) *SourceTypeUpdate

RemoveSourceIDs removes the "sources" edge to Source entities by IDs.

func (*SourceTypeUpdate) RemoveSources

func (stu *SourceTypeUpdate) RemoveSources(s ...*Source) *SourceTypeUpdate

RemoveSources removes "sources" edges to Source entities.

func (*SourceTypeUpdate) Save

func (stu *SourceTypeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SourceTypeUpdate) SaveX

func (stu *SourceTypeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SourceTypeUpdate) SetDeletedAt

func (stu *SourceTypeUpdate) SetDeletedAt(t time.Time) *SourceTypeUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SourceTypeUpdate) SetDescription

func (stu *SourceTypeUpdate) SetDescription(s string) *SourceTypeUpdate

SetDescription sets the "description" field.

func (*SourceTypeUpdate) SetInput

SetInput applies the change-set in the UpdateSourceTypeInput on the SourceTypeUpdate builder.

func (*SourceTypeUpdate) SetNillableDescription

func (stu *SourceTypeUpdate) SetNillableDescription(s *string) *SourceTypeUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SourceTypeUpdate) SetUpdatedAt

func (stu *SourceTypeUpdate) SetUpdatedAt(t time.Time) *SourceTypeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SourceTypeUpdate) SetValue

SetValue sets the "value" field.

func (*SourceTypeUpdate) Where

Where appends a list predicates to the SourceTypeUpdate builder.

type SourceTypeUpdateOne

type SourceTypeUpdateOne struct {
	// contains filtered or unexported fields
}

SourceTypeUpdateOne is the builder for updating a single SourceType entity.

func (*SourceTypeUpdateOne) AddSourceIDs

func (stuo *SourceTypeUpdateOne) AddSourceIDs(ids ...pulid.PULID) *SourceTypeUpdateOne

AddSourceIDs adds the "sources" edge to the Source entity by IDs.

func (*SourceTypeUpdateOne) AddSources

func (stuo *SourceTypeUpdateOne) AddSources(s ...*Source) *SourceTypeUpdateOne

AddSources adds the "sources" edges to the Source entity.

func (*SourceTypeUpdateOne) ClearDeletedAt

func (stuo *SourceTypeUpdateOne) ClearDeletedAt() *SourceTypeUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SourceTypeUpdateOne) ClearDescription

func (stuo *SourceTypeUpdateOne) ClearDescription() *SourceTypeUpdateOne

ClearDescription clears the value of the "description" field.

func (*SourceTypeUpdateOne) ClearSources

func (stuo *SourceTypeUpdateOne) ClearSources() *SourceTypeUpdateOne

ClearSources clears all "sources" edges to the Source entity.

func (*SourceTypeUpdateOne) Exec

func (stuo *SourceTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SourceTypeUpdateOne) ExecX

func (stuo *SourceTypeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeUpdateOne) Mutation

func (stuo *SourceTypeUpdateOne) Mutation() *SourceTypeMutation

Mutation returns the SourceTypeMutation object of the builder.

func (*SourceTypeUpdateOne) RemoveSourceIDs

func (stuo *SourceTypeUpdateOne) RemoveSourceIDs(ids ...pulid.PULID) *SourceTypeUpdateOne

RemoveSourceIDs removes the "sources" edge to Source entities by IDs.

func (*SourceTypeUpdateOne) RemoveSources

func (stuo *SourceTypeUpdateOne) RemoveSources(s ...*Source) *SourceTypeUpdateOne

RemoveSources removes "sources" edges to Source entities.

func (*SourceTypeUpdateOne) Save

func (stuo *SourceTypeUpdateOne) Save(ctx context.Context) (*SourceType, error)

Save executes the query and returns the updated SourceType entity.

func (*SourceTypeUpdateOne) SaveX

func (stuo *SourceTypeUpdateOne) SaveX(ctx context.Context) *SourceType

SaveX is like Save, but panics if an error occurs.

func (*SourceTypeUpdateOne) Select

func (stuo *SourceTypeUpdateOne) Select(field string, fields ...string) *SourceTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SourceTypeUpdateOne) SetDeletedAt

func (stuo *SourceTypeUpdateOne) SetDeletedAt(t time.Time) *SourceTypeUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SourceTypeUpdateOne) SetDescription

func (stuo *SourceTypeUpdateOne) SetDescription(s string) *SourceTypeUpdateOne

SetDescription sets the "description" field.

func (*SourceTypeUpdateOne) SetInput

SetInput applies the change-set in the UpdateSourceTypeInput on the SourceTypeUpdateOne builder.

func (*SourceTypeUpdateOne) SetNillableDescription

func (stuo *SourceTypeUpdateOne) SetNillableDescription(s *string) *SourceTypeUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SourceTypeUpdateOne) SetUpdatedAt

func (stuo *SourceTypeUpdateOne) SetUpdatedAt(t time.Time) *SourceTypeUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SourceTypeUpdateOne) SetValue

SetValue sets the "value" field.

type SourceTypeWhereInput

type SourceTypeWhereInput struct {
	Predicates []predicate.SourceType  `json:"-"`
	Not        *SourceTypeWhereInput   `json:"not,omitempty"`
	Or         []*SourceTypeWhereInput `json:"or,omitempty"`
	And        []*SourceTypeWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "value" field predicates.
	Value      *sourcetype.Value  `json:"value,omitempty"`
	ValueNEQ   *sourcetype.Value  `json:"valueNEQ,omitempty"`
	ValueIn    []sourcetype.Value `json:"valueIn,omitempty"`
	ValueNotIn []sourcetype.Value `json:"valueNotIn,omitempty"`

	// "description" field predicates.
	Description             *string  `json:"description,omitempty"`
	DescriptionNEQ          *string  `json:"descriptionNEQ,omitempty"`
	DescriptionIn           []string `json:"descriptionIn,omitempty"`
	DescriptionNotIn        []string `json:"descriptionNotIn,omitempty"`
	DescriptionGT           *string  `json:"descriptionGT,omitempty"`
	DescriptionGTE          *string  `json:"descriptionGTE,omitempty"`
	DescriptionLT           *string  `json:"descriptionLT,omitempty"`
	DescriptionLTE          *string  `json:"descriptionLTE,omitempty"`
	DescriptionContains     *string  `json:"descriptionContains,omitempty"`
	DescriptionHasPrefix    *string  `json:"descriptionHasPrefix,omitempty"`
	DescriptionHasSuffix    *string  `json:"descriptionHasSuffix,omitempty"`
	DescriptionIsNil        bool     `json:"descriptionIsNil,omitempty"`
	DescriptionNotNil       bool     `json:"descriptionNotNil,omitempty"`
	DescriptionEqualFold    *string  `json:"descriptionEqualFold,omitempty"`
	DescriptionContainsFold *string  `json:"descriptionContainsFold,omitempty"`
}

SourceTypeWhereInput represents a where input for filtering SourceType queries.

func (*SourceTypeWhereInput) AddPredicates

func (i *SourceTypeWhereInput) AddPredicates(predicates ...predicate.SourceType)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*SourceTypeWhereInput) Filter

Filter applies the SourceTypeWhereInput filter on the SourceTypeQuery builder.

func (*SourceTypeWhereInput) P

P returns a predicate for filtering sourcetypes. An error is returned if the input is empty or invalid.

type SourceTypes

type SourceTypes []*SourceType

SourceTypes is a parsable slice of SourceType.

type SourceUpdate

type SourceUpdate struct {
	// contains filtered or unexported fields
}

SourceUpdate is the builder for updating Source entities.

func (*SourceUpdate) AddConnectionIDs

func (su *SourceUpdate) AddConnectionIDs(ids ...pulid.PULID) *SourceUpdate

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*SourceUpdate) AddConnections

func (su *SourceUpdate) AddConnections(c ...*Connection) *SourceUpdate

AddConnections adds the "connections" edges to the Connection entity.

func (*SourceUpdate) ClearConnections

func (su *SourceUpdate) ClearConnections() *SourceUpdate

ClearConnections clears all "connections" edges to the Connection entity.

func (*SourceUpdate) ClearDeletedAt

func (su *SourceUpdate) ClearDeletedAt() *SourceUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SourceUpdate) ClearIcon

func (su *SourceUpdate) ClearIcon() *SourceUpdate

ClearIcon clears the value of the "icon" field.

func (*SourceUpdate) ClearSourceType

func (su *SourceUpdate) ClearSourceType() *SourceUpdate

ClearSourceType clears the "source_type" edge to the SourceType entity.

func (*SourceUpdate) Exec

func (su *SourceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceUpdate) ExecX

func (su *SourceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceUpdate) Mutation

func (su *SourceUpdate) Mutation() *SourceMutation

Mutation returns the SourceMutation object of the builder.

func (*SourceUpdate) RemoveConnectionIDs

func (su *SourceUpdate) RemoveConnectionIDs(ids ...pulid.PULID) *SourceUpdate

RemoveConnectionIDs removes the "connections" edge to Connection entities by IDs.

func (*SourceUpdate) RemoveConnections

func (su *SourceUpdate) RemoveConnections(c ...*Connection) *SourceUpdate

RemoveConnections removes "connections" edges to Connection entities.

func (*SourceUpdate) Save

func (su *SourceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SourceUpdate) SaveX

func (su *SourceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SourceUpdate) SetDeletedAt

func (su *SourceUpdate) SetDeletedAt(t time.Time) *SourceUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SourceUpdate) SetIcon

func (su *SourceUpdate) SetIcon(s string) *SourceUpdate

SetIcon sets the "icon" field.

func (*SourceUpdate) SetInput

SetInput applies the change-set in the UpdateSourceInput on the SourceUpdate builder.

func (*SourceUpdate) SetName

func (su *SourceUpdate) SetName(s string) *SourceUpdate

SetName sets the "name" field.

func (*SourceUpdate) SetNillableIcon

func (su *SourceUpdate) SetNillableIcon(s *string) *SourceUpdate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*SourceUpdate) SetSourceType

func (su *SourceUpdate) SetSourceType(s *SourceType) *SourceUpdate

SetSourceType sets the "source_type" edge to the SourceType entity.

func (*SourceUpdate) SetSourceTypeID

func (su *SourceUpdate) SetSourceTypeID(id pulid.PULID) *SourceUpdate

SetSourceTypeID sets the "source_type" edge to the SourceType entity by ID.

func (*SourceUpdate) SetUpdatedAt

func (su *SourceUpdate) SetUpdatedAt(t time.Time) *SourceUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SourceUpdate) Where

func (su *SourceUpdate) Where(ps ...predicate.Source) *SourceUpdate

Where appends a list predicates to the SourceUpdate builder.

type SourceUpdateOne

type SourceUpdateOne struct {
	// contains filtered or unexported fields
}

SourceUpdateOne is the builder for updating a single Source entity.

func (*SourceUpdateOne) AddConnectionIDs

func (suo *SourceUpdateOne) AddConnectionIDs(ids ...pulid.PULID) *SourceUpdateOne

AddConnectionIDs adds the "connections" edge to the Connection entity by IDs.

func (*SourceUpdateOne) AddConnections

func (suo *SourceUpdateOne) AddConnections(c ...*Connection) *SourceUpdateOne

AddConnections adds the "connections" edges to the Connection entity.

func (*SourceUpdateOne) ClearConnections

func (suo *SourceUpdateOne) ClearConnections() *SourceUpdateOne

ClearConnections clears all "connections" edges to the Connection entity.

func (*SourceUpdateOne) ClearDeletedAt

func (suo *SourceUpdateOne) ClearDeletedAt() *SourceUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SourceUpdateOne) ClearIcon

func (suo *SourceUpdateOne) ClearIcon() *SourceUpdateOne

ClearIcon clears the value of the "icon" field.

func (*SourceUpdateOne) ClearSourceType

func (suo *SourceUpdateOne) ClearSourceType() *SourceUpdateOne

ClearSourceType clears the "source_type" edge to the SourceType entity.

func (*SourceUpdateOne) Exec

func (suo *SourceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SourceUpdateOne) ExecX

func (suo *SourceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceUpdateOne) Mutation

func (suo *SourceUpdateOne) Mutation() *SourceMutation

Mutation returns the SourceMutation object of the builder.

func (*SourceUpdateOne) RemoveConnectionIDs

func (suo *SourceUpdateOne) RemoveConnectionIDs(ids ...pulid.PULID) *SourceUpdateOne

RemoveConnectionIDs removes the "connections" edge to Connection entities by IDs.

func (*SourceUpdateOne) RemoveConnections

func (suo *SourceUpdateOne) RemoveConnections(c ...*Connection) *SourceUpdateOne

RemoveConnections removes "connections" edges to Connection entities.

func (*SourceUpdateOne) Save

func (suo *SourceUpdateOne) Save(ctx context.Context) (*Source, error)

Save executes the query and returns the updated Source entity.

func (*SourceUpdateOne) SaveX

func (suo *SourceUpdateOne) SaveX(ctx context.Context) *Source

SaveX is like Save, but panics if an error occurs.

func (*SourceUpdateOne) Select

func (suo *SourceUpdateOne) Select(field string, fields ...string) *SourceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SourceUpdateOne) SetDeletedAt

func (suo *SourceUpdateOne) SetDeletedAt(t time.Time) *SourceUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SourceUpdateOne) SetIcon

func (suo *SourceUpdateOne) SetIcon(s string) *SourceUpdateOne

SetIcon sets the "icon" field.

func (*SourceUpdateOne) SetInput

SetInput applies the change-set in the UpdateSourceInput on the SourceUpdateOne builder.

func (*SourceUpdateOne) SetName

func (suo *SourceUpdateOne) SetName(s string) *SourceUpdateOne

SetName sets the "name" field.

func (*SourceUpdateOne) SetNillableIcon

func (suo *SourceUpdateOne) SetNillableIcon(s *string) *SourceUpdateOne

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*SourceUpdateOne) SetSourceType

func (suo *SourceUpdateOne) SetSourceType(s *SourceType) *SourceUpdateOne

SetSourceType sets the "source_type" edge to the SourceType entity.

func (*SourceUpdateOne) SetSourceTypeID

func (suo *SourceUpdateOne) SetSourceTypeID(id pulid.PULID) *SourceUpdateOne

SetSourceTypeID sets the "source_type" edge to the SourceType entity by ID.

func (*SourceUpdateOne) SetUpdatedAt

func (suo *SourceUpdateOne) SetUpdatedAt(t time.Time) *SourceUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SourceWhereInput

type SourceWhereInput struct {
	Predicates []predicate.Source  `json:"-"`
	Not        *SourceWhereInput   `json:"not,omitempty"`
	Or         []*SourceWhereInput `json:"or,omitempty"`
	And        []*SourceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "source_type" edge predicates.
	HasSourceType     *bool                   `json:"hasSourceType,omitempty"`
	HasSourceTypeWith []*SourceTypeWhereInput `json:"hasSourceTypeWith,omitempty"`
}

SourceWhereInput represents a where input for filtering Source queries.

func (*SourceWhereInput) AddPredicates

func (i *SourceWhereInput) AddPredicates(predicates ...predicate.Source)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*SourceWhereInput) Filter

func (i *SourceWhereInput) Filter(q *SourceQuery) (*SourceQuery, error)

Filter applies the SourceWhereInput filter on the SourceQuery builder.

func (*SourceWhereInput) P

P returns a predicate for filtering sources. An error is returned if the input is empty or invalid.

type Sources

type Sources []*Source

Sources is a parsable slice of Source.

type StaffAccount

type StaffAccount struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Nickname holds the value of the "nickname" field.
	Nickname string `json:"nickname,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// EmailConfirmed holds the value of the "email_confirmed" field.
	EmailConfirmed bool `json:"emailConfirmed,omitempty"`
	// Password holds the value of the "password" field.
	Password *string `json:"-"`
	// PasswordUpdatedAt holds the value of the "password_updated_at" field.
	PasswordUpdatedAt *time.Time `json:"passwordUpdatedAt,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StaffAccountQuery when eager-loading is set.
	Edges StaffAccountEdges `json:"edges"`
	// contains filtered or unexported fields
}

StaffAccount is the model entity for the StaffAccount schema.

func (*StaffAccount) AuthRoles

func (sa *StaffAccount) AuthRoles(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AuthRoleOrder, where *AuthRoleWhereInput,
) (*AuthRoleConnection, error)

func (*StaffAccount) AuthType

func (sa *StaffAccount) AuthType(ctx context.Context) (*AuthType, error)

func (*StaffAccount) NamedAuthRoles

func (sa *StaffAccount) NamedAuthRoles(name string) ([]*AuthRole, error)

NamedAuthRoles returns the AuthRoles named value or an error if the edge was not loaded in eager-loading with this name.

func (*StaffAccount) Node

func (sa *StaffAccount) Node(ctx context.Context) (node *Node, err error)

func (*StaffAccount) QueryAuthRoles

func (sa *StaffAccount) QueryAuthRoles() *AuthRoleQuery

QueryAuthRoles queries the "auth_roles" edge of the StaffAccount entity.

func (*StaffAccount) QueryAuthType

func (sa *StaffAccount) QueryAuthType() *AuthTypeQuery

QueryAuthType queries the "auth_type" edge of the StaffAccount entity.

func (*StaffAccount) String

func (sa *StaffAccount) String() string

String implements the fmt.Stringer.

func (*StaffAccount) ToEdge

func (sa *StaffAccount) ToEdge(order *StaffAccountOrder) *StaffAccountEdge

ToEdge converts StaffAccount into StaffAccountEdge.

func (*StaffAccount) Unwrap

func (sa *StaffAccount) Unwrap() *StaffAccount

Unwrap unwraps the StaffAccount entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*StaffAccount) Update

func (sa *StaffAccount) Update() *StaffAccountUpdateOne

Update returns a builder for updating this StaffAccount. Note that you need to call StaffAccount.Unwrap() before calling this method if this StaffAccount was returned from a transaction, and the transaction was committed or rolled back.

type StaffAccountClient

type StaffAccountClient struct {
	// contains filtered or unexported fields
}

StaffAccountClient is a client for the StaffAccount schema.

func NewStaffAccountClient

func NewStaffAccountClient(c config) *StaffAccountClient

NewStaffAccountClient returns a client for the StaffAccount from the given config.

func (*StaffAccountClient) Create

Create returns a builder for creating a StaffAccount entity.

func (*StaffAccountClient) CreateBulk

func (c *StaffAccountClient) CreateBulk(builders ...*StaffAccountCreate) *StaffAccountCreateBulk

CreateBulk returns a builder for creating a bulk of StaffAccount entities.

func (*StaffAccountClient) Delete

Delete returns a delete builder for StaffAccount.

func (*StaffAccountClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StaffAccountClient) DeleteOneID

DeleteOne returns a builder for deleting the given entity by its id.

func (*StaffAccountClient) Get

Get returns a StaffAccount entity by its id.

func (*StaffAccountClient) GetX

GetX is like Get, but panics if an error occurs.

func (*StaffAccountClient) Hooks

func (c *StaffAccountClient) Hooks() []Hook

Hooks returns the client hooks.

func (*StaffAccountClient) Query

Query returns a query builder for StaffAccount.

func (*StaffAccountClient) QueryAuthRoles

func (c *StaffAccountClient) QueryAuthRoles(sa *StaffAccount) *AuthRoleQuery

QueryAuthRoles queries the auth_roles edge of a StaffAccount.

func (*StaffAccountClient) QueryAuthType

func (c *StaffAccountClient) QueryAuthType(sa *StaffAccount) *AuthTypeQuery

QueryAuthType queries the auth_type edge of a StaffAccount.

func (*StaffAccountClient) Update

Update returns an update builder for StaffAccount.

func (*StaffAccountClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StaffAccountClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*StaffAccountClient) Use

func (c *StaffAccountClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `staffaccount.Hooks(f(g(h())))`.

type StaffAccountConnection

type StaffAccountConnection struct {
	Edges      []*StaffAccountEdge `json:"edges"`
	PageInfo   PageInfo            `json:"pageInfo"`
	TotalCount int                 `json:"totalCount"`
}

StaffAccountConnection is the connection containing edges to StaffAccount.

type StaffAccountCreate

type StaffAccountCreate struct {
	// contains filtered or unexported fields
}

StaffAccountCreate is the builder for creating a StaffAccount entity.

func (*StaffAccountCreate) AddAuthRoleIDs

func (sac *StaffAccountCreate) AddAuthRoleIDs(ids ...pulid.PULID) *StaffAccountCreate

AddAuthRoleIDs adds the "auth_roles" edge to the AuthRole entity by IDs.

func (*StaffAccountCreate) AddAuthRoles

func (sac *StaffAccountCreate) AddAuthRoles(a ...*AuthRole) *StaffAccountCreate

AddAuthRoles adds the "auth_roles" edges to the AuthRole entity.

func (*StaffAccountCreate) Exec

func (sac *StaffAccountCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*StaffAccountCreate) ExecX

func (sac *StaffAccountCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StaffAccountCreate) Mutation

func (sac *StaffAccountCreate) Mutation() *StaffAccountMutation

Mutation returns the StaffAccountMutation object of the builder.

func (*StaffAccountCreate) Save

Save creates the StaffAccount in the database.

func (*StaffAccountCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StaffAccountCreate) SetAuthType

func (sac *StaffAccountCreate) SetAuthType(a *AuthType) *StaffAccountCreate

SetAuthType sets the "auth_type" edge to the AuthType entity.

func (*StaffAccountCreate) SetAuthTypeID

func (sac *StaffAccountCreate) SetAuthTypeID(id pulid.PULID) *StaffAccountCreate

SetAuthTypeID sets the "auth_type" edge to the AuthType entity by ID.

func (*StaffAccountCreate) SetCreatedAt

func (sac *StaffAccountCreate) SetCreatedAt(t time.Time) *StaffAccountCreate

SetCreatedAt sets the "created_at" field.

func (*StaffAccountCreate) SetDeletedAt

func (sac *StaffAccountCreate) SetDeletedAt(t time.Time) *StaffAccountCreate

SetDeletedAt sets the "deleted_at" field.

func (*StaffAccountCreate) SetEmail

func (sac *StaffAccountCreate) SetEmail(s string) *StaffAccountCreate

SetEmail sets the "email" field.

func (*StaffAccountCreate) SetEmailConfirmed

func (sac *StaffAccountCreate) SetEmailConfirmed(b bool) *StaffAccountCreate

SetEmailConfirmed sets the "email_confirmed" field.

func (*StaffAccountCreate) SetID

SetID sets the "id" field.

func (*StaffAccountCreate) SetInput

SetInput applies the change-set in the CreateStaffAccountInput on the StaffAccountCreate builder.

func (*StaffAccountCreate) SetNickname

func (sac *StaffAccountCreate) SetNickname(s string) *StaffAccountCreate

SetNickname sets the "nickname" field.

func (*StaffAccountCreate) SetNillableCreatedAt

func (sac *StaffAccountCreate) SetNillableCreatedAt(t *time.Time) *StaffAccountCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*StaffAccountCreate) SetNillableDeletedAt

func (sac *StaffAccountCreate) SetNillableDeletedAt(t *time.Time) *StaffAccountCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*StaffAccountCreate) SetNillableEmailConfirmed

func (sac *StaffAccountCreate) SetNillableEmailConfirmed(b *bool) *StaffAccountCreate

SetNillableEmailConfirmed sets the "email_confirmed" field if the given value is not nil.

func (*StaffAccountCreate) SetNillableID

func (sac *StaffAccountCreate) SetNillableID(pu *pulid.PULID) *StaffAccountCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*StaffAccountCreate) SetNillablePassword

func (sac *StaffAccountCreate) SetNillablePassword(s *string) *StaffAccountCreate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*StaffAccountCreate) SetNillablePasswordUpdatedAt

func (sac *StaffAccountCreate) SetNillablePasswordUpdatedAt(t *time.Time) *StaffAccountCreate

SetNillablePasswordUpdatedAt sets the "password_updated_at" field if the given value is not nil.

func (*StaffAccountCreate) SetNillableUpdatedAt

func (sac *StaffAccountCreate) SetNillableUpdatedAt(t *time.Time) *StaffAccountCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*StaffAccountCreate) SetPassword

func (sac *StaffAccountCreate) SetPassword(s string) *StaffAccountCreate

SetPassword sets the "password" field.

func (*StaffAccountCreate) SetPasswordUpdatedAt

func (sac *StaffAccountCreate) SetPasswordUpdatedAt(t time.Time) *StaffAccountCreate

SetPasswordUpdatedAt sets the "password_updated_at" field.

func (*StaffAccountCreate) SetUpdatedAt

func (sac *StaffAccountCreate) SetUpdatedAt(t time.Time) *StaffAccountCreate

SetUpdatedAt sets the "updated_at" field.

type StaffAccountCreateBulk

type StaffAccountCreateBulk struct {
	// contains filtered or unexported fields
}

StaffAccountCreateBulk is the builder for creating many StaffAccount entities in bulk.

func (*StaffAccountCreateBulk) Exec

func (sacb *StaffAccountCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*StaffAccountCreateBulk) ExecX

func (sacb *StaffAccountCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StaffAccountCreateBulk) Save

Save creates the StaffAccount entities in the database.

func (*StaffAccountCreateBulk) SaveX

func (sacb *StaffAccountCreateBulk) SaveX(ctx context.Context) []*StaffAccount

SaveX is like Save, but panics if an error occurs.

type StaffAccountDelete

type StaffAccountDelete struct {
	// contains filtered or unexported fields
}

StaffAccountDelete is the builder for deleting a StaffAccount entity.

func (*StaffAccountDelete) Exec

func (sad *StaffAccountDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*StaffAccountDelete) ExecX

func (sad *StaffAccountDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*StaffAccountDelete) Where

Where appends a list predicates to the StaffAccountDelete builder.

type StaffAccountDeleteOne

type StaffAccountDeleteOne struct {
	// contains filtered or unexported fields
}

StaffAccountDeleteOne is the builder for deleting a single StaffAccount entity.

func (*StaffAccountDeleteOne) Exec

func (sado *StaffAccountDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*StaffAccountDeleteOne) ExecX

func (sado *StaffAccountDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type StaffAccountEdge

type StaffAccountEdge struct {
	Node   *StaffAccount `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

StaffAccountEdge is the edge representation of StaffAccount.

type StaffAccountEdges

type StaffAccountEdges struct {
	// AuthRoles holds the value of the auth_roles edge.
	AuthRoles []*AuthRole `json:"authRoles,omitempty"`
	// AuthType holds the value of the auth_type edge.
	AuthType *AuthType `json:"authType,omitempty"`
	// contains filtered or unexported fields
}

StaffAccountEdges holds the relations/edges for other nodes in the graph.

func (StaffAccountEdges) AuthRolesOrErr

func (e StaffAccountEdges) AuthRolesOrErr() ([]*AuthRole, error)

AuthRolesOrErr returns the AuthRoles value or an error if the edge was not loaded in eager-loading.

func (StaffAccountEdges) AuthTypeOrErr

func (e StaffAccountEdges) AuthTypeOrErr() (*AuthType, error)

AuthTypeOrErr returns the AuthType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type StaffAccountGroupBy

type StaffAccountGroupBy struct {
	// contains filtered or unexported fields
}

StaffAccountGroupBy is the group-by builder for StaffAccount entities.

func (*StaffAccountGroupBy) Aggregate

func (sagb *StaffAccountGroupBy) Aggregate(fns ...AggregateFunc) *StaffAccountGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*StaffAccountGroupBy) Bool

func (s *StaffAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StaffAccountGroupBy) BoolX

func (s *StaffAccountGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StaffAccountGroupBy) Bools

func (s *StaffAccountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StaffAccountGroupBy) BoolsX

func (s *StaffAccountGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StaffAccountGroupBy) Float64

func (s *StaffAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StaffAccountGroupBy) Float64X

func (s *StaffAccountGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StaffAccountGroupBy) Float64s

func (s *StaffAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StaffAccountGroupBy) Float64sX

func (s *StaffAccountGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StaffAccountGroupBy) Int

func (s *StaffAccountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StaffAccountGroupBy) IntX

func (s *StaffAccountGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StaffAccountGroupBy) Ints

func (s *StaffAccountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StaffAccountGroupBy) IntsX

func (s *StaffAccountGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StaffAccountGroupBy) Scan

func (sagb *StaffAccountGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*StaffAccountGroupBy) ScanX

func (s *StaffAccountGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StaffAccountGroupBy) String

func (s *StaffAccountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StaffAccountGroupBy) StringX

func (s *StaffAccountGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StaffAccountGroupBy) Strings

func (s *StaffAccountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StaffAccountGroupBy) StringsX

func (s *StaffAccountGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StaffAccountMutation

type StaffAccountMutation struct {
	// contains filtered or unexported fields
}

StaffAccountMutation represents an operation that mutates the StaffAccount nodes in the graph.

func (*StaffAccountMutation) AddAuthRoleIDs

func (m *StaffAccountMutation) AddAuthRoleIDs(ids ...pulid.PULID)

AddAuthRoleIDs adds the "auth_roles" edge to the AuthRole entity by ids.

func (*StaffAccountMutation) AddField

func (m *StaffAccountMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*StaffAccountMutation) AddedEdges

func (m *StaffAccountMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*StaffAccountMutation) AddedField

func (m *StaffAccountMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*StaffAccountMutation) AddedFields

func (m *StaffAccountMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*StaffAccountMutation) AddedIDs

func (m *StaffAccountMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*StaffAccountMutation) AuthRolesCleared

func (m *StaffAccountMutation) AuthRolesCleared() bool

AuthRolesCleared reports if the "auth_roles" edge to the AuthRole entity was cleared.

func (*StaffAccountMutation) AuthRolesIDs

func (m *StaffAccountMutation) AuthRolesIDs() (ids []pulid.PULID)

AuthRolesIDs returns the "auth_roles" edge IDs in the mutation.

func (*StaffAccountMutation) AuthTypeCleared

func (m *StaffAccountMutation) AuthTypeCleared() bool

AuthTypeCleared reports if the "auth_type" edge to the AuthType entity was cleared.

func (*StaffAccountMutation) AuthTypeID

func (m *StaffAccountMutation) AuthTypeID() (id pulid.PULID, exists bool)

AuthTypeID returns the "auth_type" edge ID in the mutation.

func (*StaffAccountMutation) AuthTypeIDs

func (m *StaffAccountMutation) AuthTypeIDs() (ids []pulid.PULID)

AuthTypeIDs returns the "auth_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthTypeID instead. It exists only for internal usage by the builders.

func (*StaffAccountMutation) ClearAuthRoles

func (m *StaffAccountMutation) ClearAuthRoles()

ClearAuthRoles clears the "auth_roles" edge to the AuthRole entity.

func (*StaffAccountMutation) ClearAuthType

func (m *StaffAccountMutation) ClearAuthType()

ClearAuthType clears the "auth_type" edge to the AuthType entity.

func (*StaffAccountMutation) ClearDeletedAt

func (m *StaffAccountMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*StaffAccountMutation) ClearEdge

func (m *StaffAccountMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*StaffAccountMutation) ClearField

func (m *StaffAccountMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*StaffAccountMutation) ClearPassword

func (m *StaffAccountMutation) ClearPassword()

ClearPassword clears the value of the "password" field.

func (*StaffAccountMutation) ClearPasswordUpdatedAt

func (m *StaffAccountMutation) ClearPasswordUpdatedAt()

ClearPasswordUpdatedAt clears the value of the "password_updated_at" field.

func (*StaffAccountMutation) ClearedEdges

func (m *StaffAccountMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*StaffAccountMutation) ClearedFields

func (m *StaffAccountMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (StaffAccountMutation) Client

func (m StaffAccountMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*StaffAccountMutation) CreatedAt

func (m *StaffAccountMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*StaffAccountMutation) DeletedAt

func (m *StaffAccountMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*StaffAccountMutation) DeletedAtCleared

func (m *StaffAccountMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*StaffAccountMutation) EdgeCleared

func (m *StaffAccountMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*StaffAccountMutation) Email

func (m *StaffAccountMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*StaffAccountMutation) EmailConfirmed

func (m *StaffAccountMutation) EmailConfirmed() (r bool, exists bool)

EmailConfirmed returns the value of the "email_confirmed" field in the mutation.

func (*StaffAccountMutation) Field

func (m *StaffAccountMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*StaffAccountMutation) FieldCleared

func (m *StaffAccountMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*StaffAccountMutation) Fields

func (m *StaffAccountMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*StaffAccountMutation) ID

func (m *StaffAccountMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*StaffAccountMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*StaffAccountMutation) Nickname

func (m *StaffAccountMutation) Nickname() (r string, exists bool)

Nickname returns the value of the "nickname" field in the mutation.

func (*StaffAccountMutation) OldCreatedAt

func (m *StaffAccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the StaffAccount entity. If the StaffAccount object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StaffAccountMutation) OldDeletedAt

func (m *StaffAccountMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the StaffAccount entity. If the StaffAccount object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StaffAccountMutation) OldEmail

func (m *StaffAccountMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the StaffAccount entity. If the StaffAccount object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StaffAccountMutation) OldEmailConfirmed

func (m *StaffAccountMutation) OldEmailConfirmed(ctx context.Context) (v bool, err error)

OldEmailConfirmed returns the old "email_confirmed" field's value of the StaffAccount entity. If the StaffAccount object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StaffAccountMutation) OldField

func (m *StaffAccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*StaffAccountMutation) OldNickname

func (m *StaffAccountMutation) OldNickname(ctx context.Context) (v string, err error)

OldNickname returns the old "nickname" field's value of the StaffAccount entity. If the StaffAccount object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StaffAccountMutation) OldPassword

func (m *StaffAccountMutation) OldPassword(ctx context.Context) (v *string, err error)

OldPassword returns the old "password" field's value of the StaffAccount entity. If the StaffAccount object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StaffAccountMutation) OldPasswordUpdatedAt

func (m *StaffAccountMutation) OldPasswordUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldPasswordUpdatedAt returns the old "password_updated_at" field's value of the StaffAccount entity. If the StaffAccount object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StaffAccountMutation) OldUpdatedAt

func (m *StaffAccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the StaffAccount entity. If the StaffAccount object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StaffAccountMutation) Op

func (m *StaffAccountMutation) Op() Op

Op returns the operation name.

func (*StaffAccountMutation) Password

func (m *StaffAccountMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*StaffAccountMutation) PasswordCleared

func (m *StaffAccountMutation) PasswordCleared() bool

PasswordCleared returns if the "password" field was cleared in this mutation.

func (*StaffAccountMutation) PasswordUpdatedAt

func (m *StaffAccountMutation) PasswordUpdatedAt() (r time.Time, exists bool)

PasswordUpdatedAt returns the value of the "password_updated_at" field in the mutation.

func (*StaffAccountMutation) PasswordUpdatedAtCleared

func (m *StaffAccountMutation) PasswordUpdatedAtCleared() bool

PasswordUpdatedAtCleared returns if the "password_updated_at" field was cleared in this mutation.

func (*StaffAccountMutation) RemoveAuthRoleIDs

func (m *StaffAccountMutation) RemoveAuthRoleIDs(ids ...pulid.PULID)

RemoveAuthRoleIDs removes the "auth_roles" edge to the AuthRole entity by IDs.

func (*StaffAccountMutation) RemovedAuthRolesIDs

func (m *StaffAccountMutation) RemovedAuthRolesIDs() (ids []pulid.PULID)

RemovedAuthRoles returns the removed IDs of the "auth_roles" edge to the AuthRole entity.

func (*StaffAccountMutation) RemovedEdges

func (m *StaffAccountMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*StaffAccountMutation) RemovedIDs

func (m *StaffAccountMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*StaffAccountMutation) ResetAuthRoles

func (m *StaffAccountMutation) ResetAuthRoles()

ResetAuthRoles resets all changes to the "auth_roles" edge.

func (*StaffAccountMutation) ResetAuthType

func (m *StaffAccountMutation) ResetAuthType()

ResetAuthType resets all changes to the "auth_type" edge.

func (*StaffAccountMutation) ResetCreatedAt

func (m *StaffAccountMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*StaffAccountMutation) ResetDeletedAt

func (m *StaffAccountMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*StaffAccountMutation) ResetEdge

func (m *StaffAccountMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*StaffAccountMutation) ResetEmail

func (m *StaffAccountMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*StaffAccountMutation) ResetEmailConfirmed

func (m *StaffAccountMutation) ResetEmailConfirmed()

ResetEmailConfirmed resets all changes to the "email_confirmed" field.

func (*StaffAccountMutation) ResetField

func (m *StaffAccountMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*StaffAccountMutation) ResetNickname

func (m *StaffAccountMutation) ResetNickname()

ResetNickname resets all changes to the "nickname" field.

func (*StaffAccountMutation) ResetPassword

func (m *StaffAccountMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*StaffAccountMutation) ResetPasswordUpdatedAt

func (m *StaffAccountMutation) ResetPasswordUpdatedAt()

ResetPasswordUpdatedAt resets all changes to the "password_updated_at" field.

func (*StaffAccountMutation) ResetUpdatedAt

func (m *StaffAccountMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*StaffAccountMutation) SetAuthTypeID

func (m *StaffAccountMutation) SetAuthTypeID(id pulid.PULID)

SetAuthTypeID sets the "auth_type" edge to the AuthType entity by id.

func (*StaffAccountMutation) SetCreatedAt

func (m *StaffAccountMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*StaffAccountMutation) SetDeletedAt

func (m *StaffAccountMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*StaffAccountMutation) SetEmail

func (m *StaffAccountMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*StaffAccountMutation) SetEmailConfirmed

func (m *StaffAccountMutation) SetEmailConfirmed(b bool)

SetEmailConfirmed sets the "email_confirmed" field.

func (*StaffAccountMutation) SetField

func (m *StaffAccountMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*StaffAccountMutation) SetID

func (m *StaffAccountMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of StaffAccount entities.

func (*StaffAccountMutation) SetNickname

func (m *StaffAccountMutation) SetNickname(s string)

SetNickname sets the "nickname" field.

func (*StaffAccountMutation) SetPassword

func (m *StaffAccountMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*StaffAccountMutation) SetPasswordUpdatedAt

func (m *StaffAccountMutation) SetPasswordUpdatedAt(t time.Time)

SetPasswordUpdatedAt sets the "password_updated_at" field.

func (*StaffAccountMutation) SetUpdatedAt

func (m *StaffAccountMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (StaffAccountMutation) Tx

func (m StaffAccountMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*StaffAccountMutation) Type

func (m *StaffAccountMutation) Type() string

Type returns the node type of this mutation (StaffAccount).

func (*StaffAccountMutation) UpdatedAt

func (m *StaffAccountMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*StaffAccountMutation) Where

Where appends a list predicates to the StaffAccountMutation builder.

type StaffAccountOrder

type StaffAccountOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *StaffAccountOrderField `json:"field"`
}

StaffAccountOrder defines the ordering of StaffAccount.

type StaffAccountOrderField

type StaffAccountOrderField struct {
	// contains filtered or unexported fields
}

StaffAccountOrderField defines the ordering field of StaffAccount.

func (StaffAccountOrderField) MarshalGQL

func (f StaffAccountOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (StaffAccountOrderField) String

func (f StaffAccountOrderField) String() string

String implement fmt.Stringer interface.

func (*StaffAccountOrderField) UnmarshalGQL

func (f *StaffAccountOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type StaffAccountPaginateOption

type StaffAccountPaginateOption func(*staffaccountPager) error

StaffAccountPaginateOption enables pagination customization.

func WithStaffAccountFilter

func WithStaffAccountFilter(filter func(*StaffAccountQuery) (*StaffAccountQuery, error)) StaffAccountPaginateOption

WithStaffAccountFilter configures pagination filter.

func WithStaffAccountOrder

func WithStaffAccountOrder(order *StaffAccountOrder) StaffAccountPaginateOption

WithStaffAccountOrder configures pagination ordering.

type StaffAccountQuery

type StaffAccountQuery struct {
	// contains filtered or unexported fields
}

StaffAccountQuery is the builder for querying StaffAccount entities.

func (*StaffAccountQuery) All

func (saq *StaffAccountQuery) All(ctx context.Context) ([]*StaffAccount, error)

All executes the query and returns a list of StaffAccounts.

func (*StaffAccountQuery) AllX

func (saq *StaffAccountQuery) AllX(ctx context.Context) []*StaffAccount

AllX is like All, but panics if an error occurs.

func (*StaffAccountQuery) Clone

func (saq *StaffAccountQuery) Clone() *StaffAccountQuery

Clone returns a duplicate of the StaffAccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*StaffAccountQuery) CollectFields

func (sa *StaffAccountQuery) CollectFields(ctx context.Context, satisfies ...string) (*StaffAccountQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*StaffAccountQuery) Count

func (saq *StaffAccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StaffAccountQuery) CountX

func (saq *StaffAccountQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*StaffAccountQuery) Exist

func (saq *StaffAccountQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*StaffAccountQuery) ExistX

func (saq *StaffAccountQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*StaffAccountQuery) First

func (saq *StaffAccountQuery) First(ctx context.Context) (*StaffAccount, error)

First returns the first StaffAccount entity from the query. Returns a *NotFoundError when no StaffAccount was found.

func (*StaffAccountQuery) FirstID

func (saq *StaffAccountQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first StaffAccount ID from the query. Returns a *NotFoundError when no StaffAccount ID was found.

func (*StaffAccountQuery) FirstIDX

func (saq *StaffAccountQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*StaffAccountQuery) FirstX

func (saq *StaffAccountQuery) FirstX(ctx context.Context) *StaffAccount

FirstX is like First, but panics if an error occurs.

func (*StaffAccountQuery) GroupBy

func (saq *StaffAccountQuery) GroupBy(field string, fields ...string) *StaffAccountGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.StaffAccount.Query().
	GroupBy(staffaccount.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StaffAccountQuery) IDs

func (saq *StaffAccountQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of StaffAccount IDs.

func (*StaffAccountQuery) IDsX

func (saq *StaffAccountQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*StaffAccountQuery) Limit

func (saq *StaffAccountQuery) Limit(limit int) *StaffAccountQuery

Limit adds a limit step to the query.

func (*StaffAccountQuery) Offset

func (saq *StaffAccountQuery) Offset(offset int) *StaffAccountQuery

Offset adds an offset step to the query.

func (*StaffAccountQuery) Only

func (saq *StaffAccountQuery) Only(ctx context.Context) (*StaffAccount, error)

Only returns a single StaffAccount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StaffAccount entity is found. Returns a *NotFoundError when no StaffAccount entities are found.

func (*StaffAccountQuery) OnlyID

func (saq *StaffAccountQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only StaffAccount ID in the query. Returns a *NotSingularError when more than one StaffAccount ID is found. Returns a *NotFoundError when no entities are found.

func (*StaffAccountQuery) OnlyIDX

func (saq *StaffAccountQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*StaffAccountQuery) OnlyX

func (saq *StaffAccountQuery) OnlyX(ctx context.Context) *StaffAccount

OnlyX is like Only, but panics if an error occurs.

func (*StaffAccountQuery) Order

func (saq *StaffAccountQuery) Order(o ...OrderFunc) *StaffAccountQuery

Order adds an order step to the query.

func (*StaffAccountQuery) Paginate

func (sa *StaffAccountQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...StaffAccountPaginateOption,
) (*StaffAccountConnection, error)

Paginate executes the query and returns a relay based cursor connection to StaffAccount.

func (*StaffAccountQuery) QueryAuthRoles

func (saq *StaffAccountQuery) QueryAuthRoles() *AuthRoleQuery

QueryAuthRoles chains the current query on the "auth_roles" edge.

func (*StaffAccountQuery) QueryAuthType

func (saq *StaffAccountQuery) QueryAuthType() *AuthTypeQuery

QueryAuthType chains the current query on the "auth_type" edge.

func (*StaffAccountQuery) Select

func (saq *StaffAccountQuery) Select(fields ...string) *StaffAccountSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.StaffAccount.Query().
	Select(staffaccount.FieldCreatedAt).
	Scan(ctx, &v)

func (*StaffAccountQuery) Unique

func (saq *StaffAccountQuery) Unique(unique bool) *StaffAccountQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*StaffAccountQuery) Where

Where adds a new predicate for the StaffAccountQuery builder.

func (*StaffAccountQuery) WithAuthRoles

func (saq *StaffAccountQuery) WithAuthRoles(opts ...func(*AuthRoleQuery)) *StaffAccountQuery

WithAuthRoles tells the query-builder to eager-load the nodes that are connected to the "auth_roles" edge. The optional arguments are used to configure the query builder of the edge.

func (*StaffAccountQuery) WithAuthType

func (saq *StaffAccountQuery) WithAuthType(opts ...func(*AuthTypeQuery)) *StaffAccountQuery

WithAuthType tells the query-builder to eager-load the nodes that are connected to the "auth_type" edge. The optional arguments are used to configure the query builder of the edge.

func (*StaffAccountQuery) WithNamedAuthRoles

func (saq *StaffAccountQuery) WithNamedAuthRoles(name string, opts ...func(*AuthRoleQuery)) *StaffAccountQuery

WithNamedAuthRoles tells the query-builder to eager-load the nodes that are connected to the "auth_roles" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type StaffAccountSelect

type StaffAccountSelect struct {
	*StaffAccountQuery
	// contains filtered or unexported fields
}

StaffAccountSelect is the builder for selecting fields of StaffAccount entities.

func (*StaffAccountSelect) Bool

func (s *StaffAccountSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StaffAccountSelect) BoolX

func (s *StaffAccountSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StaffAccountSelect) Bools

func (s *StaffAccountSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StaffAccountSelect) BoolsX

func (s *StaffAccountSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StaffAccountSelect) Float64

func (s *StaffAccountSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StaffAccountSelect) Float64X

func (s *StaffAccountSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StaffAccountSelect) Float64s

func (s *StaffAccountSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StaffAccountSelect) Float64sX

func (s *StaffAccountSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StaffAccountSelect) Int

func (s *StaffAccountSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StaffAccountSelect) IntX

func (s *StaffAccountSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StaffAccountSelect) Ints

func (s *StaffAccountSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StaffAccountSelect) IntsX

func (s *StaffAccountSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StaffAccountSelect) Scan

func (sas *StaffAccountSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StaffAccountSelect) ScanX

func (s *StaffAccountSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StaffAccountSelect) String

func (s *StaffAccountSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StaffAccountSelect) StringX

func (s *StaffAccountSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StaffAccountSelect) Strings

func (s *StaffAccountSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StaffAccountSelect) StringsX

func (s *StaffAccountSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StaffAccountUpdate

type StaffAccountUpdate struct {
	// contains filtered or unexported fields
}

StaffAccountUpdate is the builder for updating StaffAccount entities.

func (*StaffAccountUpdate) AddAuthRoleIDs

func (sau *StaffAccountUpdate) AddAuthRoleIDs(ids ...pulid.PULID) *StaffAccountUpdate

AddAuthRoleIDs adds the "auth_roles" edge to the AuthRole entity by IDs.

func (*StaffAccountUpdate) AddAuthRoles

func (sau *StaffAccountUpdate) AddAuthRoles(a ...*AuthRole) *StaffAccountUpdate

AddAuthRoles adds the "auth_roles" edges to the AuthRole entity.

func (*StaffAccountUpdate) ClearAuthRoles

func (sau *StaffAccountUpdate) ClearAuthRoles() *StaffAccountUpdate

ClearAuthRoles clears all "auth_roles" edges to the AuthRole entity.

func (*StaffAccountUpdate) ClearAuthType

func (sau *StaffAccountUpdate) ClearAuthType() *StaffAccountUpdate

ClearAuthType clears the "auth_type" edge to the AuthType entity.

func (*StaffAccountUpdate) ClearDeletedAt

func (sau *StaffAccountUpdate) ClearDeletedAt() *StaffAccountUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*StaffAccountUpdate) ClearPassword

func (sau *StaffAccountUpdate) ClearPassword() *StaffAccountUpdate

ClearPassword clears the value of the "password" field.

func (*StaffAccountUpdate) ClearPasswordUpdatedAt

func (sau *StaffAccountUpdate) ClearPasswordUpdatedAt() *StaffAccountUpdate

ClearPasswordUpdatedAt clears the value of the "password_updated_at" field.

func (*StaffAccountUpdate) Exec

func (sau *StaffAccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*StaffAccountUpdate) ExecX

func (sau *StaffAccountUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StaffAccountUpdate) Mutation

func (sau *StaffAccountUpdate) Mutation() *StaffAccountMutation

Mutation returns the StaffAccountMutation object of the builder.

func (*StaffAccountUpdate) RemoveAuthRoleIDs

func (sau *StaffAccountUpdate) RemoveAuthRoleIDs(ids ...pulid.PULID) *StaffAccountUpdate

RemoveAuthRoleIDs removes the "auth_roles" edge to AuthRole entities by IDs.

func (*StaffAccountUpdate) RemoveAuthRoles

func (sau *StaffAccountUpdate) RemoveAuthRoles(a ...*AuthRole) *StaffAccountUpdate

RemoveAuthRoles removes "auth_roles" edges to AuthRole entities.

func (*StaffAccountUpdate) Save

func (sau *StaffAccountUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*StaffAccountUpdate) SaveX

func (sau *StaffAccountUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*StaffAccountUpdate) SetAuthType

func (sau *StaffAccountUpdate) SetAuthType(a *AuthType) *StaffAccountUpdate

SetAuthType sets the "auth_type" edge to the AuthType entity.

func (*StaffAccountUpdate) SetAuthTypeID

func (sau *StaffAccountUpdate) SetAuthTypeID(id pulid.PULID) *StaffAccountUpdate

SetAuthTypeID sets the "auth_type" edge to the AuthType entity by ID.

func (*StaffAccountUpdate) SetDeletedAt

func (sau *StaffAccountUpdate) SetDeletedAt(t time.Time) *StaffAccountUpdate

SetDeletedAt sets the "deleted_at" field.

func (*StaffAccountUpdate) SetEmail

func (sau *StaffAccountUpdate) SetEmail(s string) *StaffAccountUpdate

SetEmail sets the "email" field.

func (*StaffAccountUpdate) SetEmailConfirmed

func (sau *StaffAccountUpdate) SetEmailConfirmed(b bool) *StaffAccountUpdate

SetEmailConfirmed sets the "email_confirmed" field.

func (*StaffAccountUpdate) SetInput

SetInput applies the change-set in the UpdateStaffAccountInput on the StaffAccountUpdate builder.

func (*StaffAccountUpdate) SetNickname

func (sau *StaffAccountUpdate) SetNickname(s string) *StaffAccountUpdate

SetNickname sets the "nickname" field.

func (*StaffAccountUpdate) SetNillableEmailConfirmed

func (sau *StaffAccountUpdate) SetNillableEmailConfirmed(b *bool) *StaffAccountUpdate

SetNillableEmailConfirmed sets the "email_confirmed" field if the given value is not nil.

func (*StaffAccountUpdate) SetNillablePassword

func (sau *StaffAccountUpdate) SetNillablePassword(s *string) *StaffAccountUpdate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*StaffAccountUpdate) SetPassword

func (sau *StaffAccountUpdate) SetPassword(s string) *StaffAccountUpdate

SetPassword sets the "password" field.

func (*StaffAccountUpdate) SetPasswordUpdatedAt

func (sau *StaffAccountUpdate) SetPasswordUpdatedAt(t time.Time) *StaffAccountUpdate

SetPasswordUpdatedAt sets the "password_updated_at" field.

func (*StaffAccountUpdate) SetUpdatedAt

func (sau *StaffAccountUpdate) SetUpdatedAt(t time.Time) *StaffAccountUpdate

SetUpdatedAt sets the "updated_at" field.

func (*StaffAccountUpdate) Where

Where appends a list predicates to the StaffAccountUpdate builder.

type StaffAccountUpdateOne

type StaffAccountUpdateOne struct {
	// contains filtered or unexported fields
}

StaffAccountUpdateOne is the builder for updating a single StaffAccount entity.

func (*StaffAccountUpdateOne) AddAuthRoleIDs

func (sauo *StaffAccountUpdateOne) AddAuthRoleIDs(ids ...pulid.PULID) *StaffAccountUpdateOne

AddAuthRoleIDs adds the "auth_roles" edge to the AuthRole entity by IDs.

func (*StaffAccountUpdateOne) AddAuthRoles

func (sauo *StaffAccountUpdateOne) AddAuthRoles(a ...*AuthRole) *StaffAccountUpdateOne

AddAuthRoles adds the "auth_roles" edges to the AuthRole entity.

func (*StaffAccountUpdateOne) ClearAuthRoles

func (sauo *StaffAccountUpdateOne) ClearAuthRoles() *StaffAccountUpdateOne

ClearAuthRoles clears all "auth_roles" edges to the AuthRole entity.

func (*StaffAccountUpdateOne) ClearAuthType

func (sauo *StaffAccountUpdateOne) ClearAuthType() *StaffAccountUpdateOne

ClearAuthType clears the "auth_type" edge to the AuthType entity.

func (*StaffAccountUpdateOne) ClearDeletedAt

func (sauo *StaffAccountUpdateOne) ClearDeletedAt() *StaffAccountUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*StaffAccountUpdateOne) ClearPassword

func (sauo *StaffAccountUpdateOne) ClearPassword() *StaffAccountUpdateOne

ClearPassword clears the value of the "password" field.

func (*StaffAccountUpdateOne) ClearPasswordUpdatedAt

func (sauo *StaffAccountUpdateOne) ClearPasswordUpdatedAt() *StaffAccountUpdateOne

ClearPasswordUpdatedAt clears the value of the "password_updated_at" field.

func (*StaffAccountUpdateOne) Exec

func (sauo *StaffAccountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*StaffAccountUpdateOne) ExecX

func (sauo *StaffAccountUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StaffAccountUpdateOne) Mutation

func (sauo *StaffAccountUpdateOne) Mutation() *StaffAccountMutation

Mutation returns the StaffAccountMutation object of the builder.

func (*StaffAccountUpdateOne) RemoveAuthRoleIDs

func (sauo *StaffAccountUpdateOne) RemoveAuthRoleIDs(ids ...pulid.PULID) *StaffAccountUpdateOne

RemoveAuthRoleIDs removes the "auth_roles" edge to AuthRole entities by IDs.

func (*StaffAccountUpdateOne) RemoveAuthRoles

func (sauo *StaffAccountUpdateOne) RemoveAuthRoles(a ...*AuthRole) *StaffAccountUpdateOne

RemoveAuthRoles removes "auth_roles" edges to AuthRole entities.

func (*StaffAccountUpdateOne) Save

Save executes the query and returns the updated StaffAccount entity.

func (*StaffAccountUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*StaffAccountUpdateOne) Select

func (sauo *StaffAccountUpdateOne) Select(field string, fields ...string) *StaffAccountUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*StaffAccountUpdateOne) SetAuthType

func (sauo *StaffAccountUpdateOne) SetAuthType(a *AuthType) *StaffAccountUpdateOne

SetAuthType sets the "auth_type" edge to the AuthType entity.

func (*StaffAccountUpdateOne) SetAuthTypeID

func (sauo *StaffAccountUpdateOne) SetAuthTypeID(id pulid.PULID) *StaffAccountUpdateOne

SetAuthTypeID sets the "auth_type" edge to the AuthType entity by ID.

func (*StaffAccountUpdateOne) SetDeletedAt

func (sauo *StaffAccountUpdateOne) SetDeletedAt(t time.Time) *StaffAccountUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*StaffAccountUpdateOne) SetEmail

SetEmail sets the "email" field.

func (*StaffAccountUpdateOne) SetEmailConfirmed

func (sauo *StaffAccountUpdateOne) SetEmailConfirmed(b bool) *StaffAccountUpdateOne

SetEmailConfirmed sets the "email_confirmed" field.

func (*StaffAccountUpdateOne) SetInput

SetInput applies the change-set in the UpdateStaffAccountInput on the StaffAccountUpdateOne builder.

func (*StaffAccountUpdateOne) SetNickname

func (sauo *StaffAccountUpdateOne) SetNickname(s string) *StaffAccountUpdateOne

SetNickname sets the "nickname" field.

func (*StaffAccountUpdateOne) SetNillableEmailConfirmed

func (sauo *StaffAccountUpdateOne) SetNillableEmailConfirmed(b *bool) *StaffAccountUpdateOne

SetNillableEmailConfirmed sets the "email_confirmed" field if the given value is not nil.

func (*StaffAccountUpdateOne) SetNillablePassword

func (sauo *StaffAccountUpdateOne) SetNillablePassword(s *string) *StaffAccountUpdateOne

SetNillablePassword sets the "password" field if the given value is not nil.

func (*StaffAccountUpdateOne) SetPassword

func (sauo *StaffAccountUpdateOne) SetPassword(s string) *StaffAccountUpdateOne

SetPassword sets the "password" field.

func (*StaffAccountUpdateOne) SetPasswordUpdatedAt

func (sauo *StaffAccountUpdateOne) SetPasswordUpdatedAt(t time.Time) *StaffAccountUpdateOne

SetPasswordUpdatedAt sets the "password_updated_at" field.

func (*StaffAccountUpdateOne) SetUpdatedAt

func (sauo *StaffAccountUpdateOne) SetUpdatedAt(t time.Time) *StaffAccountUpdateOne

SetUpdatedAt sets the "updated_at" field.

type StaffAccountWhereInput

type StaffAccountWhereInput struct {
	Predicates []predicate.StaffAccount  `json:"-"`
	Not        *StaffAccountWhereInput   `json:"not,omitempty"`
	Or         []*StaffAccountWhereInput `json:"or,omitempty"`
	And        []*StaffAccountWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "nickname" field predicates.
	Nickname             *string  `json:"nickname,omitempty"`
	NicknameNEQ          *string  `json:"nicknameNEQ,omitempty"`
	NicknameIn           []string `json:"nicknameIn,omitempty"`
	NicknameNotIn        []string `json:"nicknameNotIn,omitempty"`
	NicknameGT           *string  `json:"nicknameGT,omitempty"`
	NicknameGTE          *string  `json:"nicknameGTE,omitempty"`
	NicknameLT           *string  `json:"nicknameLT,omitempty"`
	NicknameLTE          *string  `json:"nicknameLTE,omitempty"`
	NicknameContains     *string  `json:"nicknameContains,omitempty"`
	NicknameHasPrefix    *string  `json:"nicknameHasPrefix,omitempty"`
	NicknameHasSuffix    *string  `json:"nicknameHasSuffix,omitempty"`
	NicknameEqualFold    *string  `json:"nicknameEqualFold,omitempty"`
	NicknameContainsFold *string  `json:"nicknameContainsFold,omitempty"`

	// "email" field predicates.
	Email             *string  `json:"email,omitempty"`
	EmailNEQ          *string  `json:"emailNEQ,omitempty"`
	EmailIn           []string `json:"emailIn,omitempty"`
	EmailNotIn        []string `json:"emailNotIn,omitempty"`
	EmailGT           *string  `json:"emailGT,omitempty"`
	EmailGTE          *string  `json:"emailGTE,omitempty"`
	EmailLT           *string  `json:"emailLT,omitempty"`
	EmailLTE          *string  `json:"emailLTE,omitempty"`
	EmailContains     *string  `json:"emailContains,omitempty"`
	EmailHasPrefix    *string  `json:"emailHasPrefix,omitempty"`
	EmailHasSuffix    *string  `json:"emailHasSuffix,omitempty"`
	EmailEqualFold    *string  `json:"emailEqualFold,omitempty"`
	EmailContainsFold *string  `json:"emailContainsFold,omitempty"`

	// "email_confirmed" field predicates.
	EmailConfirmed    *bool `json:"emailConfirmed,omitempty"`
	EmailConfirmedNEQ *bool `json:"emailConfirmedNEQ,omitempty"`

	// "password_updated_at" field predicates.
	PasswordUpdatedAt       *time.Time  `json:"passwordUpdatedAt,omitempty"`
	PasswordUpdatedAtNEQ    *time.Time  `json:"passwordUpdatedAtNEQ,omitempty"`
	PasswordUpdatedAtIn     []time.Time `json:"passwordUpdatedAtIn,omitempty"`
	PasswordUpdatedAtNotIn  []time.Time `json:"passwordUpdatedAtNotIn,omitempty"`
	PasswordUpdatedAtGT     *time.Time  `json:"passwordUpdatedAtGT,omitempty"`
	PasswordUpdatedAtGTE    *time.Time  `json:"passwordUpdatedAtGTE,omitempty"`
	PasswordUpdatedAtLT     *time.Time  `json:"passwordUpdatedAtLT,omitempty"`
	PasswordUpdatedAtLTE    *time.Time  `json:"passwordUpdatedAtLTE,omitempty"`
	PasswordUpdatedAtIsNil  bool        `json:"passwordUpdatedAtIsNil,omitempty"`
	PasswordUpdatedAtNotNil bool        `json:"passwordUpdatedAtNotNil,omitempty"`

	// "auth_roles" edge predicates.
	HasAuthRoles     *bool                 `json:"hasAuthRoles,omitempty"`
	HasAuthRolesWith []*AuthRoleWhereInput `json:"hasAuthRolesWith,omitempty"`

	// "auth_type" edge predicates.
	HasAuthType     *bool                 `json:"hasAuthType,omitempty"`
	HasAuthTypeWith []*AuthTypeWhereInput `json:"hasAuthTypeWith,omitempty"`
}

StaffAccountWhereInput represents a where input for filtering StaffAccount queries.

func (*StaffAccountWhereInput) AddPredicates

func (i *StaffAccountWhereInput) AddPredicates(predicates ...predicate.StaffAccount)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*StaffAccountWhereInput) Filter

Filter applies the StaffAccountWhereInput filter on the StaffAccountQuery builder.

func (*StaffAccountWhereInput) P

P returns a predicate for filtering staffaccounts. An error is returned if the input is empty or invalid.

type StaffAccounts

type StaffAccounts []*StaffAccount

StaffAccounts is a parsable slice of StaffAccount.

type Transaction

type Transaction struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Time holds the value of the "time" field.
	Time time.Time `json:"time,omitempty"`
	// Units holds the value of the "units" field.
	Units int `json:"units,omitempty"`
	// PricePerUnit holds the value of the "price_per_unit" field.
	PricePerUnit float64 `json:"pricePerUnit,omitempty"`
	// BlockchainID holds the value of the "blockchain_id" field.
	BlockchainID *pulid.PULID `json:"blockchainID,omitempty"`
	// ExchangeID holds the value of the "exchange_id" field.
	ExchangeID pulid.PULID `json:"exchangeID,omitempty"`
	// PortfolioID holds the value of the "portfolio_id" field.
	PortfolioID pulid.PULID `json:"portfolioID,omitempty"`
	// BaseAssetID holds the value of the "base_asset_id" field.
	BaseAssetID pulid.PULID `json:"baseAssetID,omitempty"`
	// QuoteAssetID holds the value of the "quote_asset_id" field.
	QuoteAssetID *pulid.PULID `json:"quoteAssetID,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TransactionQuery when eager-loading is set.
	Edges TransactionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Transaction is the model entity for the Transaction schema.

func (*Transaction) BaseAsset

func (t *Transaction) BaseAsset(ctx context.Context) (*Asset, error)

func (*Transaction) Blockchain

func (t *Transaction) Blockchain(ctx context.Context) (*Blockchain, error)

func (*Transaction) Exchange

func (t *Transaction) Exchange(ctx context.Context) (*Exchange, error)

func (*Transaction) Node

func (t *Transaction) Node(ctx context.Context) (node *Node, err error)

func (*Transaction) Portfolio

func (t *Transaction) Portfolio(ctx context.Context) (*Portfolio, error)

func (*Transaction) QueryBaseAsset

func (t *Transaction) QueryBaseAsset() *AssetQuery

QueryBaseAsset queries the "base_asset" edge of the Transaction entity.

func (*Transaction) QueryBlockchain

func (t *Transaction) QueryBlockchain() *BlockchainQuery

QueryBlockchain queries the "blockchain" edge of the Transaction entity.

func (*Transaction) QueryExchange

func (t *Transaction) QueryExchange() *ExchangeQuery

QueryExchange queries the "exchange" edge of the Transaction entity.

func (*Transaction) QueryPortfolio

func (t *Transaction) QueryPortfolio() *PortfolioQuery

QueryPortfolio queries the "portfolio" edge of the Transaction entity.

func (*Transaction) QueryQuoteAsset

func (t *Transaction) QueryQuoteAsset() *AssetQuery

QueryQuoteAsset queries the "quote_asset" edge of the Transaction entity.

func (*Transaction) QueryTransactionType

func (t *Transaction) QueryTransactionType() *TransactionTypeQuery

QueryTransactionType queries the "transaction_type" edge of the Transaction entity.

func (*Transaction) QuoteAsset

func (t *Transaction) QuoteAsset(ctx context.Context) (*Asset, error)

func (*Transaction) String

func (t *Transaction) String() string

String implements the fmt.Stringer.

func (*Transaction) ToEdge

func (t *Transaction) ToEdge(order *TransactionOrder) *TransactionEdge

ToEdge converts Transaction into TransactionEdge.

func (*Transaction) TransactionType

func (t *Transaction) TransactionType(ctx context.Context) (*TransactionType, error)

func (*Transaction) Unwrap

func (t *Transaction) Unwrap() *Transaction

Unwrap unwraps the Transaction entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Transaction) Update

func (t *Transaction) Update() *TransactionUpdateOne

Update returns a builder for updating this Transaction. Note that you need to call Transaction.Unwrap() before calling this method if this Transaction was returned from a transaction, and the transaction was committed or rolled back.

type TransactionClient

type TransactionClient struct {
	// contains filtered or unexported fields
}

TransactionClient is a client for the Transaction schema.

func NewTransactionClient

func NewTransactionClient(c config) *TransactionClient

NewTransactionClient returns a client for the Transaction from the given config.

func (*TransactionClient) Create

func (c *TransactionClient) Create() *TransactionCreate

Create returns a builder for creating a Transaction entity.

func (*TransactionClient) CreateBulk

func (c *TransactionClient) CreateBulk(builders ...*TransactionCreate) *TransactionCreateBulk

CreateBulk returns a builder for creating a bulk of Transaction entities.

func (*TransactionClient) Delete

func (c *TransactionClient) Delete() *TransactionDelete

Delete returns a delete builder for Transaction.

func (*TransactionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TransactionClient) DeleteOneID

func (c *TransactionClient) DeleteOneID(id pulid.PULID) *TransactionDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*TransactionClient) Get

Get returns a Transaction entity by its id.

func (*TransactionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*TransactionClient) Hooks

func (c *TransactionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TransactionClient) Query

func (c *TransactionClient) Query() *TransactionQuery

Query returns a query builder for Transaction.

func (*TransactionClient) QueryBaseAsset

func (c *TransactionClient) QueryBaseAsset(t *Transaction) *AssetQuery

QueryBaseAsset queries the base_asset edge of a Transaction.

func (*TransactionClient) QueryBlockchain

func (c *TransactionClient) QueryBlockchain(t *Transaction) *BlockchainQuery

QueryBlockchain queries the blockchain edge of a Transaction.

func (*TransactionClient) QueryExchange

func (c *TransactionClient) QueryExchange(t *Transaction) *ExchangeQuery

QueryExchange queries the exchange edge of a Transaction.

func (*TransactionClient) QueryPortfolio

func (c *TransactionClient) QueryPortfolio(t *Transaction) *PortfolioQuery

QueryPortfolio queries the portfolio edge of a Transaction.

func (*TransactionClient) QueryQuoteAsset

func (c *TransactionClient) QueryQuoteAsset(t *Transaction) *AssetQuery

QueryQuoteAsset queries the quote_asset edge of a Transaction.

func (*TransactionClient) QueryTransactionType

func (c *TransactionClient) QueryTransactionType(t *Transaction) *TransactionTypeQuery

QueryTransactionType queries the transaction_type edge of a Transaction.

func (*TransactionClient) Update

func (c *TransactionClient) Update() *TransactionUpdate

Update returns an update builder for Transaction.

func (*TransactionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TransactionClient) UpdateOneID

func (c *TransactionClient) UpdateOneID(id pulid.PULID) *TransactionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TransactionClient) Use

func (c *TransactionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `transaction.Hooks(f(g(h())))`.

type TransactionConnection

type TransactionConnection struct {
	Edges      []*TransactionEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

TransactionConnection is the connection containing edges to Transaction.

type TransactionCreate

type TransactionCreate struct {
	// contains filtered or unexported fields
}

TransactionCreate is the builder for creating a Transaction entity.

func (*TransactionCreate) Exec

func (tc *TransactionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TransactionCreate) ExecX

func (tc *TransactionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionCreate) Mutation

func (tc *TransactionCreate) Mutation() *TransactionMutation

Mutation returns the TransactionMutation object of the builder.

func (*TransactionCreate) Save

Save creates the Transaction in the database.

func (*TransactionCreate) SaveX

func (tc *TransactionCreate) SaveX(ctx context.Context) *Transaction

SaveX calls Save and panics if Save returns an error.

func (*TransactionCreate) SetBaseAsset

func (tc *TransactionCreate) SetBaseAsset(a *Asset) *TransactionCreate

SetBaseAsset sets the "base_asset" edge to the Asset entity.

func (*TransactionCreate) SetBaseAssetID

func (tc *TransactionCreate) SetBaseAssetID(pu pulid.PULID) *TransactionCreate

SetBaseAssetID sets the "base_asset_id" field.

func (*TransactionCreate) SetBlockchain

func (tc *TransactionCreate) SetBlockchain(b *Blockchain) *TransactionCreate

SetBlockchain sets the "blockchain" edge to the Blockchain entity.

func (*TransactionCreate) SetBlockchainID

func (tc *TransactionCreate) SetBlockchainID(pu pulid.PULID) *TransactionCreate

SetBlockchainID sets the "blockchain_id" field.

func (*TransactionCreate) SetCreatedAt

func (tc *TransactionCreate) SetCreatedAt(t time.Time) *TransactionCreate

SetCreatedAt sets the "created_at" field.

func (*TransactionCreate) SetDeletedAt

func (tc *TransactionCreate) SetDeletedAt(t time.Time) *TransactionCreate

SetDeletedAt sets the "deleted_at" field.

func (*TransactionCreate) SetExchange

func (tc *TransactionCreate) SetExchange(e *Exchange) *TransactionCreate

SetExchange sets the "exchange" edge to the Exchange entity.

func (*TransactionCreate) SetExchangeID

func (tc *TransactionCreate) SetExchangeID(pu pulid.PULID) *TransactionCreate

SetExchangeID sets the "exchange_id" field.

func (*TransactionCreate) SetID

SetID sets the "id" field.

func (*TransactionCreate) SetInput

SetInput applies the change-set in the CreateTransactionInput on the TransactionCreate builder.

func (*TransactionCreate) SetNillableBlockchainID

func (tc *TransactionCreate) SetNillableBlockchainID(pu *pulid.PULID) *TransactionCreate

SetNillableBlockchainID sets the "blockchain_id" field if the given value is not nil.

func (*TransactionCreate) SetNillableCreatedAt

func (tc *TransactionCreate) SetNillableCreatedAt(t *time.Time) *TransactionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*TransactionCreate) SetNillableDeletedAt

func (tc *TransactionCreate) SetNillableDeletedAt(t *time.Time) *TransactionCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*TransactionCreate) SetNillableID

func (tc *TransactionCreate) SetNillableID(pu *pulid.PULID) *TransactionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*TransactionCreate) SetNillableQuoteAssetID

func (tc *TransactionCreate) SetNillableQuoteAssetID(pu *pulid.PULID) *TransactionCreate

SetNillableQuoteAssetID sets the "quote_asset_id" field if the given value is not nil.

func (*TransactionCreate) SetNillableUpdatedAt

func (tc *TransactionCreate) SetNillableUpdatedAt(t *time.Time) *TransactionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*TransactionCreate) SetPortfolio

func (tc *TransactionCreate) SetPortfolio(p *Portfolio) *TransactionCreate

SetPortfolio sets the "portfolio" edge to the Portfolio entity.

func (*TransactionCreate) SetPortfolioID

func (tc *TransactionCreate) SetPortfolioID(pu pulid.PULID) *TransactionCreate

SetPortfolioID sets the "portfolio_id" field.

func (*TransactionCreate) SetPricePerUnit

func (tc *TransactionCreate) SetPricePerUnit(f float64) *TransactionCreate

SetPricePerUnit sets the "price_per_unit" field.

func (*TransactionCreate) SetQuoteAsset

func (tc *TransactionCreate) SetQuoteAsset(a *Asset) *TransactionCreate

SetQuoteAsset sets the "quote_asset" edge to the Asset entity.

func (*TransactionCreate) SetQuoteAssetID

func (tc *TransactionCreate) SetQuoteAssetID(pu pulid.PULID) *TransactionCreate

SetQuoteAssetID sets the "quote_asset_id" field.

func (*TransactionCreate) SetTime

func (tc *TransactionCreate) SetTime(t time.Time) *TransactionCreate

SetTime sets the "time" field.

func (*TransactionCreate) SetTransactionType

func (tc *TransactionCreate) SetTransactionType(t *TransactionType) *TransactionCreate

SetTransactionType sets the "transaction_type" edge to the TransactionType entity.

func (*TransactionCreate) SetTransactionTypeID

func (tc *TransactionCreate) SetTransactionTypeID(id pulid.PULID) *TransactionCreate

SetTransactionTypeID sets the "transaction_type" edge to the TransactionType entity by ID.

func (*TransactionCreate) SetUnits

func (tc *TransactionCreate) SetUnits(i int) *TransactionCreate

SetUnits sets the "units" field.

func (*TransactionCreate) SetUpdatedAt

func (tc *TransactionCreate) SetUpdatedAt(t time.Time) *TransactionCreate

SetUpdatedAt sets the "updated_at" field.

type TransactionCreateBulk

type TransactionCreateBulk struct {
	// contains filtered or unexported fields
}

TransactionCreateBulk is the builder for creating many Transaction entities in bulk.

func (*TransactionCreateBulk) Exec

func (tcb *TransactionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TransactionCreateBulk) ExecX

func (tcb *TransactionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionCreateBulk) Save

func (tcb *TransactionCreateBulk) Save(ctx context.Context) ([]*Transaction, error)

Save creates the Transaction entities in the database.

func (*TransactionCreateBulk) SaveX

func (tcb *TransactionCreateBulk) SaveX(ctx context.Context) []*Transaction

SaveX is like Save, but panics if an error occurs.

type TransactionDelete

type TransactionDelete struct {
	// contains filtered or unexported fields
}

TransactionDelete is the builder for deleting a Transaction entity.

func (*TransactionDelete) Exec

func (td *TransactionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TransactionDelete) ExecX

func (td *TransactionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TransactionDelete) Where

Where appends a list predicates to the TransactionDelete builder.

type TransactionDeleteOne

type TransactionDeleteOne struct {
	// contains filtered or unexported fields
}

TransactionDeleteOne is the builder for deleting a single Transaction entity.

func (*TransactionDeleteOne) Exec

func (tdo *TransactionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TransactionDeleteOne) ExecX

func (tdo *TransactionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TransactionEdge

type TransactionEdge struct {
	Node   *Transaction `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

TransactionEdge is the edge representation of Transaction.

type TransactionEdges

type TransactionEdges struct {
	// TransactionType holds the value of the transaction_type edge.
	TransactionType *TransactionType `json:"transactionType,omitempty"`
	// BaseAsset holds the value of the base_asset edge.
	BaseAsset *Asset `json:"baseAsset,omitempty"`
	// QuoteAsset holds the value of the quote_asset edge.
	QuoteAsset *Asset `json:"quoteAsset,omitempty"`
	// Portfolio holds the value of the portfolio edge.
	Portfolio *Portfolio `json:"portfolio,omitempty"`
	// Exchange holds the value of the exchange edge.
	Exchange *Exchange `json:"exchange,omitempty"`
	// Blockchain holds the value of the blockchain edge.
	Blockchain *Blockchain `json:"blockchain,omitempty"`
	// contains filtered or unexported fields
}

TransactionEdges holds the relations/edges for other nodes in the graph.

func (TransactionEdges) BaseAssetOrErr

func (e TransactionEdges) BaseAssetOrErr() (*Asset, error)

BaseAssetOrErr returns the BaseAsset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TransactionEdges) BlockchainOrErr

func (e TransactionEdges) BlockchainOrErr() (*Blockchain, error)

BlockchainOrErr returns the Blockchain value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TransactionEdges) ExchangeOrErr

func (e TransactionEdges) ExchangeOrErr() (*Exchange, error)

ExchangeOrErr returns the Exchange value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TransactionEdges) PortfolioOrErr

func (e TransactionEdges) PortfolioOrErr() (*Portfolio, error)

PortfolioOrErr returns the Portfolio value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TransactionEdges) QuoteAssetOrErr

func (e TransactionEdges) QuoteAssetOrErr() (*Asset, error)

QuoteAssetOrErr returns the QuoteAsset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TransactionEdges) TransactionTypeOrErr

func (e TransactionEdges) TransactionTypeOrErr() (*TransactionType, error)

TransactionTypeOrErr returns the TransactionType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TransactionGroupBy

type TransactionGroupBy struct {
	// contains filtered or unexported fields
}

TransactionGroupBy is the group-by builder for Transaction entities.

func (*TransactionGroupBy) Aggregate

func (tgb *TransactionGroupBy) Aggregate(fns ...AggregateFunc) *TransactionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TransactionGroupBy) Bool

func (s *TransactionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TransactionGroupBy) BoolX

func (s *TransactionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TransactionGroupBy) Bools

func (s *TransactionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TransactionGroupBy) BoolsX

func (s *TransactionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TransactionGroupBy) Float64

func (s *TransactionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TransactionGroupBy) Float64X

func (s *TransactionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TransactionGroupBy) Float64s

func (s *TransactionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TransactionGroupBy) Float64sX

func (s *TransactionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TransactionGroupBy) Int

func (s *TransactionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TransactionGroupBy) IntX

func (s *TransactionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TransactionGroupBy) Ints

func (s *TransactionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TransactionGroupBy) IntsX

func (s *TransactionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TransactionGroupBy) Scan

func (tgb *TransactionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*TransactionGroupBy) ScanX

func (s *TransactionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TransactionGroupBy) String

func (s *TransactionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TransactionGroupBy) StringX

func (s *TransactionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TransactionGroupBy) Strings

func (s *TransactionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TransactionGroupBy) StringsX

func (s *TransactionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TransactionMutation

type TransactionMutation struct {
	// contains filtered or unexported fields
}

TransactionMutation represents an operation that mutates the Transaction nodes in the graph.

func (*TransactionMutation) AddField

func (m *TransactionMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*TransactionMutation) AddPricePerUnit

func (m *TransactionMutation) AddPricePerUnit(f float64)

AddPricePerUnit adds f to the "price_per_unit" field.

func (*TransactionMutation) AddUnits

func (m *TransactionMutation) AddUnits(i int)

AddUnits adds i to the "units" field.

func (*TransactionMutation) AddedEdges

func (m *TransactionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TransactionMutation) AddedField

func (m *TransactionMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*TransactionMutation) AddedFields

func (m *TransactionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TransactionMutation) AddedIDs

func (m *TransactionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TransactionMutation) AddedPricePerUnit

func (m *TransactionMutation) AddedPricePerUnit() (r float64, exists bool)

AddedPricePerUnit returns the value that was added to the "price_per_unit" field in this mutation.

func (*TransactionMutation) AddedUnits

func (m *TransactionMutation) AddedUnits() (r int, exists bool)

AddedUnits returns the value that was added to the "units" field in this mutation.

func (*TransactionMutation) BaseAssetCleared

func (m *TransactionMutation) BaseAssetCleared() bool

BaseAssetCleared reports if the "base_asset" edge to the Asset entity was cleared.

func (*TransactionMutation) BaseAssetID

func (m *TransactionMutation) BaseAssetID() (r pulid.PULID, exists bool)

BaseAssetID returns the value of the "base_asset_id" field in the mutation.

func (*TransactionMutation) BaseAssetIDs

func (m *TransactionMutation) BaseAssetIDs() (ids []pulid.PULID)

BaseAssetIDs returns the "base_asset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BaseAssetID instead. It exists only for internal usage by the builders.

func (*TransactionMutation) BlockchainCleared

func (m *TransactionMutation) BlockchainCleared() bool

BlockchainCleared reports if the "blockchain" edge to the Blockchain entity was cleared.

func (*TransactionMutation) BlockchainID

func (m *TransactionMutation) BlockchainID() (r pulid.PULID, exists bool)

BlockchainID returns the value of the "blockchain_id" field in the mutation.

func (*TransactionMutation) BlockchainIDCleared

func (m *TransactionMutation) BlockchainIDCleared() bool

BlockchainIDCleared returns if the "blockchain_id" field was cleared in this mutation.

func (*TransactionMutation) BlockchainIDs

func (m *TransactionMutation) BlockchainIDs() (ids []pulid.PULID)

BlockchainIDs returns the "blockchain" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BlockchainID instead. It exists only for internal usage by the builders.

func (*TransactionMutation) ClearBaseAsset

func (m *TransactionMutation) ClearBaseAsset()

ClearBaseAsset clears the "base_asset" edge to the Asset entity.

func (*TransactionMutation) ClearBlockchain

func (m *TransactionMutation) ClearBlockchain()

ClearBlockchain clears the "blockchain" edge to the Blockchain entity.

func (*TransactionMutation) ClearBlockchainID

func (m *TransactionMutation) ClearBlockchainID()

ClearBlockchainID clears the value of the "blockchain_id" field.

func (*TransactionMutation) ClearDeletedAt

func (m *TransactionMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*TransactionMutation) ClearEdge

func (m *TransactionMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*TransactionMutation) ClearExchange

func (m *TransactionMutation) ClearExchange()

ClearExchange clears the "exchange" edge to the Exchange entity.

func (*TransactionMutation) ClearField

func (m *TransactionMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*TransactionMutation) ClearPortfolio

func (m *TransactionMutation) ClearPortfolio()

ClearPortfolio clears the "portfolio" edge to the Portfolio entity.

func (*TransactionMutation) ClearQuoteAsset

func (m *TransactionMutation) ClearQuoteAsset()

ClearQuoteAsset clears the "quote_asset" edge to the Asset entity.

func (*TransactionMutation) ClearQuoteAssetID

func (m *TransactionMutation) ClearQuoteAssetID()

ClearQuoteAssetID clears the value of the "quote_asset_id" field.

func (*TransactionMutation) ClearTransactionType

func (m *TransactionMutation) ClearTransactionType()

ClearTransactionType clears the "transaction_type" edge to the TransactionType entity.

func (*TransactionMutation) ClearedEdges

func (m *TransactionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TransactionMutation) ClearedFields

func (m *TransactionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TransactionMutation) Client

func (m TransactionMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*TransactionMutation) CreatedAt

func (m *TransactionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TransactionMutation) DeletedAt

func (m *TransactionMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*TransactionMutation) DeletedAtCleared

func (m *TransactionMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*TransactionMutation) EdgeCleared

func (m *TransactionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TransactionMutation) ExchangeCleared

func (m *TransactionMutation) ExchangeCleared() bool

ExchangeCleared reports if the "exchange" edge to the Exchange entity was cleared.

func (*TransactionMutation) ExchangeID

func (m *TransactionMutation) ExchangeID() (r pulid.PULID, exists bool)

ExchangeID returns the value of the "exchange_id" field in the mutation.

func (*TransactionMutation) ExchangeIDs

func (m *TransactionMutation) ExchangeIDs() (ids []pulid.PULID)

ExchangeIDs returns the "exchange" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ExchangeID instead. It exists only for internal usage by the builders.

func (*TransactionMutation) Field

func (m *TransactionMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*TransactionMutation) FieldCleared

func (m *TransactionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TransactionMutation) Fields

func (m *TransactionMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*TransactionMutation) ID

func (m *TransactionMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TransactionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TransactionMutation) OldBaseAssetID

func (m *TransactionMutation) OldBaseAssetID(ctx context.Context) (v pulid.PULID, err error)

OldBaseAssetID returns the old "base_asset_id" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldBlockchainID

func (m *TransactionMutation) OldBlockchainID(ctx context.Context) (v *pulid.PULID, err error)

OldBlockchainID returns the old "blockchain_id" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldCreatedAt

func (m *TransactionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldDeletedAt

func (m *TransactionMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldExchangeID

func (m *TransactionMutation) OldExchangeID(ctx context.Context) (v pulid.PULID, err error)

OldExchangeID returns the old "exchange_id" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldField

func (m *TransactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*TransactionMutation) OldPortfolioID

func (m *TransactionMutation) OldPortfolioID(ctx context.Context) (v pulid.PULID, err error)

OldPortfolioID returns the old "portfolio_id" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldPricePerUnit

func (m *TransactionMutation) OldPricePerUnit(ctx context.Context) (v float64, err error)

OldPricePerUnit returns the old "price_per_unit" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldQuoteAssetID

func (m *TransactionMutation) OldQuoteAssetID(ctx context.Context) (v *pulid.PULID, err error)

OldQuoteAssetID returns the old "quote_asset_id" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldTime

func (m *TransactionMutation) OldTime(ctx context.Context) (v time.Time, err error)

OldTime returns the old "time" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldUnits

func (m *TransactionMutation) OldUnits(ctx context.Context) (v int, err error)

OldUnits returns the old "units" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldUpdatedAt

func (m *TransactionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) Op

func (m *TransactionMutation) Op() Op

Op returns the operation name.

func (*TransactionMutation) PortfolioCleared

func (m *TransactionMutation) PortfolioCleared() bool

PortfolioCleared reports if the "portfolio" edge to the Portfolio entity was cleared.

func (*TransactionMutation) PortfolioID

func (m *TransactionMutation) PortfolioID() (r pulid.PULID, exists bool)

PortfolioID returns the value of the "portfolio_id" field in the mutation.

func (*TransactionMutation) PortfolioIDs

func (m *TransactionMutation) PortfolioIDs() (ids []pulid.PULID)

PortfolioIDs returns the "portfolio" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PortfolioID instead. It exists only for internal usage by the builders.

func (*TransactionMutation) PricePerUnit

func (m *TransactionMutation) PricePerUnit() (r float64, exists bool)

PricePerUnit returns the value of the "price_per_unit" field in the mutation.

func (*TransactionMutation) QuoteAssetCleared

func (m *TransactionMutation) QuoteAssetCleared() bool

QuoteAssetCleared reports if the "quote_asset" edge to the Asset entity was cleared.

func (*TransactionMutation) QuoteAssetID

func (m *TransactionMutation) QuoteAssetID() (r pulid.PULID, exists bool)

QuoteAssetID returns the value of the "quote_asset_id" field in the mutation.

func (*TransactionMutation) QuoteAssetIDCleared

func (m *TransactionMutation) QuoteAssetIDCleared() bool

QuoteAssetIDCleared returns if the "quote_asset_id" field was cleared in this mutation.

func (*TransactionMutation) QuoteAssetIDs

func (m *TransactionMutation) QuoteAssetIDs() (ids []pulid.PULID)

QuoteAssetIDs returns the "quote_asset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use QuoteAssetID instead. It exists only for internal usage by the builders.

func (*TransactionMutation) RemovedEdges

func (m *TransactionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TransactionMutation) RemovedIDs

func (m *TransactionMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*TransactionMutation) ResetBaseAsset

func (m *TransactionMutation) ResetBaseAsset()

ResetBaseAsset resets all changes to the "base_asset" edge.

func (*TransactionMutation) ResetBaseAssetID

func (m *TransactionMutation) ResetBaseAssetID()

ResetBaseAssetID resets all changes to the "base_asset_id" field.

func (*TransactionMutation) ResetBlockchain

func (m *TransactionMutation) ResetBlockchain()

ResetBlockchain resets all changes to the "blockchain" edge.

func (*TransactionMutation) ResetBlockchainID

func (m *TransactionMutation) ResetBlockchainID()

ResetBlockchainID resets all changes to the "blockchain_id" field.

func (*TransactionMutation) ResetCreatedAt

func (m *TransactionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TransactionMutation) ResetDeletedAt

func (m *TransactionMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*TransactionMutation) ResetEdge

func (m *TransactionMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*TransactionMutation) ResetExchange

func (m *TransactionMutation) ResetExchange()

ResetExchange resets all changes to the "exchange" edge.

func (*TransactionMutation) ResetExchangeID

func (m *TransactionMutation) ResetExchangeID()

ResetExchangeID resets all changes to the "exchange_id" field.

func (*TransactionMutation) ResetField

func (m *TransactionMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*TransactionMutation) ResetPortfolio

func (m *TransactionMutation) ResetPortfolio()

ResetPortfolio resets all changes to the "portfolio" edge.

func (*TransactionMutation) ResetPortfolioID

func (m *TransactionMutation) ResetPortfolioID()

ResetPortfolioID resets all changes to the "portfolio_id" field.

func (*TransactionMutation) ResetPricePerUnit

func (m *TransactionMutation) ResetPricePerUnit()

ResetPricePerUnit resets all changes to the "price_per_unit" field.

func (*TransactionMutation) ResetQuoteAsset

func (m *TransactionMutation) ResetQuoteAsset()

ResetQuoteAsset resets all changes to the "quote_asset" edge.

func (*TransactionMutation) ResetQuoteAssetID

func (m *TransactionMutation) ResetQuoteAssetID()

ResetQuoteAssetID resets all changes to the "quote_asset_id" field.

func (*TransactionMutation) ResetTime

func (m *TransactionMutation) ResetTime()

ResetTime resets all changes to the "time" field.

func (*TransactionMutation) ResetTransactionType

func (m *TransactionMutation) ResetTransactionType()

ResetTransactionType resets all changes to the "transaction_type" edge.

func (*TransactionMutation) ResetUnits

func (m *TransactionMutation) ResetUnits()

ResetUnits resets all changes to the "units" field.

func (*TransactionMutation) ResetUpdatedAt

func (m *TransactionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*TransactionMutation) SetBaseAssetID

func (m *TransactionMutation) SetBaseAssetID(pu pulid.PULID)

SetBaseAssetID sets the "base_asset_id" field.

func (*TransactionMutation) SetBlockchainID

func (m *TransactionMutation) SetBlockchainID(pu pulid.PULID)

SetBlockchainID sets the "blockchain_id" field.

func (*TransactionMutation) SetCreatedAt

func (m *TransactionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TransactionMutation) SetDeletedAt

func (m *TransactionMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*TransactionMutation) SetExchangeID

func (m *TransactionMutation) SetExchangeID(pu pulid.PULID)

SetExchangeID sets the "exchange_id" field.

func (*TransactionMutation) SetField

func (m *TransactionMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*TransactionMutation) SetID

func (m *TransactionMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Transaction entities.

func (*TransactionMutation) SetPortfolioID

func (m *TransactionMutation) SetPortfolioID(pu pulid.PULID)

SetPortfolioID sets the "portfolio_id" field.

func (*TransactionMutation) SetPricePerUnit

func (m *TransactionMutation) SetPricePerUnit(f float64)

SetPricePerUnit sets the "price_per_unit" field.

func (*TransactionMutation) SetQuoteAssetID

func (m *TransactionMutation) SetQuoteAssetID(pu pulid.PULID)

SetQuoteAssetID sets the "quote_asset_id" field.

func (*TransactionMutation) SetTime

func (m *TransactionMutation) SetTime(t time.Time)

SetTime sets the "time" field.

func (*TransactionMutation) SetTransactionTypeID

func (m *TransactionMutation) SetTransactionTypeID(id pulid.PULID)

SetTransactionTypeID sets the "transaction_type" edge to the TransactionType entity by id.

func (*TransactionMutation) SetUnits

func (m *TransactionMutation) SetUnits(i int)

SetUnits sets the "units" field.

func (*TransactionMutation) SetUpdatedAt

func (m *TransactionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*TransactionMutation) Time

func (m *TransactionMutation) Time() (r time.Time, exists bool)

Time returns the value of the "time" field in the mutation.

func (*TransactionMutation) TransactionTypeCleared

func (m *TransactionMutation) TransactionTypeCleared() bool

TransactionTypeCleared reports if the "transaction_type" edge to the TransactionType entity was cleared.

func (*TransactionMutation) TransactionTypeID

func (m *TransactionMutation) TransactionTypeID() (id pulid.PULID, exists bool)

TransactionTypeID returns the "transaction_type" edge ID in the mutation.

func (*TransactionMutation) TransactionTypeIDs

func (m *TransactionMutation) TransactionTypeIDs() (ids []pulid.PULID)

TransactionTypeIDs returns the "transaction_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TransactionTypeID instead. It exists only for internal usage by the builders.

func (TransactionMutation) Tx

func (m TransactionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TransactionMutation) Type

func (m *TransactionMutation) Type() string

Type returns the node type of this mutation (Transaction).

func (*TransactionMutation) Units

func (m *TransactionMutation) Units() (r int, exists bool)

Units returns the value of the "units" field in the mutation.

func (*TransactionMutation) UpdatedAt

func (m *TransactionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*TransactionMutation) Where

func (m *TransactionMutation) Where(ps ...predicate.Transaction)

Where appends a list predicates to the TransactionMutation builder.

type TransactionOrder

type TransactionOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *TransactionOrderField `json:"field"`
}

TransactionOrder defines the ordering of Transaction.

type TransactionOrderField

type TransactionOrderField struct {
	// contains filtered or unexported fields
}

TransactionOrderField defines the ordering field of Transaction.

func (TransactionOrderField) MarshalGQL

func (f TransactionOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (TransactionOrderField) String

func (f TransactionOrderField) String() string

String implement fmt.Stringer interface.

func (*TransactionOrderField) UnmarshalGQL

func (f *TransactionOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type TransactionPaginateOption

type TransactionPaginateOption func(*transactionPager) error

TransactionPaginateOption enables pagination customization.

func WithTransactionFilter

func WithTransactionFilter(filter func(*TransactionQuery) (*TransactionQuery, error)) TransactionPaginateOption

WithTransactionFilter configures pagination filter.

func WithTransactionOrder

func WithTransactionOrder(order *TransactionOrder) TransactionPaginateOption

WithTransactionOrder configures pagination ordering.

type TransactionQuery

type TransactionQuery struct {
	// contains filtered or unexported fields
}

TransactionQuery is the builder for querying Transaction entities.

func (*TransactionQuery) All

func (tq *TransactionQuery) All(ctx context.Context) ([]*Transaction, error)

All executes the query and returns a list of Transactions.

func (*TransactionQuery) AllX

func (tq *TransactionQuery) AllX(ctx context.Context) []*Transaction

AllX is like All, but panics if an error occurs.

func (*TransactionQuery) Clone

func (tq *TransactionQuery) Clone() *TransactionQuery

Clone returns a duplicate of the TransactionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TransactionQuery) CollectFields

func (t *TransactionQuery) CollectFields(ctx context.Context, satisfies ...string) (*TransactionQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*TransactionQuery) Count

func (tq *TransactionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TransactionQuery) CountX

func (tq *TransactionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TransactionQuery) Exist

func (tq *TransactionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TransactionQuery) ExistX

func (tq *TransactionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TransactionQuery) First

func (tq *TransactionQuery) First(ctx context.Context) (*Transaction, error)

First returns the first Transaction entity from the query. Returns a *NotFoundError when no Transaction was found.

func (*TransactionQuery) FirstID

func (tq *TransactionQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first Transaction ID from the query. Returns a *NotFoundError when no Transaction ID was found.

func (*TransactionQuery) FirstIDX

func (tq *TransactionQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TransactionQuery) FirstX

func (tq *TransactionQuery) FirstX(ctx context.Context) *Transaction

FirstX is like First, but panics if an error occurs.

func (*TransactionQuery) GroupBy

func (tq *TransactionQuery) GroupBy(field string, fields ...string) *TransactionGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Transaction.Query().
	GroupBy(transaction.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TransactionQuery) IDs

func (tq *TransactionQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of Transaction IDs.

func (*TransactionQuery) IDsX

func (tq *TransactionQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*TransactionQuery) Limit

func (tq *TransactionQuery) Limit(limit int) *TransactionQuery

Limit adds a limit step to the query.

func (*TransactionQuery) Offset

func (tq *TransactionQuery) Offset(offset int) *TransactionQuery

Offset adds an offset step to the query.

func (*TransactionQuery) Only

func (tq *TransactionQuery) Only(ctx context.Context) (*Transaction, error)

Only returns a single Transaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Transaction entity is found. Returns a *NotFoundError when no Transaction entities are found.

func (*TransactionQuery) OnlyID

func (tq *TransactionQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only Transaction ID in the query. Returns a *NotSingularError when more than one Transaction ID is found. Returns a *NotFoundError when no entities are found.

func (*TransactionQuery) OnlyIDX

func (tq *TransactionQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TransactionQuery) OnlyX

func (tq *TransactionQuery) OnlyX(ctx context.Context) *Transaction

OnlyX is like Only, but panics if an error occurs.

func (*TransactionQuery) Order

func (tq *TransactionQuery) Order(o ...OrderFunc) *TransactionQuery

Order adds an order step to the query.

func (*TransactionQuery) Paginate

func (t *TransactionQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...TransactionPaginateOption,
) (*TransactionConnection, error)

Paginate executes the query and returns a relay based cursor connection to Transaction.

func (*TransactionQuery) QueryBaseAsset

func (tq *TransactionQuery) QueryBaseAsset() *AssetQuery

QueryBaseAsset chains the current query on the "base_asset" edge.

func (*TransactionQuery) QueryBlockchain

func (tq *TransactionQuery) QueryBlockchain() *BlockchainQuery

QueryBlockchain chains the current query on the "blockchain" edge.

func (*TransactionQuery) QueryExchange

func (tq *TransactionQuery) QueryExchange() *ExchangeQuery

QueryExchange chains the current query on the "exchange" edge.

func (*TransactionQuery) QueryPortfolio

func (tq *TransactionQuery) QueryPortfolio() *PortfolioQuery

QueryPortfolio chains the current query on the "portfolio" edge.

func (*TransactionQuery) QueryQuoteAsset

func (tq *TransactionQuery) QueryQuoteAsset() *AssetQuery

QueryQuoteAsset chains the current query on the "quote_asset" edge.

func (*TransactionQuery) QueryTransactionType

func (tq *TransactionQuery) QueryTransactionType() *TransactionTypeQuery

QueryTransactionType chains the current query on the "transaction_type" edge.

func (*TransactionQuery) Select

func (tq *TransactionQuery) Select(fields ...string) *TransactionSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.Transaction.Query().
	Select(transaction.FieldCreatedAt).
	Scan(ctx, &v)

func (*TransactionQuery) Unique

func (tq *TransactionQuery) Unique(unique bool) *TransactionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*TransactionQuery) Where

Where adds a new predicate for the TransactionQuery builder.

func (*TransactionQuery) WithBaseAsset

func (tq *TransactionQuery) WithBaseAsset(opts ...func(*AssetQuery)) *TransactionQuery

WithBaseAsset tells the query-builder to eager-load the nodes that are connected to the "base_asset" edge. The optional arguments are used to configure the query builder of the edge.

func (*TransactionQuery) WithBlockchain

func (tq *TransactionQuery) WithBlockchain(opts ...func(*BlockchainQuery)) *TransactionQuery

WithBlockchain tells the query-builder to eager-load the nodes that are connected to the "blockchain" edge. The optional arguments are used to configure the query builder of the edge.

func (*TransactionQuery) WithExchange

func (tq *TransactionQuery) WithExchange(opts ...func(*ExchangeQuery)) *TransactionQuery

WithExchange tells the query-builder to eager-load the nodes that are connected to the "exchange" edge. The optional arguments are used to configure the query builder of the edge.

func (*TransactionQuery) WithPortfolio

func (tq *TransactionQuery) WithPortfolio(opts ...func(*PortfolioQuery)) *TransactionQuery

WithPortfolio tells the query-builder to eager-load the nodes that are connected to the "portfolio" edge. The optional arguments are used to configure the query builder of the edge.

func (*TransactionQuery) WithQuoteAsset

func (tq *TransactionQuery) WithQuoteAsset(opts ...func(*AssetQuery)) *TransactionQuery

WithQuoteAsset tells the query-builder to eager-load the nodes that are connected to the "quote_asset" edge. The optional arguments are used to configure the query builder of the edge.

func (*TransactionQuery) WithTransactionType

func (tq *TransactionQuery) WithTransactionType(opts ...func(*TransactionTypeQuery)) *TransactionQuery

WithTransactionType tells the query-builder to eager-load the nodes that are connected to the "transaction_type" edge. The optional arguments are used to configure the query builder of the edge.

type TransactionSelect

type TransactionSelect struct {
	*TransactionQuery
	// contains filtered or unexported fields
}

TransactionSelect is the builder for selecting fields of Transaction entities.

func (*TransactionSelect) Bool

func (s *TransactionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) BoolX

func (s *TransactionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TransactionSelect) Bools

func (s *TransactionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) BoolsX

func (s *TransactionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TransactionSelect) Float64

func (s *TransactionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) Float64X

func (s *TransactionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TransactionSelect) Float64s

func (s *TransactionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) Float64sX

func (s *TransactionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TransactionSelect) Int

func (s *TransactionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) IntX

func (s *TransactionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TransactionSelect) Ints

func (s *TransactionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) IntsX

func (s *TransactionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TransactionSelect) Scan

func (ts *TransactionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TransactionSelect) ScanX

func (s *TransactionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TransactionSelect) String

func (s *TransactionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) StringX

func (s *TransactionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TransactionSelect) Strings

func (s *TransactionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) StringsX

func (s *TransactionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TransactionType

type TransactionType struct {

	// ID of the ent.
	ID pulid.PULID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Value holds the value of the "value" field.
	Value transactiontype.Value `json:"value,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// contains filtered or unexported fields
}

TransactionType is the model entity for the TransactionType schema.

func (*TransactionType) Node

func (tt *TransactionType) Node(ctx context.Context) (node *Node, err error)

func (*TransactionType) String

func (tt *TransactionType) String() string

String implements the fmt.Stringer.

func (*TransactionType) ToEdge

ToEdge converts TransactionType into TransactionTypeEdge.

func (*TransactionType) Unwrap

func (tt *TransactionType) Unwrap() *TransactionType

Unwrap unwraps the TransactionType entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*TransactionType) Update

Update returns a builder for updating this TransactionType. Note that you need to call TransactionType.Unwrap() before calling this method if this TransactionType was returned from a transaction, and the transaction was committed or rolled back.

type TransactionTypeClient

type TransactionTypeClient struct {
	// contains filtered or unexported fields
}

TransactionTypeClient is a client for the TransactionType schema.

func NewTransactionTypeClient

func NewTransactionTypeClient(c config) *TransactionTypeClient

NewTransactionTypeClient returns a client for the TransactionType from the given config.

func (*TransactionTypeClient) Create

Create returns a builder for creating a TransactionType entity.

func (*TransactionTypeClient) CreateBulk

CreateBulk returns a builder for creating a bulk of TransactionType entities.

func (*TransactionTypeClient) Delete

Delete returns a delete builder for TransactionType.

func (*TransactionTypeClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TransactionTypeClient) DeleteOneID

DeleteOne returns a builder for deleting the given entity by its id.

func (*TransactionTypeClient) Get

Get returns a TransactionType entity by its id.

func (*TransactionTypeClient) GetX

GetX is like Get, but panics if an error occurs.

func (*TransactionTypeClient) Hooks

func (c *TransactionTypeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TransactionTypeClient) Query

Query returns a query builder for TransactionType.

func (*TransactionTypeClient) Update

Update returns an update builder for TransactionType.

func (*TransactionTypeClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TransactionTypeClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*TransactionTypeClient) Use

func (c *TransactionTypeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `transactiontype.Hooks(f(g(h())))`.

type TransactionTypeConnection

type TransactionTypeConnection struct {
	Edges      []*TransactionTypeEdge `json:"edges"`
	PageInfo   PageInfo               `json:"pageInfo"`
	TotalCount int                    `json:"totalCount"`
}

TransactionTypeConnection is the connection containing edges to TransactionType.

type TransactionTypeCreate

type TransactionTypeCreate struct {
	// contains filtered or unexported fields
}

TransactionTypeCreate is the builder for creating a TransactionType entity.

func (*TransactionTypeCreate) Exec

func (ttc *TransactionTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TransactionTypeCreate) ExecX

func (ttc *TransactionTypeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionTypeCreate) Mutation

Mutation returns the TransactionTypeMutation object of the builder.

func (*TransactionTypeCreate) Save

Save creates the TransactionType in the database.

func (*TransactionTypeCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*TransactionTypeCreate) SetCreatedAt

func (ttc *TransactionTypeCreate) SetCreatedAt(t time.Time) *TransactionTypeCreate

SetCreatedAt sets the "created_at" field.

func (*TransactionTypeCreate) SetDeletedAt

func (ttc *TransactionTypeCreate) SetDeletedAt(t time.Time) *TransactionTypeCreate

SetDeletedAt sets the "deleted_at" field.

func (*TransactionTypeCreate) SetDescription

func (ttc *TransactionTypeCreate) SetDescription(s string) *TransactionTypeCreate

SetDescription sets the "description" field.

func (*TransactionTypeCreate) SetID

SetID sets the "id" field.

func (*TransactionTypeCreate) SetInput

SetInput applies the change-set in the CreateTransactionTypeInput on the TransactionTypeCreate builder.

func (*TransactionTypeCreate) SetNillableCreatedAt

func (ttc *TransactionTypeCreate) SetNillableCreatedAt(t *time.Time) *TransactionTypeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*TransactionTypeCreate) SetNillableDeletedAt

func (ttc *TransactionTypeCreate) SetNillableDeletedAt(t *time.Time) *TransactionTypeCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*TransactionTypeCreate) SetNillableDescription

func (ttc *TransactionTypeCreate) SetNillableDescription(s *string) *TransactionTypeCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TransactionTypeCreate) SetNillableID

func (ttc *TransactionTypeCreate) SetNillableID(pu *pulid.PULID) *TransactionTypeCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*TransactionTypeCreate) SetNillableUpdatedAt

func (ttc *TransactionTypeCreate) SetNillableUpdatedAt(t *time.Time) *TransactionTypeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*TransactionTypeCreate) SetUpdatedAt

func (ttc *TransactionTypeCreate) SetUpdatedAt(t time.Time) *TransactionTypeCreate

SetUpdatedAt sets the "updated_at" field.

func (*TransactionTypeCreate) SetValue

SetValue sets the "value" field.

type TransactionTypeCreateBulk

type TransactionTypeCreateBulk struct {
	// contains filtered or unexported fields
}

TransactionTypeCreateBulk is the builder for creating many TransactionType entities in bulk.

func (*TransactionTypeCreateBulk) Exec

Exec executes the query.

func (*TransactionTypeCreateBulk) ExecX

func (ttcb *TransactionTypeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionTypeCreateBulk) Save

Save creates the TransactionType entities in the database.

func (*TransactionTypeCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type TransactionTypeDelete

type TransactionTypeDelete struct {
	// contains filtered or unexported fields
}

TransactionTypeDelete is the builder for deleting a TransactionType entity.

func (*TransactionTypeDelete) Exec

func (ttd *TransactionTypeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TransactionTypeDelete) ExecX

func (ttd *TransactionTypeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TransactionTypeDelete) Where

Where appends a list predicates to the TransactionTypeDelete builder.

type TransactionTypeDeleteOne

type TransactionTypeDeleteOne struct {
	// contains filtered or unexported fields
}

TransactionTypeDeleteOne is the builder for deleting a single TransactionType entity.

func (*TransactionTypeDeleteOne) Exec

Exec executes the deletion query.

func (*TransactionTypeDeleteOne) ExecX

func (ttdo *TransactionTypeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TransactionTypeEdge

type TransactionTypeEdge struct {
	Node   *TransactionType `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

TransactionTypeEdge is the edge representation of TransactionType.

type TransactionTypeGroupBy

type TransactionTypeGroupBy struct {
	// contains filtered or unexported fields
}

TransactionTypeGroupBy is the group-by builder for TransactionType entities.

func (*TransactionTypeGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*TransactionTypeGroupBy) Bool

func (s *TransactionTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TransactionTypeGroupBy) BoolX

func (s *TransactionTypeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TransactionTypeGroupBy) Bools

func (s *TransactionTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TransactionTypeGroupBy) BoolsX

func (s *TransactionTypeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TransactionTypeGroupBy) Float64

func (s *TransactionTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TransactionTypeGroupBy) Float64X

func (s *TransactionTypeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TransactionTypeGroupBy) Float64s

func (s *TransactionTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TransactionTypeGroupBy) Float64sX

func (s *TransactionTypeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TransactionTypeGroupBy) Int

func (s *TransactionTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TransactionTypeGroupBy) IntX

func (s *TransactionTypeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TransactionTypeGroupBy) Ints

func (s *TransactionTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TransactionTypeGroupBy) IntsX

func (s *TransactionTypeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TransactionTypeGroupBy) Scan

func (ttgb *TransactionTypeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*TransactionTypeGroupBy) ScanX

func (s *TransactionTypeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TransactionTypeGroupBy) String

func (s *TransactionTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TransactionTypeGroupBy) StringX

func (s *TransactionTypeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TransactionTypeGroupBy) Strings

func (s *TransactionTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TransactionTypeGroupBy) StringsX

func (s *TransactionTypeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TransactionTypeMutation

type TransactionTypeMutation struct {
	// contains filtered or unexported fields
}

TransactionTypeMutation represents an operation that mutates the TransactionType nodes in the graph.

func (*TransactionTypeMutation) AddField

func (m *TransactionTypeMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*TransactionTypeMutation) AddedEdges

func (m *TransactionTypeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TransactionTypeMutation) AddedField

func (m *TransactionTypeMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*TransactionTypeMutation) AddedFields

func (m *TransactionTypeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TransactionTypeMutation) AddedIDs

func (m *TransactionTypeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TransactionTypeMutation) ClearDeletedAt

func (m *TransactionTypeMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*TransactionTypeMutation) ClearDescription

func (m *TransactionTypeMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*TransactionTypeMutation) ClearEdge

func (m *TransactionTypeMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*TransactionTypeMutation) ClearField

func (m *TransactionTypeMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*TransactionTypeMutation) ClearedEdges

func (m *TransactionTypeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TransactionTypeMutation) ClearedFields

func (m *TransactionTypeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TransactionTypeMutation) Client

func (m TransactionTypeMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*TransactionTypeMutation) CreatedAt

func (m *TransactionTypeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TransactionTypeMutation) DeletedAt

func (m *TransactionTypeMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*TransactionTypeMutation) DeletedAtCleared

func (m *TransactionTypeMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*TransactionTypeMutation) Description

func (m *TransactionTypeMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*TransactionTypeMutation) DescriptionCleared

func (m *TransactionTypeMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*TransactionTypeMutation) EdgeCleared

func (m *TransactionTypeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TransactionTypeMutation) Field

func (m *TransactionTypeMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*TransactionTypeMutation) FieldCleared

func (m *TransactionTypeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TransactionTypeMutation) Fields

func (m *TransactionTypeMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*TransactionTypeMutation) ID

func (m *TransactionTypeMutation) ID() (id pulid.PULID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TransactionTypeMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TransactionTypeMutation) OldCreatedAt

func (m *TransactionTypeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the TransactionType entity. If the TransactionType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionTypeMutation) OldDeletedAt

func (m *TransactionTypeMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the TransactionType entity. If the TransactionType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionTypeMutation) OldDescription

func (m *TransactionTypeMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" field's value of the TransactionType entity. If the TransactionType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionTypeMutation) OldField

func (m *TransactionTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*TransactionTypeMutation) OldUpdatedAt

func (m *TransactionTypeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the TransactionType entity. If the TransactionType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionTypeMutation) OldValue

OldValue returns the old "value" field's value of the TransactionType entity. If the TransactionType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionTypeMutation) Op

func (m *TransactionTypeMutation) Op() Op

Op returns the operation name.

func (*TransactionTypeMutation) RemovedEdges

func (m *TransactionTypeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TransactionTypeMutation) RemovedIDs

func (m *TransactionTypeMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*TransactionTypeMutation) ResetCreatedAt

func (m *TransactionTypeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TransactionTypeMutation) ResetDeletedAt

func (m *TransactionTypeMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*TransactionTypeMutation) ResetDescription

func (m *TransactionTypeMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*TransactionTypeMutation) ResetEdge

func (m *TransactionTypeMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*TransactionTypeMutation) ResetField

func (m *TransactionTypeMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*TransactionTypeMutation) ResetUpdatedAt

func (m *TransactionTypeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*TransactionTypeMutation) ResetValue

func (m *TransactionTypeMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*TransactionTypeMutation) SetCreatedAt

func (m *TransactionTypeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TransactionTypeMutation) SetDeletedAt

func (m *TransactionTypeMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*TransactionTypeMutation) SetDescription

func (m *TransactionTypeMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*TransactionTypeMutation) SetField

func (m *TransactionTypeMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*TransactionTypeMutation) SetID

func (m *TransactionTypeMutation) SetID(id pulid.PULID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TransactionType entities.

func (*TransactionTypeMutation) SetUpdatedAt

func (m *TransactionTypeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*TransactionTypeMutation) SetValue

SetValue sets the "value" field.

func (TransactionTypeMutation) Tx

func (m TransactionTypeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TransactionTypeMutation) Type

func (m *TransactionTypeMutation) Type() string

Type returns the node type of this mutation (TransactionType).

func (*TransactionTypeMutation) UpdatedAt

func (m *TransactionTypeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*TransactionTypeMutation) Value

func (m *TransactionTypeMutation) Value() (r transactiontype.Value, exists bool)

Value returns the value of the "value" field in the mutation.

func (*TransactionTypeMutation) Where

Where appends a list predicates to the TransactionTypeMutation builder.

type TransactionTypeOrder

type TransactionTypeOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *TransactionTypeOrderField `json:"field"`
}

TransactionTypeOrder defines the ordering of TransactionType.

type TransactionTypeOrderField

type TransactionTypeOrderField struct {
	// contains filtered or unexported fields
}

TransactionTypeOrderField defines the ordering field of TransactionType.

func (TransactionTypeOrderField) MarshalGQL

func (f TransactionTypeOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (TransactionTypeOrderField) String

func (f TransactionTypeOrderField) String() string

String implement fmt.Stringer interface.

func (*TransactionTypeOrderField) UnmarshalGQL

func (f *TransactionTypeOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type TransactionTypePaginateOption

type TransactionTypePaginateOption func(*transactiontypePager) error

TransactionTypePaginateOption enables pagination customization.

func WithTransactionTypeFilter

func WithTransactionTypeFilter(filter func(*TransactionTypeQuery) (*TransactionTypeQuery, error)) TransactionTypePaginateOption

WithTransactionTypeFilter configures pagination filter.

func WithTransactionTypeOrder

func WithTransactionTypeOrder(order *TransactionTypeOrder) TransactionTypePaginateOption

WithTransactionTypeOrder configures pagination ordering.

type TransactionTypeQuery

type TransactionTypeQuery struct {
	// contains filtered or unexported fields
}

TransactionTypeQuery is the builder for querying TransactionType entities.

func (*TransactionTypeQuery) All

All executes the query and returns a list of TransactionTypes.

func (*TransactionTypeQuery) AllX

AllX is like All, but panics if an error occurs.

func (*TransactionTypeQuery) Clone

Clone returns a duplicate of the TransactionTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TransactionTypeQuery) CollectFields

func (tt *TransactionTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*TransactionTypeQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*TransactionTypeQuery) Count

func (ttq *TransactionTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TransactionTypeQuery) CountX

func (ttq *TransactionTypeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TransactionTypeQuery) Exist

func (ttq *TransactionTypeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TransactionTypeQuery) ExistX

func (ttq *TransactionTypeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TransactionTypeQuery) First

First returns the first TransactionType entity from the query. Returns a *NotFoundError when no TransactionType was found.

func (*TransactionTypeQuery) FirstID

func (ttq *TransactionTypeQuery) FirstID(ctx context.Context) (id pulid.PULID, err error)

FirstID returns the first TransactionType ID from the query. Returns a *NotFoundError when no TransactionType ID was found.

func (*TransactionTypeQuery) FirstIDX

func (ttq *TransactionTypeQuery) FirstIDX(ctx context.Context) pulid.PULID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TransactionTypeQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*TransactionTypeQuery) GroupBy

func (ttq *TransactionTypeQuery) GroupBy(field string, fields ...string) *TransactionTypeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TransactionType.Query().
	GroupBy(transactiontype.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TransactionTypeQuery) IDs

func (ttq *TransactionTypeQuery) IDs(ctx context.Context) ([]pulid.PULID, error)

IDs executes the query and returns a list of TransactionType IDs.

func (*TransactionTypeQuery) IDsX

func (ttq *TransactionTypeQuery) IDsX(ctx context.Context) []pulid.PULID

IDsX is like IDs, but panics if an error occurs.

func (*TransactionTypeQuery) Limit

func (ttq *TransactionTypeQuery) Limit(limit int) *TransactionTypeQuery

Limit adds a limit step to the query.

func (*TransactionTypeQuery) Offset

func (ttq *TransactionTypeQuery) Offset(offset int) *TransactionTypeQuery

Offset adds an offset step to the query.

func (*TransactionTypeQuery) Only

Only returns a single TransactionType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TransactionType entity is found. Returns a *NotFoundError when no TransactionType entities are found.

func (*TransactionTypeQuery) OnlyID

func (ttq *TransactionTypeQuery) OnlyID(ctx context.Context) (id pulid.PULID, err error)

OnlyID is like Only, but returns the only TransactionType ID in the query. Returns a *NotSingularError when more than one TransactionType ID is found. Returns a *NotFoundError when no entities are found.

func (*TransactionTypeQuery) OnlyIDX

func (ttq *TransactionTypeQuery) OnlyIDX(ctx context.Context) pulid.PULID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TransactionTypeQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*TransactionTypeQuery) Order

Order adds an order step to the query.

func (*TransactionTypeQuery) Paginate

func (tt *TransactionTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...TransactionTypePaginateOption,
) (*TransactionTypeConnection, error)

Paginate executes the query and returns a relay based cursor connection to TransactionType.

func (*TransactionTypeQuery) Select

func (ttq *TransactionTypeQuery) Select(fields ...string) *TransactionTypeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

client.TransactionType.Query().
	Select(transactiontype.FieldCreatedAt).
	Scan(ctx, &v)

func (*TransactionTypeQuery) Unique

func (ttq *TransactionTypeQuery) Unique(unique bool) *TransactionTypeQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*TransactionTypeQuery) Where

Where adds a new predicate for the TransactionTypeQuery builder.

type TransactionTypeSelect

type TransactionTypeSelect struct {
	*TransactionTypeQuery
	// contains filtered or unexported fields
}

TransactionTypeSelect is the builder for selecting fields of TransactionType entities.

func (*TransactionTypeSelect) Bool

func (s *TransactionTypeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TransactionTypeSelect) BoolX

func (s *TransactionTypeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TransactionTypeSelect) Bools

func (s *TransactionTypeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TransactionTypeSelect) BoolsX

func (s *TransactionTypeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TransactionTypeSelect) Float64

func (s *TransactionTypeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TransactionTypeSelect) Float64X

func (s *TransactionTypeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TransactionTypeSelect) Float64s

func (s *TransactionTypeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TransactionTypeSelect) Float64sX

func (s *TransactionTypeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TransactionTypeSelect) Int

func (s *TransactionTypeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TransactionTypeSelect) IntX

func (s *TransactionTypeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TransactionTypeSelect) Ints

func (s *TransactionTypeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TransactionTypeSelect) IntsX

func (s *TransactionTypeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TransactionTypeSelect) Scan

func (tts *TransactionTypeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TransactionTypeSelect) ScanX

func (s *TransactionTypeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TransactionTypeSelect) String

func (s *TransactionTypeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TransactionTypeSelect) StringX

func (s *TransactionTypeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TransactionTypeSelect) Strings

func (s *TransactionTypeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TransactionTypeSelect) StringsX

func (s *TransactionTypeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TransactionTypeUpdate

type TransactionTypeUpdate struct {
	// contains filtered or unexported fields
}

TransactionTypeUpdate is the builder for updating TransactionType entities.

func (*TransactionTypeUpdate) ClearDeletedAt

func (ttu *TransactionTypeUpdate) ClearDeletedAt() *TransactionTypeUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*TransactionTypeUpdate) ClearDescription

func (ttu *TransactionTypeUpdate) ClearDescription() *TransactionTypeUpdate

ClearDescription clears the value of the "description" field.

func (*TransactionTypeUpdate) Exec

func (ttu *TransactionTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TransactionTypeUpdate) ExecX

func (ttu *TransactionTypeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionTypeUpdate) Mutation

Mutation returns the TransactionTypeMutation object of the builder.

func (*TransactionTypeUpdate) Save

func (ttu *TransactionTypeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TransactionTypeUpdate) SaveX

func (ttu *TransactionTypeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TransactionTypeUpdate) SetDeletedAt

func (ttu *TransactionTypeUpdate) SetDeletedAt(t time.Time) *TransactionTypeUpdate

SetDeletedAt sets the "deleted_at" field.

func (*TransactionTypeUpdate) SetDescription

func (ttu *TransactionTypeUpdate) SetDescription(s string) *TransactionTypeUpdate

SetDescription sets the "description" field.

func (*TransactionTypeUpdate) SetInput

SetInput applies the change-set in the UpdateTransactionTypeInput on the TransactionTypeUpdate builder.

func (*TransactionTypeUpdate) SetNillableDescription

func (ttu *TransactionTypeUpdate) SetNillableDescription(s *string) *TransactionTypeUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TransactionTypeUpdate) SetUpdatedAt

func (ttu *TransactionTypeUpdate) SetUpdatedAt(t time.Time) *TransactionTypeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*TransactionTypeUpdate) SetValue

SetValue sets the "value" field.

func (*TransactionTypeUpdate) Where

Where appends a list predicates to the TransactionTypeUpdate builder.

type TransactionTypeUpdateOne

type TransactionTypeUpdateOne struct {
	// contains filtered or unexported fields
}

TransactionTypeUpdateOne is the builder for updating a single TransactionType entity.

func (*TransactionTypeUpdateOne) ClearDeletedAt

func (ttuo *TransactionTypeUpdateOne) ClearDeletedAt() *TransactionTypeUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*TransactionTypeUpdateOne) ClearDescription

func (ttuo *TransactionTypeUpdateOne) ClearDescription() *TransactionTypeUpdateOne

ClearDescription clears the value of the "description" field.

func (*TransactionTypeUpdateOne) Exec

Exec executes the query on the entity.

func (*TransactionTypeUpdateOne) ExecX

func (ttuo *TransactionTypeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionTypeUpdateOne) Mutation

Mutation returns the TransactionTypeMutation object of the builder.

func (*TransactionTypeUpdateOne) Save

Save executes the query and returns the updated TransactionType entity.

func (*TransactionTypeUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TransactionTypeUpdateOne) Select

func (ttuo *TransactionTypeUpdateOne) Select(field string, fields ...string) *TransactionTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TransactionTypeUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*TransactionTypeUpdateOne) SetDescription

func (ttuo *TransactionTypeUpdateOne) SetDescription(s string) *TransactionTypeUpdateOne

SetDescription sets the "description" field.

func (*TransactionTypeUpdateOne) SetInput

SetInput applies the change-set in the UpdateTransactionTypeInput on the TransactionTypeUpdateOne builder.

func (*TransactionTypeUpdateOne) SetNillableDescription

func (ttuo *TransactionTypeUpdateOne) SetNillableDescription(s *string) *TransactionTypeUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TransactionTypeUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*TransactionTypeUpdateOne) SetValue

SetValue sets the "value" field.

type TransactionTypeWhereInput

type TransactionTypeWhereInput struct {
	Predicates []predicate.TransactionType  `json:"-"`
	Not        *TransactionTypeWhereInput   `json:"not,omitempty"`
	Or         []*TransactionTypeWhereInput `json:"or,omitempty"`
	And        []*TransactionTypeWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "value" field predicates.
	Value      *transactiontype.Value  `json:"value,omitempty"`
	ValueNEQ   *transactiontype.Value  `json:"valueNEQ,omitempty"`
	ValueIn    []transactiontype.Value `json:"valueIn,omitempty"`
	ValueNotIn []transactiontype.Value `json:"valueNotIn,omitempty"`

	// "description" field predicates.
	Description             *string  `json:"description,omitempty"`
	DescriptionNEQ          *string  `json:"descriptionNEQ,omitempty"`
	DescriptionIn           []string `json:"descriptionIn,omitempty"`
	DescriptionNotIn        []string `json:"descriptionNotIn,omitempty"`
	DescriptionGT           *string  `json:"descriptionGT,omitempty"`
	DescriptionGTE          *string  `json:"descriptionGTE,omitempty"`
	DescriptionLT           *string  `json:"descriptionLT,omitempty"`
	DescriptionLTE          *string  `json:"descriptionLTE,omitempty"`
	DescriptionContains     *string  `json:"descriptionContains,omitempty"`
	DescriptionHasPrefix    *string  `json:"descriptionHasPrefix,omitempty"`
	DescriptionHasSuffix    *string  `json:"descriptionHasSuffix,omitempty"`
	DescriptionIsNil        bool     `json:"descriptionIsNil,omitempty"`
	DescriptionNotNil       bool     `json:"descriptionNotNil,omitempty"`
	DescriptionEqualFold    *string  `json:"descriptionEqualFold,omitempty"`
	DescriptionContainsFold *string  `json:"descriptionContainsFold,omitempty"`
}

TransactionTypeWhereInput represents a where input for filtering TransactionType queries.

func (*TransactionTypeWhereInput) AddPredicates

func (i *TransactionTypeWhereInput) AddPredicates(predicates ...predicate.TransactionType)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*TransactionTypeWhereInput) Filter

Filter applies the TransactionTypeWhereInput filter on the TransactionTypeQuery builder.

func (*TransactionTypeWhereInput) P

P returns a predicate for filtering transactiontypes. An error is returned if the input is empty or invalid.

type TransactionTypes

type TransactionTypes []*TransactionType

TransactionTypes is a parsable slice of TransactionType.

type TransactionUpdate

type TransactionUpdate struct {
	// contains filtered or unexported fields
}

TransactionUpdate is the builder for updating Transaction entities.

func (*TransactionUpdate) AddPricePerUnit

func (tu *TransactionUpdate) AddPricePerUnit(f float64) *TransactionUpdate

AddPricePerUnit adds f to the "price_per_unit" field.

func (*TransactionUpdate) AddUnits

func (tu *TransactionUpdate) AddUnits(i int) *TransactionUpdate

AddUnits adds i to the "units" field.

func (*TransactionUpdate) ClearBaseAsset

func (tu *TransactionUpdate) ClearBaseAsset() *TransactionUpdate

ClearBaseAsset clears the "base_asset" edge to the Asset entity.

func (*TransactionUpdate) ClearBlockchain

func (tu *TransactionUpdate) ClearBlockchain() *TransactionUpdate

ClearBlockchain clears the "blockchain" edge to the Blockchain entity.

func (*TransactionUpdate) ClearBlockchainID

func (tu *TransactionUpdate) ClearBlockchainID() *TransactionUpdate

ClearBlockchainID clears the value of the "blockchain_id" field.

func (*TransactionUpdate) ClearDeletedAt

func (tu *TransactionUpdate) ClearDeletedAt() *TransactionUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*TransactionUpdate) ClearExchange

func (tu *TransactionUpdate) ClearExchange() *TransactionUpdate

ClearExchange clears the "exchange" edge to the Exchange entity.

func (*TransactionUpdate) ClearPortfolio

func (tu *TransactionUpdate) ClearPortfolio() *TransactionUpdate

ClearPortfolio clears the "portfolio" edge to the Portfolio entity.

func (*TransactionUpdate) ClearQuoteAsset

func (tu *TransactionUpdate) ClearQuoteAsset() *TransactionUpdate

ClearQuoteAsset clears the "quote_asset" edge to the Asset entity.

func (*TransactionUpdate) ClearQuoteAssetID

func (tu *TransactionUpdate) ClearQuoteAssetID() *TransactionUpdate

ClearQuoteAssetID clears the value of the "quote_asset_id" field.

func (*TransactionUpdate) ClearTransactionType

func (tu *TransactionUpdate) ClearTransactionType() *TransactionUpdate

ClearTransactionType clears the "transaction_type" edge to the TransactionType entity.

func (*TransactionUpdate) Exec

func (tu *TransactionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TransactionUpdate) ExecX

func (tu *TransactionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionUpdate) Mutation

func (tu *TransactionUpdate) Mutation() *TransactionMutation

Mutation returns the TransactionMutation object of the builder.

func (*TransactionUpdate) Save

func (tu *TransactionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TransactionUpdate) SaveX

func (tu *TransactionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TransactionUpdate) SetBaseAsset

func (tu *TransactionUpdate) SetBaseAsset(a *Asset) *TransactionUpdate

SetBaseAsset sets the "base_asset" edge to the Asset entity.

func (*TransactionUpdate) SetBaseAssetID

func (tu *TransactionUpdate) SetBaseAssetID(pu pulid.PULID) *TransactionUpdate

SetBaseAssetID sets the "base_asset_id" field.

func (*TransactionUpdate) SetBlockchain

func (tu *TransactionUpdate) SetBlockchain(b *Blockchain) *TransactionUpdate

SetBlockchain sets the "blockchain" edge to the Blockchain entity.

func (*TransactionUpdate) SetBlockchainID

func (tu *TransactionUpdate) SetBlockchainID(pu pulid.PULID) *TransactionUpdate

SetBlockchainID sets the "blockchain_id" field.

func (*TransactionUpdate) SetDeletedAt

func (tu *TransactionUpdate) SetDeletedAt(t time.Time) *TransactionUpdate

SetDeletedAt sets the "deleted_at" field.

func (*TransactionUpdate) SetExchange

func (tu *TransactionUpdate) SetExchange(e *Exchange) *TransactionUpdate

SetExchange sets the "exchange" edge to the Exchange entity.

func (*TransactionUpdate) SetExchangeID

func (tu *TransactionUpdate) SetExchangeID(pu pulid.PULID) *TransactionUpdate

SetExchangeID sets the "exchange_id" field.

func (*TransactionUpdate) SetInput

SetInput applies the change-set in the UpdateTransactionInput on the TransactionUpdate builder.

func (*TransactionUpdate) SetNillableBlockchainID

func (tu *TransactionUpdate) SetNillableBlockchainID(pu *pulid.PULID) *TransactionUpdate

SetNillableBlockchainID sets the "blockchain_id" field if the given value is not nil.

func (*TransactionUpdate) SetNillableQuoteAssetID

func (tu *TransactionUpdate) SetNillableQuoteAssetID(pu *pulid.PULID) *TransactionUpdate

SetNillableQuoteAssetID sets the "quote_asset_id" field if the given value is not nil.

func (*TransactionUpdate) SetPortfolio

func (tu *TransactionUpdate) SetPortfolio(p *Portfolio) *TransactionUpdate

SetPortfolio sets the "portfolio" edge to the Portfolio entity.

func (*TransactionUpdate) SetPortfolioID

func (tu *TransactionUpdate) SetPortfolioID(pu pulid.PULID) *TransactionUpdate

SetPortfolioID sets the "portfolio_id" field.

func (*TransactionUpdate) SetPricePerUnit

func (tu *TransactionUpdate) SetPricePerUnit(f float64) *TransactionUpdate

SetPricePerUnit sets the "price_per_unit" field.

func (*TransactionUpdate) SetQuoteAsset

func (tu *TransactionUpdate) SetQuoteAsset(a *Asset) *TransactionUpdate

SetQuoteAsset sets the "quote_asset" edge to the Asset entity.

func (*TransactionUpdate) SetQuoteAssetID

func (tu *TransactionUpdate) SetQuoteAssetID(pu pulid.PULID) *TransactionUpdate

SetQuoteAssetID sets the "quote_asset_id" field.

func (*TransactionUpdate) SetTime

func (tu *TransactionUpdate) SetTime(t time.Time) *TransactionUpdate

SetTime sets the "time" field.

func (*TransactionUpdate) SetTransactionType

func (tu *TransactionUpdate) SetTransactionType(t *TransactionType) *TransactionUpdate

SetTransactionType sets the "transaction_type" edge to the TransactionType entity.

func (*TransactionUpdate) SetTransactionTypeID

func (tu *TransactionUpdate) SetTransactionTypeID(id pulid.PULID) *TransactionUpdate

SetTransactionTypeID sets the "transaction_type" edge to the TransactionType entity by ID.

func (*TransactionUpdate) SetUnits

func (tu *TransactionUpdate) SetUnits(i int) *TransactionUpdate

SetUnits sets the "units" field.

func (*TransactionUpdate) SetUpdatedAt

func (tu *TransactionUpdate) SetUpdatedAt(t time.Time) *TransactionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*TransactionUpdate) Where

Where appends a list predicates to the TransactionUpdate builder.

type TransactionUpdateOne

type TransactionUpdateOne struct {
	// contains filtered or unexported fields
}

TransactionUpdateOne is the builder for updating a single Transaction entity.

func (*TransactionUpdateOne) AddPricePerUnit

func (tuo *TransactionUpdateOne) AddPricePerUnit(f float64) *TransactionUpdateOne

AddPricePerUnit adds f to the "price_per_unit" field.

func (*TransactionUpdateOne) AddUnits

func (tuo *TransactionUpdateOne) AddUnits(i int) *TransactionUpdateOne

AddUnits adds i to the "units" field.

func (*TransactionUpdateOne) ClearBaseAsset

func (tuo *TransactionUpdateOne) ClearBaseAsset() *TransactionUpdateOne

ClearBaseAsset clears the "base_asset" edge to the Asset entity.

func (*TransactionUpdateOne) ClearBlockchain

func (tuo *TransactionUpdateOne) ClearBlockchain() *TransactionUpdateOne

ClearBlockchain clears the "blockchain" edge to the Blockchain entity.

func (*TransactionUpdateOne) ClearBlockchainID

func (tuo *TransactionUpdateOne) ClearBlockchainID() *TransactionUpdateOne

ClearBlockchainID clears the value of the "blockchain_id" field.

func (*TransactionUpdateOne) ClearDeletedAt

func (tuo *TransactionUpdateOne) ClearDeletedAt() *TransactionUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*TransactionUpdateOne) ClearExchange

func (tuo *TransactionUpdateOne) ClearExchange() *TransactionUpdateOne

ClearExchange clears the "exchange" edge to the Exchange entity.

func (*TransactionUpdateOne) ClearPortfolio

func (tuo *TransactionUpdateOne) ClearPortfolio() *TransactionUpdateOne

ClearPortfolio clears the "portfolio" edge to the Portfolio entity.

func (*TransactionUpdateOne) ClearQuoteAsset

func (tuo *TransactionUpdateOne) ClearQuoteAsset() *TransactionUpdateOne

ClearQuoteAsset clears the "quote_asset" edge to the Asset entity.

func (*TransactionUpdateOne) ClearQuoteAssetID

func (tuo *TransactionUpdateOne) ClearQuoteAssetID() *TransactionUpdateOne

ClearQuoteAssetID clears the value of the "quote_asset_id" field.

func (*TransactionUpdateOne) ClearTransactionType

func (tuo *TransactionUpdateOne) ClearTransactionType() *TransactionUpdateOne

ClearTransactionType clears the "transaction_type" edge to the TransactionType entity.

func (*TransactionUpdateOne) Exec

func (tuo *TransactionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TransactionUpdateOne) ExecX

func (tuo *TransactionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionUpdateOne) Mutation

func (tuo *TransactionUpdateOne) Mutation() *TransactionMutation

Mutation returns the TransactionMutation object of the builder.

func (*TransactionUpdateOne) Save

Save executes the query and returns the updated Transaction entity.

func (*TransactionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TransactionUpdateOne) Select

func (tuo *TransactionUpdateOne) Select(field string, fields ...string) *TransactionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TransactionUpdateOne) SetBaseAsset

func (tuo *TransactionUpdateOne) SetBaseAsset(a *Asset) *TransactionUpdateOne

SetBaseAsset sets the "base_asset" edge to the Asset entity.

func (*TransactionUpdateOne) SetBaseAssetID

func (tuo *TransactionUpdateOne) SetBaseAssetID(pu pulid.PULID) *TransactionUpdateOne

SetBaseAssetID sets the "base_asset_id" field.

func (*TransactionUpdateOne) SetBlockchain

func (tuo *TransactionUpdateOne) SetBlockchain(b *Blockchain) *TransactionUpdateOne

SetBlockchain sets the "blockchain" edge to the Blockchain entity.

func (*TransactionUpdateOne) SetBlockchainID

func (tuo *TransactionUpdateOne) SetBlockchainID(pu pulid.PULID) *TransactionUpdateOne

SetBlockchainID sets the "blockchain_id" field.

func (*TransactionUpdateOne) SetDeletedAt

func (tuo *TransactionUpdateOne) SetDeletedAt(t time.Time) *TransactionUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*TransactionUpdateOne) SetExchange

func (tuo *TransactionUpdateOne) SetExchange(e *Exchange) *TransactionUpdateOne

SetExchange sets the "exchange" edge to the Exchange entity.

func (*TransactionUpdateOne) SetExchangeID

func (tuo *TransactionUpdateOne) SetExchangeID(pu pulid.PULID) *TransactionUpdateOne

SetExchangeID sets the "exchange_id" field.

func (*TransactionUpdateOne) SetInput

SetInput applies the change-set in the UpdateTransactionInput on the TransactionUpdateOne builder.

func (*TransactionUpdateOne) SetNillableBlockchainID

func (tuo *TransactionUpdateOne) SetNillableBlockchainID(pu *pulid.PULID) *TransactionUpdateOne

SetNillableBlockchainID sets the "blockchain_id" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableQuoteAssetID

func (tuo *TransactionUpdateOne) SetNillableQuoteAssetID(pu *pulid.PULID) *TransactionUpdateOne

SetNillableQuoteAssetID sets the "quote_asset_id" field if the given value is not nil.

func (*TransactionUpdateOne) SetPortfolio

func (tuo *TransactionUpdateOne) SetPortfolio(p *Portfolio) *TransactionUpdateOne

SetPortfolio sets the "portfolio" edge to the Portfolio entity.

func (*TransactionUpdateOne) SetPortfolioID

func (tuo *TransactionUpdateOne) SetPortfolioID(pu pulid.PULID) *TransactionUpdateOne

SetPortfolioID sets the "portfolio_id" field.

func (*TransactionUpdateOne) SetPricePerUnit

func (tuo *TransactionUpdateOne) SetPricePerUnit(f float64) *TransactionUpdateOne

SetPricePerUnit sets the "price_per_unit" field.

func (*TransactionUpdateOne) SetQuoteAsset

func (tuo *TransactionUpdateOne) SetQuoteAsset(a *Asset) *TransactionUpdateOne

SetQuoteAsset sets the "quote_asset" edge to the Asset entity.

func (*TransactionUpdateOne) SetQuoteAssetID

func (tuo *TransactionUpdateOne) SetQuoteAssetID(pu pulid.PULID) *TransactionUpdateOne

SetQuoteAssetID sets the "quote_asset_id" field.

func (*TransactionUpdateOne) SetTime

SetTime sets the "time" field.

func (*TransactionUpdateOne) SetTransactionType

func (tuo *TransactionUpdateOne) SetTransactionType(t *TransactionType) *TransactionUpdateOne

SetTransactionType sets the "transaction_type" edge to the TransactionType entity.

func (*TransactionUpdateOne) SetTransactionTypeID

func (tuo *TransactionUpdateOne) SetTransactionTypeID(id pulid.PULID) *TransactionUpdateOne

SetTransactionTypeID sets the "transaction_type" edge to the TransactionType entity by ID.

func (*TransactionUpdateOne) SetUnits

func (tuo *TransactionUpdateOne) SetUnits(i int) *TransactionUpdateOne

SetUnits sets the "units" field.

func (*TransactionUpdateOne) SetUpdatedAt

func (tuo *TransactionUpdateOne) SetUpdatedAt(t time.Time) *TransactionUpdateOne

SetUpdatedAt sets the "updated_at" field.

type TransactionWhereInput

type TransactionWhereInput struct {
	Predicates []predicate.Transaction  `json:"-"`
	Not        *TransactionWhereInput   `json:"not,omitempty"`
	Or         []*TransactionWhereInput `json:"or,omitempty"`
	And        []*TransactionWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *pulid.PULID  `json:"id,omitempty"`
	IDNEQ   *pulid.PULID  `json:"idNEQ,omitempty"`
	IDIn    []pulid.PULID `json:"idIn,omitempty"`
	IDNotIn []pulid.PULID `json:"idNotIn,omitempty"`
	IDGT    *pulid.PULID  `json:"idGT,omitempty"`
	IDGTE   *pulid.PULID  `json:"idGTE,omitempty"`
	IDLT    *pulid.PULID  `json:"idLT,omitempty"`
	IDLTE   *pulid.PULID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "time" field predicates.
	Time      *time.Time  `json:"time,omitempty"`
	TimeNEQ   *time.Time  `json:"timeNEQ,omitempty"`
	TimeIn    []time.Time `json:"timeIn,omitempty"`
	TimeNotIn []time.Time `json:"timeNotIn,omitempty"`
	TimeGT    *time.Time  `json:"timeGT,omitempty"`
	TimeGTE   *time.Time  `json:"timeGTE,omitempty"`
	TimeLT    *time.Time  `json:"timeLT,omitempty"`
	TimeLTE   *time.Time  `json:"timeLTE,omitempty"`

	// "units" field predicates.
	Units      *int  `json:"units,omitempty"`
	UnitsNEQ   *int  `json:"unitsNEQ,omitempty"`
	UnitsIn    []int `json:"unitsIn,omitempty"`
	UnitsNotIn []int `json:"unitsNotIn,omitempty"`
	UnitsGT    *int  `json:"unitsGT,omitempty"`
	UnitsGTE   *int  `json:"unitsGTE,omitempty"`
	UnitsLT    *int  `json:"unitsLT,omitempty"`
	UnitsLTE   *int  `json:"unitsLTE,omitempty"`

	// "price_per_unit" field predicates.
	PricePerUnit      *float64  `json:"pricePerUnit,omitempty"`
	PricePerUnitNEQ   *float64  `json:"pricePerUnitNEQ,omitempty"`
	PricePerUnitIn    []float64 `json:"pricePerUnitIn,omitempty"`
	PricePerUnitNotIn []float64 `json:"pricePerUnitNotIn,omitempty"`
	PricePerUnitGT    *float64  `json:"pricePerUnitGT,omitempty"`
	PricePerUnitGTE   *float64  `json:"pricePerUnitGTE,omitempty"`
	PricePerUnitLT    *float64  `json:"pricePerUnitLT,omitempty"`
	PricePerUnitLTE   *float64  `json:"pricePerUnitLTE,omitempty"`

	// "blockchain_id" field predicates.
	BlockchainID             *pulid.PULID  `json:"blockchainID,omitempty"`
	BlockchainIDNEQ          *pulid.PULID  `json:"blockchainIDNEQ,omitempty"`
	BlockchainIDIn           []pulid.PULID `json:"blockchainIDIn,omitempty"`
	BlockchainIDNotIn        []pulid.PULID `json:"blockchainIDNotIn,omitempty"`
	BlockchainIDGT           *pulid.PULID  `json:"blockchainIDGT,omitempty"`
	BlockchainIDGTE          *pulid.PULID  `json:"blockchainIDGTE,omitempty"`
	BlockchainIDLT           *pulid.PULID  `json:"blockchainIDLT,omitempty"`
	BlockchainIDLTE          *pulid.PULID  `json:"blockchainIDLTE,omitempty"`
	BlockchainIDContains     *pulid.PULID  `json:"blockchainIDContains,omitempty"`
	BlockchainIDHasPrefix    *pulid.PULID  `json:"blockchainIDHasPrefix,omitempty"`
	BlockchainIDHasSuffix    *pulid.PULID  `json:"blockchainIDHasSuffix,omitempty"`
	BlockchainIDIsNil        bool          `json:"blockchainIDIsNil,omitempty"`
	BlockchainIDNotNil       bool          `json:"blockchainIDNotNil,omitempty"`
	BlockchainIDEqualFold    *pulid.PULID  `json:"blockchainIDEqualFold,omitempty"`
	BlockchainIDContainsFold *pulid.PULID  `json:"blockchainIDContainsFold,omitempty"`

	// "exchange_id" field predicates.
	ExchangeID             *pulid.PULID  `json:"exchangeID,omitempty"`
	ExchangeIDNEQ          *pulid.PULID  `json:"exchangeIDNEQ,omitempty"`
	ExchangeIDIn           []pulid.PULID `json:"exchangeIDIn,omitempty"`
	ExchangeIDNotIn        []pulid.PULID `json:"exchangeIDNotIn,omitempty"`
	ExchangeIDGT           *pulid.PULID  `json:"exchangeIDGT,omitempty"`
	ExchangeIDGTE          *pulid.PULID  `json:"exchangeIDGTE,omitempty"`
	ExchangeIDLT           *pulid.PULID  `json:"exchangeIDLT,omitempty"`
	ExchangeIDLTE          *pulid.PULID  `json:"exchangeIDLTE,omitempty"`
	ExchangeIDContains     *pulid.PULID  `json:"exchangeIDContains,omitempty"`
	ExchangeIDHasPrefix    *pulid.PULID  `json:"exchangeIDHasPrefix,omitempty"`
	ExchangeIDHasSuffix    *pulid.PULID  `json:"exchangeIDHasSuffix,omitempty"`
	ExchangeIDEqualFold    *pulid.PULID  `json:"exchangeIDEqualFold,omitempty"`
	ExchangeIDContainsFold *pulid.PULID  `json:"exchangeIDContainsFold,omitempty"`

	// "portfolio_id" field predicates.
	PortfolioID             *pulid.PULID  `json:"portfolioID,omitempty"`
	PortfolioIDNEQ          *pulid.PULID  `json:"portfolioIDNEQ,omitempty"`
	PortfolioIDIn           []pulid.PULID `json:"portfolioIDIn,omitempty"`
	PortfolioIDNotIn        []pulid.PULID `json:"portfolioIDNotIn,omitempty"`
	PortfolioIDGT           *pulid.PULID  `json:"portfolioIDGT,omitempty"`
	PortfolioIDGTE          *pulid.PULID  `json:"portfolioIDGTE,omitempty"`
	PortfolioIDLT           *pulid.PULID  `json:"portfolioIDLT,omitempty"`
	PortfolioIDLTE          *pulid.PULID  `json:"portfolioIDLTE,omitempty"`
	PortfolioIDContains     *pulid.PULID  `json:"portfolioIDContains,omitempty"`
	PortfolioIDHasPrefix    *pulid.PULID  `json:"portfolioIDHasPrefix,omitempty"`
	PortfolioIDHasSuffix    *pulid.PULID  `json:"portfolioIDHasSuffix,omitempty"`
	PortfolioIDEqualFold    *pulid.PULID  `json:"portfolioIDEqualFold,omitempty"`
	PortfolioIDContainsFold *pulid.PULID  `json:"portfolioIDContainsFold,omitempty"`

	// "base_asset_id" field predicates.
	BaseAssetID             *pulid.PULID  `json:"baseAssetID,omitempty"`
	BaseAssetIDNEQ          *pulid.PULID  `json:"baseAssetIDNEQ,omitempty"`
	BaseAssetIDIn           []pulid.PULID `json:"baseAssetIDIn,omitempty"`
	BaseAssetIDNotIn        []pulid.PULID `json:"baseAssetIDNotIn,omitempty"`
	BaseAssetIDGT           *pulid.PULID  `json:"baseAssetIDGT,omitempty"`
	BaseAssetIDGTE          *pulid.PULID  `json:"baseAssetIDGTE,omitempty"`
	BaseAssetIDLT           *pulid.PULID  `json:"baseAssetIDLT,omitempty"`
	BaseAssetIDLTE          *pulid.PULID  `json:"baseAssetIDLTE,omitempty"`
	BaseAssetIDContains     *pulid.PULID  `json:"baseAssetIDContains,omitempty"`
	BaseAssetIDHasPrefix    *pulid.PULID  `json:"baseAssetIDHasPrefix,omitempty"`
	BaseAssetIDHasSuffix    *pulid.PULID  `json:"baseAssetIDHasSuffix,omitempty"`
	BaseAssetIDEqualFold    *pulid.PULID  `json:"baseAssetIDEqualFold,omitempty"`
	BaseAssetIDContainsFold *pulid.PULID  `json:"baseAssetIDContainsFold,omitempty"`

	// "quote_asset_id" field predicates.
	QuoteAssetID             *pulid.PULID  `json:"quoteAssetID,omitempty"`
	QuoteAssetIDNEQ          *pulid.PULID  `json:"quoteAssetIDNEQ,omitempty"`
	QuoteAssetIDIn           []pulid.PULID `json:"quoteAssetIDIn,omitempty"`
	QuoteAssetIDNotIn        []pulid.PULID `json:"quoteAssetIDNotIn,omitempty"`
	QuoteAssetIDGT           *pulid.PULID  `json:"quoteAssetIDGT,omitempty"`
	QuoteAssetIDGTE          *pulid.PULID  `json:"quoteAssetIDGTE,omitempty"`
	QuoteAssetIDLT           *pulid.PULID  `json:"quoteAssetIDLT,omitempty"`
	QuoteAssetIDLTE          *pulid.PULID  `json:"quoteAssetIDLTE,omitempty"`
	QuoteAssetIDContains     *pulid.PULID  `json:"quoteAssetIDContains,omitempty"`
	QuoteAssetIDHasPrefix    *pulid.PULID  `json:"quoteAssetIDHasPrefix,omitempty"`
	QuoteAssetIDHasSuffix    *pulid.PULID  `json:"quoteAssetIDHasSuffix,omitempty"`
	QuoteAssetIDIsNil        bool          `json:"quoteAssetIDIsNil,omitempty"`
	QuoteAssetIDNotNil       bool          `json:"quoteAssetIDNotNil,omitempty"`
	QuoteAssetIDEqualFold    *pulid.PULID  `json:"quoteAssetIDEqualFold,omitempty"`
	QuoteAssetIDContainsFold *pulid.PULID  `json:"quoteAssetIDContainsFold,omitempty"`

	// "transaction_type" edge predicates.
	HasTransactionType     *bool                        `json:"hasTransactionType,omitempty"`
	HasTransactionTypeWith []*TransactionTypeWhereInput `json:"hasTransactionTypeWith,omitempty"`

	// "base_asset" edge predicates.
	HasBaseAsset     *bool              `json:"hasBaseAsset,omitempty"`
	HasBaseAssetWith []*AssetWhereInput `json:"hasBaseAssetWith,omitempty"`

	// "quote_asset" edge predicates.
	HasQuoteAsset     *bool              `json:"hasQuoteAsset,omitempty"`
	HasQuoteAssetWith []*AssetWhereInput `json:"hasQuoteAssetWith,omitempty"`

	// "portfolio" edge predicates.
	HasPortfolio     *bool                  `json:"hasPortfolio,omitempty"`
	HasPortfolioWith []*PortfolioWhereInput `json:"hasPortfolioWith,omitempty"`

	// "exchange" edge predicates.
	HasExchange     *bool                 `json:"hasExchange,omitempty"`
	HasExchangeWith []*ExchangeWhereInput `json:"hasExchangeWith,omitempty"`

	// "blockchain" edge predicates.
	HasBlockchain     *bool                   `json:"hasBlockchain,omitempty"`
	HasBlockchainWith []*BlockchainWhereInput `json:"hasBlockchainWith,omitempty"`
}

TransactionWhereInput represents a where input for filtering Transaction queries.

func (*TransactionWhereInput) AddPredicates

func (i *TransactionWhereInput) AddPredicates(predicates ...predicate.Transaction)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*TransactionWhereInput) Filter

Filter applies the TransactionWhereInput filter on the TransactionQuery builder.

func (*TransactionWhereInput) P

P returns a predicate for filtering transactions. An error is returned if the input is empty or invalid.

type Transactions

type Transactions []*Transaction

Transactions is a parsable slice of Transaction.

type Tx

type Tx struct {

	// Account is the client for interacting with the Account builders.
	Account *AccountClient
	// Asset is the client for interacting with the Asset builders.
	Asset *AssetClient
	// AssetClass is the client for interacting with the AssetClass builders.
	AssetClass *AssetClassClient
	// AuthRole is the client for interacting with the AuthRole builders.
	AuthRole *AuthRoleClient
	// AuthType is the client for interacting with the AuthType builders.
	AuthType *AuthTypeClient
	// Blockchain is the client for interacting with the Blockchain builders.
	Blockchain *BlockchainClient
	// Connection is the client for interacting with the Connection builders.
	Connection *ConnectionClient
	// Cryptocurrency is the client for interacting with the Cryptocurrency builders.
	Cryptocurrency *CryptocurrencyClient
	// DailyAssetPrice is the client for interacting with the DailyAssetPrice builders.
	DailyAssetPrice *DailyAssetPriceClient
	// Exchange is the client for interacting with the Exchange builders.
	Exchange *ExchangeClient
	// Portfolio is the client for interacting with the Portfolio builders.
	Portfolio *PortfolioClient
	// Source is the client for interacting with the Source builders.
	Source *SourceClient
	// SourceType is the client for interacting with the SourceType builders.
	SourceType *SourceTypeClient
	// StaffAccount is the client for interacting with the StaffAccount builders.
	StaffAccount *StaffAccountClient
	// Transaction is the client for interacting with the Transaction builders.
	Transaction *TransactionClient
	// TransactionType is the client for interacting with the TransactionType builders.
	TransactionType *TransactionTypeClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type UpdateAccountInput

type UpdateAccountInput struct {
	ClearDeletedAt         bool
	DeletedAt              *time.Time
	Nickname               *string
	Email                  *string
	EmailConfirmed         *bool
	ClearPassword          bool
	Password               *string
	ClearProfilePictureURL bool
	ProfilePictureURL      *string
	AddFriendIDs           []pulid.PULID
	RemoveFriendIDs        []pulid.PULID
	AddAuthRoleIDs         []pulid.PULID
	RemoveAuthRoleIDs      []pulid.PULID
	ClearAuthType          bool
	AuthTypeID             *pulid.PULID
}

UpdateAccountInput represents a mutation input for updating accounts.

func (*UpdateAccountInput) Mutate

func (i *UpdateAccountInput) Mutate(m *AccountMutation)

Mutate applies the UpdateAccountInput on the AccountMutation builder.

type UpdateAssetClassInput

type UpdateAssetClassInput struct {
	ClearDeletedAt   bool
	DeletedAt        *time.Time
	Value            *assetclass.Value
	ClearDescription bool
	Description      *string
}

UpdateAssetClassInput represents a mutation input for updating assetclasses.

func (*UpdateAssetClassInput) Mutate

Mutate applies the UpdateAssetClassInput on the AssetClassMutation builder.

type UpdateAssetInput

type UpdateAssetInput struct {
	ClearDeletedAt  bool
	DeletedAt       *time.Time
	ClearAssetClass bool
	AssetClassID    *pulid.PULID
}

UpdateAssetInput represents a mutation input for updating assets.

func (*UpdateAssetInput) Mutate

func (i *UpdateAssetInput) Mutate(m *AssetMutation)

Mutate applies the UpdateAssetInput on the AssetMutation builder.

type UpdateAuthRoleInput

type UpdateAuthRoleInput struct {
	ClearDeletedAt   bool
	DeletedAt        *time.Time
	Value            *authrole.Value
	ClearDescription bool
	Description      *string
}

UpdateAuthRoleInput represents a mutation input for updating authroles.

func (*UpdateAuthRoleInput) Mutate

func (i *UpdateAuthRoleInput) Mutate(m *AuthRoleMutation)

Mutate applies the UpdateAuthRoleInput on the AuthRoleMutation builder.

type UpdateAuthTypeInput

type UpdateAuthTypeInput struct {
	ClearDeletedAt   bool
	DeletedAt        *time.Time
	Value            *authtype.Value
	ClearDescription bool
	Description      *string
}

UpdateAuthTypeInput represents a mutation input for updating authtypes.

func (*UpdateAuthTypeInput) Mutate

func (i *UpdateAuthTypeInput) Mutate(m *AuthTypeMutation)

Mutate applies the UpdateAuthTypeInput on the AuthTypeMutation builder.

type UpdateBlockchainInput

type UpdateBlockchainInput struct {
	ClearDeletedAt bool
	DeletedAt      *time.Time
	Name           *string
	Symbol         *string
	ClearIcon      bool
	Icon           *string
	ClearChainID   bool
	ChainID        *int64
}

UpdateBlockchainInput represents a mutation input for updating blockchains.

func (*UpdateBlockchainInput) Mutate

Mutate applies the UpdateBlockchainInput on the BlockchainMutation builder.

type UpdateConnectionInput

type UpdateConnectionInput struct {
	ClearDeletedAt     bool
	DeletedAt          *time.Time
	Name               *string
	AccessToken        *string
	ClearRefreshToken  bool
	RefreshToken       *string
	AddPortfolioIDs    []pulid.PULID
	RemovePortfolioIDs []pulid.PULID
}

UpdateConnectionInput represents a mutation input for updating connections.

func (*UpdateConnectionInput) Mutate

Mutate applies the UpdateConnectionInput on the ConnectionMutation builder.

type UpdateCryptocurrencyInput

type UpdateCryptocurrencyInput struct {
	ClearDeletedAt      bool
	DeletedAt           *time.Time
	Symbol              *string
	ClearIcon           bool
	Icon                *string
	Name                *string
	ClearAsset          bool
	AssetID             *pulid.PULID
	AddBlockchainIDs    []pulid.PULID
	RemoveBlockchainIDs []pulid.PULID
}

UpdateCryptocurrencyInput represents a mutation input for updating cryptocurrencies.

func (*UpdateCryptocurrencyInput) Mutate

Mutate applies the UpdateCryptocurrencyInput on the CryptocurrencyMutation builder.

type UpdateDailyAssetPriceInput

type UpdateDailyAssetPriceInput struct {
	ClearDeletedAt bool
	DeletedAt      *time.Time
	Time           *time.Time
	ClearOpen      bool
	Open           *float64
	ClearHigh      bool
	High           *float64
	ClearLow       bool
	Low            *float64
	ClearClose     bool
	Close          *float64
	AdjustedClose  *float64
	ClearAsset     bool
	AssetID        *pulid.PULID
}

UpdateDailyAssetPriceInput represents a mutation input for updating dailyassetprices.

func (*UpdateDailyAssetPriceInput) Mutate

Mutate applies the UpdateDailyAssetPriceInput on the DailyAssetPriceMutation builder.

type UpdateExchangeInput

type UpdateExchangeInput struct {
	ClearDeletedAt bool
	DeletedAt      *time.Time
	Name           *string
	ClearIcon      bool
	Icon           *string
	ClearURL       bool
	URL            *string
}

UpdateExchangeInput represents a mutation input for updating exchanges.

func (*UpdateExchangeInput) Mutate

func (i *UpdateExchangeInput) Mutate(m *ExchangeMutation)

Mutate applies the UpdateExchangeInput on the ExchangeMutation builder.

type UpdatePortfolioInput

type UpdatePortfolioInput struct {
	ClearDeletedAt      bool
	DeletedAt           *time.Time
	Name                *string
	IsPublic            *bool
	IsVisible           *bool
	AddConnectionIDs    []pulid.PULID
	RemoveConnectionIDs []pulid.PULID
}

UpdatePortfolioInput represents a mutation input for updating portfolios.

func (*UpdatePortfolioInput) Mutate

Mutate applies the UpdatePortfolioInput on the PortfolioMutation builder.

type UpdateSourceInput

type UpdateSourceInput struct {
	ClearDeletedAt  bool
	DeletedAt       *time.Time
	Name            *string
	ClearIcon       bool
	Icon            *string
	ClearSourceType bool
	SourceTypeID    *pulid.PULID
}

UpdateSourceInput represents a mutation input for updating sources.

func (*UpdateSourceInput) Mutate

func (i *UpdateSourceInput) Mutate(m *SourceMutation)

Mutate applies the UpdateSourceInput on the SourceMutation builder.

type UpdateSourceTypeInput

type UpdateSourceTypeInput struct {
	ClearDeletedAt   bool
	DeletedAt        *time.Time
	Value            *sourcetype.Value
	ClearDescription bool
	Description      *string
}

UpdateSourceTypeInput represents a mutation input for updating sourcetypes.

func (*UpdateSourceTypeInput) Mutate

Mutate applies the UpdateSourceTypeInput on the SourceTypeMutation builder.

type UpdateStaffAccountInput

type UpdateStaffAccountInput struct {
	ClearDeletedAt    bool
	DeletedAt         *time.Time
	Nickname          *string
	Email             *string
	EmailConfirmed    *bool
	ClearPassword     bool
	Password          *string
	AddAuthRoleIDs    []pulid.PULID
	RemoveAuthRoleIDs []pulid.PULID
	ClearAuthType     bool
	AuthTypeID        *pulid.PULID
}

UpdateStaffAccountInput represents a mutation input for updating staffaccounts.

func (*UpdateStaffAccountInput) Mutate

Mutate applies the UpdateStaffAccountInput on the StaffAccountMutation builder.

type UpdateTransactionInput

type UpdateTransactionInput struct {
	ClearDeletedAt       bool
	DeletedAt            *time.Time
	Time                 *time.Time
	Units                *int
	PricePerUnit         *float64
	ClearTransactionType bool
	TransactionTypeID    *pulid.PULID
	ClearBaseAsset       bool
	BaseAssetID          *pulid.PULID
	ClearQuoteAsset      bool
	QuoteAssetID         *pulid.PULID
	ClearPortfolio       bool
	PortfolioID          *pulid.PULID
	ClearExchange        bool
	ExchangeID           *pulid.PULID
	ClearBlockchain      bool
	BlockchainID         *pulid.PULID
}

UpdateTransactionInput represents a mutation input for updating transactions.

func (*UpdateTransactionInput) Mutate

Mutate applies the UpdateTransactionInput on the TransactionMutation builder.

type UpdateTransactionTypeInput

type UpdateTransactionTypeInput struct {
	ClearDeletedAt   bool
	DeletedAt        *time.Time
	Value            *transactiontype.Value
	ClearDescription bool
	Description      *string
}

UpdateTransactionTypeInput represents a mutation input for updating transactiontypes.

func (*UpdateTransactionTypeInput) Mutate

Mutate applies the UpdateTransactionTypeInput on the TransactionTypeMutation builder.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Source Files

Jump to

Keyboard shortcuts

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