package
0.0.0-20250302012944-701c1ceec546
Repository: https://github.com/khulnasoft/devsecdb.git
Documentation: pkg.go.dev

# Packages

Package catalog provides API definition for catalog service.
Package main is the Go code generator for SQL review rules.
Package mssql is the advisor for MSSQL database.
Package mysql implements the SQL advisor rules for MySQL.
No description provided by the author
Package oracle is the advisor for oracle database.
Package pg implements the SQL advisor rules for PostgreSQL.
Package snowflake is the advisor for snowflake database.
package tidb implements the SQL advisor rules for MySQL.

# Functions

Check runs the advisor and returns the advices.
No description provided by the author
NewStatusBySQLReviewRuleLevel returns status by SQLReviewRuleLevel.
NormalizeStatement limit the max length of the statements.
Query runs the EXPLAIN or SELECT statements for advisors.
Register makes a advisor available by the provided id.
RunSQLReviewRuleTest helps to test the SQL review rule.
SetDefaultSQLReviewRulePayload sets the default payload for this rule.
SQLReviewCheck checks the statements with sql review rules.
UnmarshalCommentConventionRulePayload will unmarshal payload to CommentConventionRulePayload.
UnmarshalNamingCaseRulePayload will unmarshal payload to NamingCaseRulePayload.
UnmarshalNamingRulePayloadAsRegexp will unmarshal payload to NamingRulePayload and compile it as regular expression.
UnmarshalNamingRulePayloadAsTemplate will unmarshal payload to NamingRulePayload and extract all the template keys.
UnmarshalNumberTypeRulePayload will unmarshal payload to NumberTypeRulePayload.
UnmarshalRequiredColumnList will unmarshal payload and parse the required column list.
UnmarshalStringArrayTypeRulePayload will unmarshal payload to StringArrayTypeRulePayload.
UnmarshalStringTypeRulePayload will unmarshal payload to StringTypeRulePayload.

# Constants

Advise not using online migration for the issue.
1801 ~ 1899 advice error code.
Advise using online migration to run the statement.
Application error codes.
Application error codes.
Application error codes.
2001 ~ 2099 builtin error code.
No description provided by the author
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
ColumnListTemplateToken is the token for column name list.
Application error codes.
Application error codes.
Application error codes.
1301 ~ 1399 comment error code.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
101 ~ 199 compatibility error code.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
701 ~ 799 database advisor error code.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
1001 ~ 1099 charset error code.
1201 ~ 1299 collation error code.
Application error codes.
Application error codes.
1501 ~ 1599 event error code.
1701 ~ 1799 function error code.
1401 ~ 1499 procedure error code.
1601 ~ 1699 view error code.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
1101 ~ 1199 insert/update/delete error code.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
MockOldIndexName is the mock old index for test.
MockOldMySQLPKName is the mock old primary key for MySQL test.
MockOldPostgreSQLPKName is the mock old primary key for PostgreSQL test.
MockOldUKName is the mock old unique key for test.
MockTableName is the mock table for test.
MSSQLBuiltinPriorBackupCheck is an advisor type for MSSQL prior backup check.
MSSQLColumnMaximumVarcharLength is an advisor type for MSSQL maximum varchar length.
MSSQLColumnNoNull is an advisor type for MSSQL column no NULL value.
MSSQLColumnRequirement is an advisor type for MSSQL column requirement.
MSSQLColumnTypeDisallowList is an advisor type for MSSQL column type disallow list.
MSSQLFuctionDisallowCreate restricts the creation of functions.
MSSQLIdentifierNamingNoKeyword is an advisor type for MSSQL identifier naming convention without keyword.
No description provided by the author
MSSQLMigrationCompatibility is an advisor type for MSSQL migration compatibility.
MSSQLNamingTableConvention is an advisor type for MSSQL table naming convention.
MSSQLNoSelectAll is an advisor type for MSSQL no select all.
MSSQLProcedureDisallowCreateOrAlter restricts the creation of procedures.
MSSQLStatementDisallowCrossDBQueries prohibits cross database queries.
No description provided by the author
No description provided by the author
MSSQLStatementWhereDisallowFunctionsAndCalculations prohibit using functions or performing calculation in the where clause.
MSSQLSyntax is an advisor type for MSSQL syntax.
MSSQLTableDisallowDDL is an advisor type for MSSQL disallow DDL for specific tables.
MSSQLTableDisallowDML is an advisor type for MSSQL disallow DML for specific tables.
MSSQLTableDropNamingConvention is an advisor type for MSSQL table drop with naming convention.
MSSQLTableNamingNoKeyword is an advisor type for MSSQL table naming convention without keyword.
MSSQLTableNoFK is an advisor type for MSSQL table disallow foreign key.
MSSQLTableRequirePK is an advisor type for MSSQL table require primary key.
MSSQLWhereRequirementForSelect is an advisor type for MySQL WHERE clause requirement in SELECT statements.
MSSQLWhereRequirementForUpdateDelete is an advisor type for MySQL WHERE clause requirement in UPDATE/DELETE statements.
MySQLAutoIncrementColumnInitialValue is an advisor type for MySQL auto-increment column initial value.
MySQLAutoIncrementColumnMustInteger is an advisor type for auto-increment column.
MySQLAutoIncrementColumnMustUnsigned is an advisor type for MySQL unsigned auto-increment column.
MySQLBuiltinPriorBackupCheck is an advisor type for MySQL prior backup check.
MySQLCharsetAllowlist is an advisor type for MySQL charset allowlist.
MySQLCollationAllowlist is an advisor type for MySQL collation allowlist.
MySQLColumnCommentConvention is an advisor type for MySQL column comment convention.
MySQLColumnDisallowChanging is an advisor type for MySQL disallow CHANGE COLUMN statement.
MySQLColumnDisallowChangingOrder is an advisor type for MySQL disallow changing column order.
MySQLColumnDisallowChangingType is an advisor type for MySQL disallow changing column type.
MySQLColumnDisallowDrop is an advisor type for MySQL disallow DROP COLUMN statement.
MySQLColumnDisallowDropInIndex is an advisor type for MySQL disallow DROP COLUMN in index.
MySQLColumnMaximumCharacterLength is an advisor type for MySQL maximum character length.
MySQLColumnMaximumVarcharLength is an advisor type for MySQL maximum varchar length.
MySQLColumnNoNull is an advisor type for MySQL column no NULL value.
MySQLColumnRequireCharset is an advisor type for MySQL column require charset.
MySQLColumnRequireCollation is an advisor type for MySQL column require collation.
MySQLColumnRequirement is an advisor type for MySQL column requirement.
MySQLColumnSetDefaultForNotNull is an advisor type for MySQL set default value for not null column.
MySQLColumnTypeDisallowList is an advisor type for MySQL column type disallow list.
MySQLCurrentTimeColumnCountLimit is an advisor type for MySQL current time column count limit.
MySQLDatabaseAllowDropIfEmpty is an advisor type for MySQL only allow drop empty database.
MySQLDisallowOfflineDDL is an advisor type for MySQL disallow Offline DDL.
MySQLDisallowOrderBy is an advisor type for MySQL no ORDER BY clause in DELETE/UPDATE statement.
MySQLDisallowSetColumnCharset is an advisor type for MySQL disallow set column charset.
MySQLEventDisallowCreate is an advisor type for MySQL disallow create event.
MySQLFunctionDisallowCreate is an advisor type for MySQL disallow create function.
MySQLFunctionDisallowedList is an advisor type for MySQL disallowed function list.
MySQLIdentifierNamingNoKeyword is an advisor type for MySQL identifier naming convention without keyword.
MySQLIndexKeyNumberLimit is an advisor type for MySQL index key number limit.
MySQLIndexNoDuplicateColumn is an advisor type for MySQL no duplicate columns in index.
MySQLIndexPKType is an advisor type for MySQL correct type of PK.
MySQLIndexTotalNumberLimit is an advisor type for MySQL index total number limit.
MySQLIndexTypeAllowList is an advisor type for MySQL index type allowlist.
MySQLIndexTypeNoBlob is an advisor type for MySQL index type no blob.
MySQLInsertDisallowOrderByRand is an advisor type for MySQL to disallow order by rand in INSERT statements.
MySQLInsertMustSpecifyColumn is an advisor type for MySQL to enforce column specified.
MySQLInsertRowLimit is an advisor type for MySQL to limit INSERT rows.
MySQLMergeAlterTable is an advisor type for MySQL no redundant ALTER TABLE statements.
MySQLMigrationCompatibility is an advisor type for MySQL migration compatibility.
MySQLNamingAutoIncrementColumnConvention is an advisor type for MySQL auto-increment naming convention.
MySQLNamingColumnConvention is an advisor type for MySQL column naming convention.
MySQLNamingFKConvention is an advisor type for MySQL foreign key naming convention.
MySQLNamingIndexConvention is an advisor type for MySQL index key naming convention.
MySQLNamingTableConvention is an advisor type for MySQL table naming convention.
MySQLNamingUKConvention is an advisor type for MySQL unique key naming convention.
MySQLNoLeadingWildcardLike is an advisor type for MySQL no leading wildcard LIKE.
MySQLNoSelectAll is an advisor type for MySQL no select all.
MySQLOnlineMigration is an advisor type for MySQL using online migration to migrate large tables.
MySQLPrimaryKeyTypeAllowlist is an advisor type for MySQL primary key type allowlist.
MySQLProcedureDisallowCreate is an advisor type for MySQL disallow create procedure.
MySQLRequireColumnDefault is an advisor type for MySQL column default requirement.
MySQLStatementAddColumnWithoutPosition is an advisor type for MySQL checking no position in ADD COLUMN clause.
MySQLStatementAffectedRowLimit is an advisor type for MySQL UPDATE/DELETE affected row limit.
MySQLStatementDisallowCommit is an advisor type for MySQL to disallow commit.
MySQLStatementDisallowLimit is an advisor type for MySQL no LIMIT clause in INSERT/UPDATE/DELETE statement.
MySQLStatementDisallowMixInDDL is the advisor for MySQL that checks no DML statements are mixed in the DDL statements.
MySQLStatementDisallowMixInDML is the advisor for MySQL that checks no DDL statements are mixed in the DML statements.
MySQLStatementDisallowUsingFilesort is an advisor type for MySQL disallow using filesort in execution plan.
MySQLStatementDisallowUsingTemporary is an advisor type for MySQL disallow using temporary in execution plan.
MySQLStatementDMLDryRun is an advisor type for MySQL DML dry run.
MySQLStatementJoinStrictColumnAttrs is an advisor type for MySQL statement strict column attrs(type, charset) in join.
MySQLStatementMaxExecutionTime is an advisor type for MySQL statement max execution time.
MySQLStatementMaximumJoinTableCount is an advisor type for MySQL statement maximum join table count.
MySQLStatementMaximumLimitValue is an advisor type for MySQL statement maximum limit value.
MySQLStatementMaximumStatementsInTransaction is an advisor type for MySQL maximum statements in transaction.
MySQLStatementQueryMinumumPlanLevel is an advisor type for checking MySQL query minimum plan level.
MySQLStatementRequireAlgorithmOption is an advisor type for MySQL statement require algorithm option for online DDL.
MySQLStatementRequireLockOption is an advisor type for MySQL statement require lock option for online DDL.
MySQLStatementSelectFullTableScan is an advisor type for checking MySQL select full table scan or not.
MySQLStatementWhereDisallowUsingFunction is an advisor type for checking MySQL disallow using function in WHERE clause.
MySQLStatementWhereMaximumLogicalOperatorCount is an advisor type for checking MySQL statement maximum logical operator count in WHERE clause.
MySQLStatementWhereNoEqualNull is an advisor type for checking MySQL no equal null in WHERE clause.
MySQLSyntax is an advisor type for MySQL syntax.
MySQLTableCommentConvention is an advisor for MySQL table comment convention.
MySQLTableDisallowDDL is an advisor type for MySQL disallow DDL.
MySQLTableDisallowDML is an advisor type for MySQL disallow DML.
MySQLTableDisallowPartition is an advisor type for MySQL disallow table partition.
MySQLTableFieldsMaximumCount is an advisor type for MySQL table fields maximum count.
MySQLTableDisallowTrigger is an advisor type for MySQL disallow table trigger.
MySQLTableDropNamingConvention is an advisor type for MySQL table drop with naming convention.
MySQLTableFieldsMaximumCount is an advisor type for limiting MySQL table size.
MySQLTableNoDuplicateIndex is an advisor type for MySQL no duplicate index.
MySQLTableNoFK is an advisor type for MySQL table disallow foreign key.
MySQLTableRequireCharset is an advisor type for MySQL table require charset.
MySQLTableRequireCollation is an advisor type for MySQL table require collation.
MySQLTableRequirePK is an advisor type for MySQL table require primary key.
MySQLTableTextFieldsTotalLength is an advisor type for MySQL table text fields total length.
MySQLUseInnoDB is an advisor type for MySQL InnoDB Engine.
MySQLViewDisallowCreate is an advisor type for MySQL disallow create view.
MySQLWhereRequirement is an advisor type for MySQL WHERE clause requirement.
MySQLWhereRequirementForSelect is an advisor type for MySQL WHERE clause requirement in SELECT statements.
MySQLWhereRequirementForUpdateDelete is an advisor type for MySQL WHERE clause requirement in UPDATE/DELETE statements.
308 name is keyword identifier advisor error code.
307 auto_increment column naming advisor error code.
309 naming case mismatch advisor error code.
302 column naming advisor error code.
305 foreign key naming advisor error code.
303 index naming advisor error code.
310 not fully qualified object name error code.
306 primary key naming advisor error code.
301 ~ 399 naming error code 301 table naming advisor error code.
304 unique key naming advisor error code.
Application error codes.
Application error codes.
Application error codes.
401 ~ 499 column error code.
Application error codes.
Application error codes.
501 engine error code.
Application error codes.
801 ~ 899 index error code.
Application error codes.
Application error codes.
OracleAddNotNullColumnRequireDefault is an advisor type for Oracle adding not null column requires default.
OracleBuiltinPriorBackupCheck is an advisor type for Oracle prior backup check.
OracleColumnCommentConvention is an advisor type for Oracle column comment convention.
OracleColumnMaximumCharacterLength is an advisor type for Oracle maximum character length.
OracleColumnMaximumVarcharLength is an advisor type for Oracle maximum varchar length.
OracleColumnNoNull is an advisor type for Oracle column no NULL value.
OracleColumnRequirement is an advisor type for Oracle column requirement.
OracleColumnTypeDisallowList is an advisor type for Oracle column type disallow list.
OracleIdentifierCase is an advisor type for Oracle identifier case.
OracleIdentifierNamingNoKeyword is an advisor type for Oracle identifier naming convention without keyword.
OracleIndexKeyNumberLimit is an advisor type for Oracle index key number limit.
OracleInsertMustSpecifyColumn is an advisor type for Oracle to enforce column specified.
OracleNamingTableConvention is an advisor type for Oracle table naming convention.
OracleNoLeadingWildcardLike is an advisor type for Oracle no leading wildcard LIKE.
OracleNoSelectAll is an advisor type for Oracle no select all.
OracleRequireColumnDefault is an advisor type for Oracle column default requirement.
No description provided by the author
No description provided by the author
OracleStatementDMLDryRun is an advisor type for Oracle DML dry run.
OracleSyntax is an advisor type for Oracle syntax.
OracleTableCommentConvention is an advisor type for Oracle table comment convention.
OracleTableNamingNoKeyword is an advisor type for Oracle table naming convention without keyword.
OracleTableNoFK is an advisor type for Oracle table disallow foreign key.
OracleTableRequirePK is an advisor type for Oracle table require primary key.
OracleWhereRequirementForSelect is an advisor type for Oracle WHERE clause requirement in SELECT statements.
OracleWhereRequirementForUpdateDelete is an advisor type for Oracle WHERE clause requirement in UPDATE/DELETE statements.
PostgreSQLAddCheckNotValid is an advisor type for PostgreSQL to add check not valid.
PostgreSQLAddFKNotValid is a PostgreSQL advisor type requiring add foreign key not valid.
PostgreSQLBuiltinPriorBackupCheck is an advisor type for PostgreSQL do prior backup check.
PostgreSQLCollationAllowlist is an advisor type for PostgreSQL collation allowlist.
PostgreSQLColumnCommentConvention is an advisor type for PostgreSQL column comment convention.
PostgreSQLColumnDefaultDisallowVolatile is an advisor type for PostgreSQL column default disallow volatile.
PostgreSQLColumnDisallowChangingType is an advisor type for PostgreSQL disallow changing column type.
PostgreSQLColumnMaximumCharacterLength is an advisor type for PostgreSQL maximum character length.
PostgreSQLColumnNoNull is an advisor type for PostgreSQL column no NULL value.
PostgreSQLColumnRequirement is an advisor type for PostgreSQL column requirement.
PostgreSQLColumnTypeDisallowList is an advisor type for Postgresql column type disallow list.
PostgreSQLCommentConvention is an advisor type for PostgreSQL comment convention.
PostgreSQLCreateIndexConcurrently is an advisor type for PostgreSQL to create index concurrently.
PostgreSQLDisallowAddColumnWithDefault is an advisor type for PostgreSQL to disallow add column with default.
PostgreSQLDisallowAddNotNull is an advisor type for PostgreSQl to disallow add not null.
PostgreSQLEncodingAllowlist is an advisor type for PostgreSQL encoding allowlist.
PostgreSQLIndexKeyNumberLimit is an advisor type for postgresql index key number limit.
PostgreSQLIndexNoDuplicateColumn is an advisor type for Postgresql no duplicate columns in index.
PostgreSQLIndexTotalNumberLimit is an advisor type for PostgreSQL index total number limit.
PostgreSQLInsertDisallowOrderByRand is an advisor type for PostgreSQL to disallow order by rand in INSERT statements.
PostgreSQLInsertMustSpecifyColumn is an advisor type for PostgreSQL to enforce column specified.
PostgreSQLInsertRowLimit is an advisor type for PostgreSQL to limit INSERT rows.
PostgreSQLMergeAlterTable is an advisor type for PostgreSQL no redundant ALTER TABLE statements.
PostgreSQLMigrationCompatibility is an advisor type for PostgreSQL migration compatibility.
PostgreSQLNamingColumnConvention is an advisor type for PostgreSQL column naming convention.
PostgreSQLNamingFKConvention is an advisor type for PostgreSQL foreign key naming convention.
PostgreSQLNamingFullyQualifiedObjectName is an advisor type for enforing full qualified object name.
PostgreSQLNamingIndexConvention is an advisor type for PostgreSQL index naming convention.
PostgreSQLNamingPKConvention is an advisor type for PostgreSQL primary key naming convention.
PostgreSQLNamingTableConvention is an advisor type for PostgreSQL table naming convention.
PostgreSQLNamingUKConvention is an advisor type for PostgreSQL unique key naming convention.
PostgreSQLNoLeadingWildcardLike is an advisor type for PostgreSQL no leading wildcard LIKE.
PostgreSQLNonTransactional is an advisor type for PostgreSQL to disallow non-transactional statements.
PostgreSQLNoSelectAll is an advisor type for PostgreSQL no select all.
PostgreSQLPrimaryKeyTypeAllowlist is an advisor type for postgresql primary key type allowlist.
PostgreSQLRequireColumnDefault is an advisor type for PostgreSQL column default requirement.
PostgreSQLStatementAffectedRowLimit is an advisor type for PostgreSQL UPDATE/DELETE affected row limit.
PostgreSQLStatementCheckSetRoleVariable is an advisor type for PostgreSQL to check set role variable.
PostgreSQLStatementCreateSpecifySchema is an advisor type for PostgreSQL to specify schema when creating.
PostgreSQLStatementDisallowCommit is an advisor type for PostgreSQL to disallow commit.
No description provided by the author
No description provided by the author
PostgreSQLStatementDisallowOnDelCascade is an advisor type for PostgreSQL to disallow ON DELETE CASCADE clauses.
PostgreSQLStatementDisallowRemoveTblCascade is an advisor type for PostgreSQL to disallow CASCADE when removing a table.
PostgreSQLStatementDMLDryRun is an advisor type for PostgreSQL DML dry run.
PostgreSQLStatementMaximumLimitValue is an advisor type for PostgreSQL statement maximum limit value.
PostgreSQLStatementObjectOwnerCheck is an advisor type for PostgreSQL do object owner check.
PostgreSQLSyntax is an advisor type for PostgreSQL syntax.
PostgreSQLTableCommentConvention is an advisor type for PostgreSQL table comment convention.
PostgreSQLTableDisallowPartition is an advisor type for PostgreSQL disallow table partition.
PostgreSQLTableDropNamingConvention is an advisor type for PostgreSQL table drop with naming convention.
PostgreSQLTableNoFK is an advisor type for PostgreSQL table disallow foreign key.
PostgreSQLTableRequirePK is an advisor type for PostgreSQL table require primary key.
PostgreSQLWhereRequirementForSelect is an advisor type for PostgreSQL WHERE clause requirement for SELECT statements.
PostgreSQLWhereRequirementForUpdateDelete is an advisor type for PostgreSQL WHERE clause requirement for UPDATE/DELETE statements.
Application error codes.
Application error codes.
Application error codes.
ReferencedColumnNameTemplateToken is the token for referenced column name.
ReferencedTableNameTemplateToken is the token for referenced table name.
ReferencingColumnNameTemplateToken is the token for referencing column name.
ReferencingTableNameTemplateToken is the token for referencing table name.
1901 ~ 1999 schema error code.
SchemaRuleAddNotNullColumnRequireDefault enforce the adding not null column requires default.
SchemaRuleAutoIncrementColumnNaming enforce the auto_increment column name format.
SchemaRuleCharsetAllowlist enforce the charset allowlist.
SchemaRuleCollationAllowlist enforce the collation allowlist.
SchemaRuleColumnAutoIncrementInitialValue enforce the initial auto-increment value.
SchemaRuleColumnAutoIncrementMustInteger require the auto-increment column to be integer.
SchemaRuleColumnAutoIncrementMustUnsigned enforce the auto-increment column to be unsigned.
SchemaRuleColumnCommentConvention enforce the column comment convention.
SchemaRuleColumnDefaultDisallowVolatile enforce the column default disallow volatile.
SchemaRuleColumnDisallowChange disallow CHANGE COLUMN statement.
SchemaRuleColumnDisallowChangeType disallow change column type.
SchemaRuleColumnDisallowChangingOrder disallow changing column order.
SchemaRuleColumnDisallowDrop disallow drop column.
SchemaRuleColumnDisallowDropInIndex disallow drop index column.
SchemaRuleColumnDisallowSetCharset disallow set column charset.
SchemaRuleColumnMaximumCharacterLength enforce the maximum character length.
SchemaRuleColumnMaximumVarcharLength enforce the maximum varchar length.
SchemaRuleColumnNaming enforce the column name format.
SchemaRuleColumnNotNull enforce the columns cannot have NULL value.
SchemaRuleColumnRequireCharset enforce the column require charset.
SchemaRuleColumnRequireCollation enforce the column require collation.
SchemaRuleColumnRequireDefault enforce the column default.
SchemaRuleColumnSetDefaultForNotNull require the not null column to set default value.
SchemaRuleColumnTypeDisallowList enforce the column type disallow list.
SchemaRuleCommentLength limit comment length.
SchemaRuleCreateIndexConcurrently require creating indexes concurrently.
SchemaRuleCurrentTimeColumnCountLimit enforce the current column count limit.
SchemaRuleDropEmptyDatabase enforce the MySQL and TiDB support check if the database is empty before users drop it.
SchemaRuleEventDisallowCreate disallow create event.
SchemaRuleFKNaming enforce the foreign key name format.
SchemaRuleFullyQualifiedObjectName enforces using fully qualified object name.
SchemaRuleFunctionDisallowCreate disallow create function.
SchemaRuleFunctionDisallowList enforce the disallowed function list.
SchemaRuleIdentifierCase enforce the identifier case.
SchemaRuleIdentifierNoKeyword enforce the identifier not to use keyword.
SchemaRuleIDXNaming enforce the index name format.
SchemaRuleIndexKeyNumberLimit enforce the index key number limit.
SchemaRuleIndexNoDuplicateColumn require the index no duplicate column.
SchemaRuleIndexNotRedundant prohibits createing redundant indices.
SchemaRuleIndexPKTypeLimit enforce the type restriction of columns in primary key.
SchemaRuleIndexPrimaryKeyTypeAllowlist enforce the primary key type allowlist.
SchemaRuleIndexTotalNumberLimit enforce the index total number limit.
SchemaRuleIndexTypeAllowList enforce the index type allowlist.
SchemaRuleIndexTypeNoBlob enforce the type restriction of columns in index.
SchemaRuleMySQLEngine require InnoDB as the storage engine.
SchemaRuleOnlineMigration advises using online migration to migrate large tables.
SchemaRulePKNaming enforce the primary key name format.
SchemaRuleProcedureDisallowCreate disallow create procedure.
SchemaRuleRequiredColumn enforce the required columns in each table.
SchemaRuleSchemaBackwardCompatibility enforce the MySQL and TiDB support check whether the schema change is backward compatible.
SchemaRuleStatementAddCheckNotValid require add check constraints not valid.
SchemaRuleStatementAddColumnWithoutPosition check no position in ADD COLUMN clause.
SchemaRuleStatementAddFKNotValid require add foreign key not valid.
SchemaRuleStatementAffectedRowLimit enforce the UPDATE/DELETE affected row limit.
SchemaRuleStatementCheckSetRoleVariable require add a check for SET ROLE variable.
SchemaRuleStatementCreateSpecifySchema disallow to create table without specifying schema.
SchemaRuleStatementDisallowAddColumnWithDefault disallow to add column with DEFAULT.
SchemaRuleStatementDisallowAddNotNull disallow to add NOT NULL.
SchemaRuleStatementDisallowCommit disallow using commit in the issue.
SchemaRuleStatementDisallowCrossDBQueries disallow cross database queries.
SchemaRuleStatementDisallowLimit disallow the LIMIT clause in INSERT, DELETE and UPDATE statements.
SchemaRuleStatementDisallowMixInDDL disallows DML statements in DDL statements.
SchemaRuleStatementDisallowMixInDML disallows DDL statements in DML statements.
SchemaRuleStatementDisallowOfflineDDL disallow offline ddl.
SchemaRuleStatementDisallowOnDelCascade disallows ON DELETE CASCADE clauses.
SchemaRuleStatementDisallowOrderBy disallow the ORDER BY clause in DELETE and UPDATE statements.
SchemaRuleStatementDisallowRemoveTblCascade disallows CASCADE when removing a table.
SchemaRuleStatementDisallowUsingFilesort disallow using filesort in execution plan.
SchemaRuleStatementDisallowUsingTemporary disallow using temporary in execution plan.
SchemaRuleStatementDMLDryRun dry run the dml.
SchemaRuleStatementInsertDisallowOrderByRand disallow the order by rand in the INSERT statement.
SchemaRuleStatementInsertMustSpecifyColumn enforce the insert column specified.
SchemaRuleStatementInsertRowLimit enforce the insert row limit.
SchemaRuleStatementJoinStrictColumnAttrs enforce the join strict column attributes.
SchemaRuleStatementMaxExecutionTime enforce the maximum execution time.
SchemaRuleStatementMaximumJoinTableCount enforce the maximum join table count in the statement.
SchemaRuleStatementMaximumLimitValue enforce the maximum limit value.
SchemaRuleStatementMaximumStatementsInTransaction enforce the maximum statements in transaction.
SchemaRuleStatementMergeAlterTable disallow redundant ALTER TABLE statements.
SchemaRuleStatementNoLeadingWildcardLike disallow leading '%' in LIKE, e.g.
SchemaRuleStatementNonTransactional checks for non-transactional statements.
SchemaRuleStatementNoSelectAll disallow 'SELECT *'.
SchemaRuleStatementObjectOwnerCheck checks the object owner for the statement.
SchemaRuleStatementPriorBackupCheck checks for prior backup.
SchemaRuleStatementQueryMinumumPlanLevel enforce the minimum plan level.
SchemaRuleStatementRequireAlgorithmOption require set ALGORITHM option in ALTER TABLE statement.
SchemaRuleStatementRequireLockOption require set LOCK option in ALTER TABLE statement.
SchemaRuleStatementRequireWhereForSelect require 'WHERE' clause for SELECT statements.
SchemaRuleStatementRequireWhereForUpdateDelete require 'WHERE' clause for UPDATE and DELETE statements.
SchemaRuleStatementDisallowAddColumn disallow to add column.
SchemaRuleStatementWhereDisallowFunctionsAndCaculations disallow using function in WHERE clause.
SchemaRuleStatementWhereMaximumLogicalOperatorCount enforce the maximum logical operator count in WHERE clause.
SchemaRuleStatementWhereNoEqualNull check the WHERE clause no equal null.
SchemaRuleTableCommentConvention enforce the table comment convention.
SchemaRuleTableDisallowDDL disallow executing DDL for specific tables.
SchemaRuleTableDisallowDML disallow executing DML on specific tables.
SchemaRuleTableDisallowPartition disallow the table partition.
SchemaRuleTableDisallowSetCharset disallow set table charset.
SchemaRuleTableDisallowTrigger disallow the table trigger.
SchemaRuleTableDropNamingConvention require only the table following the naming convention can be deleted.
SchemaRuleTableLimitSize restrict access to tables based on size.
SchemaRuleTableNameNoKeyword enforce the table name not to use keyword.
SchemaRuleTableNaming enforce the table name format.
SchemaRuleTableNoDuplicateIndex require the table no duplicate index.
SchemaRuleTableNoFK require the table disallow the foreign key.
SchemaRuleTableRequireCharset enforce the table charset.
SchemaRuleTableRequireCollation enforce the table collation.
SchemaRuleTableRequirePK require the table to have a primary key.
SchemaRuleTableTextFieldsTotalLength enforce the total length of text fields.
SchemaRuleUKNaming enforce the unique key name format.
SchemaRuleViewDisallowCreate disallow create view.
Application error codes.
SnowflakeColumnMaximumVarcharLength is an advisor type for Snowflake maximum varchar length.
SnowflakeColumnNoNull is an advisor type for Snowflake column no NULL value.
SnowflakeColumnRequirement is an advisor type for Snowflake column requirement.
SnowflakeIdentifierCase is an advisor type for Snowflake identifier case.
SnowflakeIdentifierNamingNoKeyword is an advisor type for Snowflake identifier naming convention without keyword.
SnowflakeMigrationCompatibility is an advisor type for Snowflake migration compatibility.
SnowflakeNamingTableConvention is an advisor type for Snowflake table naming convention.
SnowflakeNoSelectAll is an advisor type for Snowflake no select all.
SnowflakeSyntax is an advisor type for Snowflake syntax.
SnowflakeTableDropNamingConvention is an advisor type for Snowflake table drop with naming convention.
SnowflakeTableNamingNoKeyword is an advisor type for Snowflake table naming convention without keyword.
SnowflakeTableNoFK is an advisor type for Snowflake table disallow foreign key.
SnowflakeTableRequirePK is an advisor type for Snowflake table require primary key.
SnowflakeWhereRequirement is an advisor type for Snowflake WHERE clause requirement.
SnowflakeWhereRequirementForSelect is an advisor type for Snowflake WHERE clause requirement for SELECT statements.
SnowflakeWhereRequirementForUpdateDelete is an advisor type for Snowflake WHERE clause requirement for UPDATE/DELETE statements.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
228 is deprecated.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
201 ~ 299 statement error code.
Application error codes.
Application error codes.
Application error codes.
SyntaxErrorTitle is the error title for syntax error.
SyntaxModeNormal is the normal syntax mode.
SyntaxModeSDL is the SDL syntax mode.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
TableNameTemplateToken is the token for table name.
601 ~ 699 table rule advisor error code.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.
Application error codes.

# Variables

MockIndexColumnList is the mock index column list for test.
No description provided by the author
MockMySQLDatabase is the mock MySQL database for test.
MockPostgreSQLDatabase is the mock PostgreSQL database for test.
TemplateNamingTokens is the mapping for rule type to template token.

# Structs

CommentConventionRulePayload is the payload for comment convention rule.
Context is the context for advisor.
MockDriver is the driver for test only.
NamingCaseRulePayload is the payload for naming case rule.
NamingRulePayload is the payload for naming rule.
NumberTypeRulePayload is the number type payload.
No description provided by the author
RequiredColumnRulePayload is the payload for required column rule.
SQLReviewCheckContext is the context for SQL review check.
StringArrayTypeRulePayload is the payload for rules with string array value.
StringTypeRulePayload is the string type payload.
TestCase is the data struct for test.

# Interfaces

Advisor is the interface for advisor.

# Type aliases

Code is the error code.
SQLReviewRuleType is the type of schema rule.
SyntaxMode is the type of syntax mode.
Type is the type of advisor.