StatementParameters class sealed

A set of values that can be used to bind parameters in a SQL query.

Parameters are placeholder values in SQL that can safely be bound to values later without a risk of SQL injection attacks. Depending on the syntax used to declare a parameter, it may make sense to pass parameters by their index or by name. The different constructors of this class can be used to control how parameters are passed.

This package supports binding int, BigInt, String, double, List<int> and null values by default. For custom values, such as those using the pointer-binding interface provided by sqlite3, CustomStatementParameter can be implemented and passed as a parameter as well.

Constructors

StatementParameters(List<Object?> parameters)
Passes parameters by their variable number.
const
factory
StatementParameters.bindCustom(void bind(CommonPreparedStatement stmt))
Passes variables by invoking a callback responsible for using a native statement handle to bind parameters.
const
factory
StatementParameters.empty()
Convenience factory to use when no parameters should be passed.
const
factory
StatementParameters.named(Map<String, Object?> parameters)
Passes variables by their name.
const
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