OnCreateQuery class Null safety

An internal schema entity to run an sql statement when the database is created.

The generator uses this entity to implement @create statements in drift files:

CREATE TABLE users (name TEXT);

@create: INSERT INTO users VALUES ('Bob');

A OnCreateQuery is emitted for each @create statement in an included drift file.

Inheritance

Constructors

OnCreateQuery(String sql)
Create a query that will be run in the default onCreate migration.

Properties

entityName String
The (unalised) name of this entity in the database.
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sql String
The sql statement that should be run in the default onCreate clause.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited