DatabaseDefault class final
Explicitly declares a database insert default.
Constructor constants are client-side fallbacks only; they do not imply this annotation or a SQL DEFAULT. An explicit client factory takes precedence over this default. Actual database values always populate complete DTO reads. A generated Id already owns its database default and rejects this annotation.
Constructors
- DatabaseDefault(Object? value)
-
Uses a scalar constant as a database default, including a legal null.
const
- DatabaseDefault.sql(String sql)
-
Uses a trusted SQL expression as a database default.
const
Properties
- expression → String?
-
Trusted SQL expression, without automatic quoting.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → Object?
-
Scalar constant to encode as a SQL default, or null for DatabaseDefault.sql.
final
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