sqlparser

package
v0.0.0-...-e946c5d Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IParametersHolder

type IParametersHolder interface {
	GetParameters() []interface{}
}

type ISQLDeleteRecognizer

type ISQLDeleteRecognizer interface {
	IWhereRecognizer
}

type ISQLInsertRecognizer

type ISQLInsertRecognizer interface {
	ISQLRecognizer

	/**
	 * Gets insert columns.
	 *
	 * @return the insert columns
	 */
	GetInsertColumns() []string

	/**
	 * Gets insert rows.
	 *
	 * @return the insert rows
	 */
	GetInsertRows() [][]string
}

type ISQLRecognizer

type ISQLRecognizer interface {
	/**
	 * Type of the SQL. INSERT/UPDATE/DELETE ...
	 *
	 * @return sql type
	 */
	GetSQLType() SQLType

	/**
	 * TableRecords source related in the SQL, including alias if any.
	 * SELECT id, name FROM user u WHERE ...
	 * Alias should be 'u' for this SQL.
	 *
	 * @return table source.
	 */
	GetTableAlias() string

	/**
	 * TableRecords name related in the SQL.
	 * SELECT id, name FROM user u WHERE ...
	 * TableRecords name should be 'user' for this SQL, without alias 'u'.
	 *
	 * @return table name.
	 * @see #getTableAlias() #getTableAlias()#getTableAlias()
	 */
	GetTableName() string

	/**
	 * Return the original SQL input by the upper application.
	 *
	 * @return The original SQL.
	 */
	GetOriginalSQL() string
}

type ISQLSelectRecognizer

type ISQLSelectRecognizer interface {
	IWhereRecognizer
}

type ISQLUpdateRecognizer

type ISQLUpdateRecognizer interface {
	IWhereRecognizer

	/**
	 * Gets update columns.
	 *
	 * @return the update columns
	 */
	GetUpdateColumns() []string

	/**
	 * Gets update values.
	 *
	 * @return the update values
	 */
	GetUpdateValues() []string
}

type IWhereRecognizer

type IWhereRecognizer interface {
	ISQLRecognizer

	/**
	 * Gets where condition.
	 *
	 * @return the where condition
	 */
	GetWhereCondition() string
}

type SQLType

type SQLType byte
const (
	SQLType_SELECT SQLType = iota

	SQLType_INSERT

	SQLType_UPDATE

	SQLType_DELETE

	SQLType_SELECT_FOR_UPDATE

	SQLType_REPLACE

	SQLType_TRUNCATE

	SQLType_CREATE

	SQLType_DROP

	SQLType_LOAD

	SQLType_MERGE

	SQLType_SHOW

	SQLType_ALTER

	SQLType_RENAME

	SQLType_DUMP

	SQLType_DEBUG

	SQLType_EXPLAIN

	SQLType_PROCEDURE

	SQLType_DESC

	SQLType_SET SQLType = 27

	SQLType_RELOAD SQLType = 28

	SQLType_SELECT_UNION SQLType = 29

	SQLType_CREATE_TABLE SQLType = 30

	SQLType_DROP_TABLE SQLType = 31

	SQLType_ALTER_TABLE SQLType = 32

	SQLType_SAVE_POINT SQLType = 33

	SQLType_SELECT_FROM_UPDATE SQLType = 34

	SQLType_MULTI_DELETE SQLType = 35

	SQLType_MULTI_UPDATE SQLType = 36

	SQLType_CREATE_INDEX SQLType = 37

	SQLType_DROP_INDEX SQLType = 38
)

func (SQLType) String

func (sqlType SQLType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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