Versions in this module Expand all Collapse all v1 v1.4.2 May 30, 2023 v1.4.0 May 30, 2023 Changes in this version + const Delete + const DeleteCost + const DeleteRowCoeff + const From + const Insert + const InsertCost + const InsertRowCoeff + const Into + const Lparen + const Quote + const Select + const SelectCost + const SelectRowCoeff + const Set + const Update + const UpdateCost + const UpdateRowCoeff + var DeleteMinimumThreeFieldsError = errors.New("DELETE query must consist minimum of 3 fields") + var FromStatementMissingError = errors.New("FROM statement missing") + var IntoStatementMissingError = errors.New("INTO statement missing") + var SetStatementMissingError = errors.New("SET statement missing") + var UnknownQueryTypeError = errors.New("Unknown query type") + type DBCountQueryRowCounter struct + func (d *DBCountQueryRowCounter) RowCount(transaction *sqldb.DbTransaction, tableName string) (int64, error) + type DeleteQueryType string + func (s DeleteQueryType) CalculateCost(rowCount int64) int64 + func (s DeleteQueryType) GetTableName() (string, error) + type ExplainAnalyzeQueryCoster struct + func (*ExplainAnalyzeQueryCoster) QueryCost(transaction *sqldb.DbTransaction, query string, args ...any) (int64, error) + type ExplainQueryCoster struct + func (*ExplainQueryCoster) QueryCost(transaction *sqldb.DbTransaction, query string, args ...any) (int64, error) + type FormulaQueryCoster struct + func (f *FormulaQueryCoster) QueryCost(transaction *sqldb.DbTransaction, query string, args ...any) (int64, error) + type InsertQueryType string + func (s InsertQueryType) CalculateCost(rowCount int64) int64 + func (s InsertQueryType) GetTableName() (string, error) + type QueryCoster interface + QueryCost func(*sqldb.DbTransaction, string, ...any) (int64, error) + func GetQueryCoster(tp QueryCosterType) QueryCoster + type QueryCosterType int + const ExplainAnalyzeQueryCosterType + const ExplainQueryCosterType + const FormulaQueryCosterType + type QueryType interface + CalculateCost func(int64) int64 + GetTableName func() (string, error) + type SelectQueryType string + func (s SelectQueryType) CalculateCost(rowCount int64) int64 + func (s SelectQueryType) GetTableName() (string, error) + type TableRowCounter interface + RowCount func(*sqldb.DbTransaction, string) (int64, error) + type UpdateQueryType string + func (s UpdateQueryType) CalculateCost(rowCount int64) int64 + func (s UpdateQueryType) GetTableName() (string, error)