IdStrategyHelper class
Helper utility for handling ID strategy validation and SQL generation
Constructors
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
Static Methods
-
extractIdStrategy(
ElementAnnotation? idAnnotation) → IDStrategy? - Extract ID strategy from @Id annotation
-
getBigIdStrategySQL(
IDStrategy strategy, DatabaseType dbType) → String - Get big version of ID strategy SQL
-
getIdStrategySQL(
IDStrategy strategy, DatabaseType dbType) → String - Get SQL for ID strategy based on database type
-
getStrategyLabel(
IDStrategy strategy) → String - Get the strategy label for display
-
isAutoIncrementStrategy(
IDStrategy strategy) → bool - Check if strategy requires auto-increment behavior
-
isUuidStrategy(
IDStrategy strategy) → bool - Check if strategy is UUID
-
validateIdAndPrimaryKeyConflict(
ElementAnnotation? idAnnotation, ElementAnnotation? columnAnnotation) → String? - Validate that @Id and @PrimaryKey are not used together on the same field Returns error message if invalid, null if valid
-
validateIdNullability(
ElementAnnotation idAnnotation, bool isNullable) → String? - Validate ID field nullability ID fields must be nullable UNLESS autoIncrement is explicitly false AND strategy is not UUID Returns error message if invalid, null if valid
-
validateIdStrategyForType(
IDStrategy strategy, DartType fieldType) → String? - Validate ID strategy against field type Returns error message if invalid, null if valid