DatabaseGenerator class
Generator for database instance code.
This generator creates the database instance class that handles database initialization, table creation, and seed data insertion.
- Inheritance
-
- Object
- BaseGenerator
- DatabaseGenerator
Constructors
- DatabaseGenerator(Local2DartConfig config, String packagePath)
- Creates a new DatabaseGenerator instance.
Properties
- config → Local2DartConfig
-
The configuration for generation.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- packagePath → String
-
The path where the package should be generated.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
camelCase(
String text) → String -
Converts a string to camelCase.
inherited
-
generate(
) → Future< void> -
Generates the code.
override
-
generateDatabaseInstance(
) → Future< void> - Generates the database instance class.
-
getDartType(
String sqlType) → String -
Gets the Dart type for an SQL type.
inherited
-
getDefaultType(
String dartType) → String -
Gets the default value for a Dart type.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pascalCase(
String text) → String -
Converts a string to PascalCase.
inherited
-
snakeCase(
String text) → String -
Converts a string to snake_case.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeFile(
String path, String content) → Future< void> -
Writes content to a file.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited