PgSql class

A description of a SQL query as interpreted by this package.

This includes the SQL string to send to the database and known data types for parameters, if any.

Queries can be sent to postgres as-is. To do that, pass a string to PgSession.prepare or PgSession.execute or use the default PgSql constructor. These queries are not intepreted or altered by this package in any way. If you're using parameter in those queries, you either have to specify their types in the PgSql constructor, or exclusively use PgTypedParameter instances in PgSession.execute, PgStatement.bind and PgStatement.run.

Alternatively, you can use named variables that will be desugared by this package with the PgSql.map factory.

Constructors

PgSql(String sql, {List<PgDataType<Object>>? types})
The default constructor, sending sql to the Postgres database without any modification.
factory
PgSql.map(String sql, {String substitution})
Looks for named parameters in sql and desugars them.
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

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