TypeConverter class abstract

By implementing this class and passing it to connect(), it is possible to provide a customised handling of the Dart type encoding and PostgreSQL type decoding.

Implementers

Constructors

TypeConverter()
factory
TypeConverter.raw()
Returns all results in the raw postgresql string format without conversion.
factory

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

decode(String value, int pgType, {String? connectionName}) → Object?
Convert a string recieved from the database into a dart object. Null if it decodes to null, e.g. the json scalar null (a SQL null never gets here).
encode(dynamic value, String? type, {String? connectionName}) → String
Convert an object to a string representation to use in a sql query. Be very careful to escape your strings correctly. If you get this wrong you will introduce a sql injection vulnerability. Consider using the provided encodeString function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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