Module convert

Source

Macros§

parse_number_to_value 🔒

Structs§

ColumnDef
SQL column definition
ColumnOptionDef
An optionally-named ColumnOption: [ CONSTRAINT <name> ] <column-option>.
Function
A function call
Ident
An identifier, decomposed into its value or character data and the quote style.
ObjectName
A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj

Enums§

BinaryOperator
Binary operators
ColumnOption
ColumnOptions are modifiers that follow a column definition in a CREATE TABLE statement.
DataType
SQL data types
Expr
An SQL expression of any type.
FunctionArg
FunctionArgExpr
FunctionArguments
The arguments passed to a function call.
SqlOption
SqlValue
Primitive SQL values such as number and string
TableConstraint
A table-level constraint, specified in a CREATE TABLE or an ALTER TABLE ADD <constraint> statement.
TimezoneInfo
Timestamp and Time data types information about TimeZone formatting.
UnaryOperator
Unary operators

Traits§

Visit
A type that can be visited by a Visitor. See Visitor for recursively visiting parsed SQL statements.
VisitMut
A type that can be visited by a VisitorMut. See VisitorMut for recursively visiting parsed SQL statements.
Visitor
A visitor that can be used to walk an AST tree.
VisitorMut
A visitor that can be used to mutate an AST tree.

Functions§

auto_cast_to_numeric 🔒
Casts string to value of specified numeric data type. If the string cannot be parsed, returns an error.
parse_hex_string 🔒
parse_sql_number 🔒
parse_string_to_value 🔒
sql_number_to_value 🔒
Convert a sql value into datatype’s value
sql_value_to_value
Converts SQL value to value according to the data type. If auto_string_to_numeric is true, tries to cast the string value to numeric values, and returns error if the cast fails.
visit_expressions_mut
Invokes the provided closure iteratively with a mutable reference to all expressions present in v.
visit_statements_mut
Invokes the provided closure on all statements (e.g. SELECT, CREATE TABLE, etc) present in v