ValueEncoder class abstract interface

Interface for value encoders.

Can be accessed through the instance property if a database has been created before.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

convert(Object? input, {bool escapeStrings = true, bool hasDefaults = false}) → String
Converts an object to a string.
encodeColumnValue(Column column, dynamic value, {bool hasDefaults = false}) → String
Converts a column value to a string, applying column-specific coercion.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
quoteTableName(String tableName) → String
Quotes a table name for use as a SQL identifier. A schema.table name is qualified where the dialect supports schemas.
toString() → String
A string representation of this object.
inherited
tryConvert(Object? input, {bool escapeStrings = false}) → String?
Tries to convert an object to a string. Returns null if the conversion fails.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → ValueEncoder
The shared singleton encoder for the current database to be used for query builder and expressions to correctly encode values.
no setter

Static Methods

set(ValueEncoder encoder) → void
Sets the singleton instance to the given encoder.