SchemaWorkflow class
Convenience workflow for loading, validating, and resolving schema config.
Constructors
-
SchemaWorkflow({SchemaParser parser = const SchemaParser(), SchemaValidator validator = const SchemaValidator(), DatasourceUrlResolver? datasourceUrlResolver, Map<
String, String> ? environment}) -
Creates a workflow with optional parser, validator, and environment.
const
Properties
- datasourceUrlResolver → DatasourceUrlResolver?
-
Optional provider hook used to normalize resolved datasource URLs.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- parser → SchemaParser
-
Parser used to convert source text into a schema AST.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- validator → SchemaValidator
-
Validator used after parsing.
final
Methods
-
formatSchema(
String schemaPath) → Future< String> - File-backed formatting is unavailable on web builds.
-
formatSchemaSync(
String schemaPath) → String - File-backed formatting is unavailable on web builds.
-
formatSource(
String source) → String - Formats raw schema source into the canonical serialized form.
-
loadValidatedSchema(
String schemaPath) → Future< LoadedSchemaDocument> - File-backed loading is unavailable on web builds.
-
loadValidatedSchemaSource(
{required String source, String filePath = 'schema.prisma'}) → LoadedSchemaDocument - Validates raw schema source without relying on a filesystem.
-
loadValidatedSchemaSync(
String schemaPath) → LoadedSchemaDocument - File-backed loading is unavailable on web builds.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveDatasource(
LoadedSchemaDocument loaded, {String? datasourceName, required String expectedProvider}) → ResolvedDatasourceConfig - Resolves datasource settings for a loaded schema.
-
resolveGenerator(
LoadedSchemaDocument loaded, {String? generatorName, String expectedProvider = 'comon_orm', String fallbackOutputPath = 'lib/generated/comon_orm_client.dart'}) → ResolvedGeneratorConfig - Resolves generator settings for a loaded schema.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited