analyzer library

Tools for analyzing the protocol files of a Serverpod project.

Classes

ClassDefinition
A representation of a yaml file in the protocol directory defining a class or exception.
CodeAnalysisCollector
EndpointsAnalyzer
Analyzes dart files for the protocol specification.
EnumDefinition
A representation of a yaml file in the protocol directory defining an enum.
ExceptionClassDefinition
A ClassDefinition specialization that represents an exception.
GeneratorConfig
The configuration of the generation and analyzing process.
MigrationGenerator
MigrationVersion
ModelClassDefinition
A ClassDefinition specialization that represents a model class.
ProtocolDefinition
Defines a projects protocol. This does not include stuff the ProtocolYamlFileAnalyzer analyzed.
SerializableModelAnalyzer
Used to analyze a singe yaml model file.
SerializableModelDefinition
An abstract representation of a yaml file in the protocol directory.
SerializableModelFieldDefinition
Describes a single field of a ClassDefinition.
SerializableModelIndexDefinition
The definition of an index for a file, that is also stored in the database.
SupportedIdType
Supported ID type definitions. All configuration to support other types is done only on this class. A supported id type is a combination of a type and a default value. It is possible to support multiple default values for a same type (e.g. uuid type with default of versions 4 and 7), with each having its getter. For new entries, add a new static getter and update the all getter. If the entry contains a type not yet used by existing id types, it's necessary to update the Table constructor at packages:serverpod/src/database/concepts/table.dart.
TypeDefinition
Contains information about the type of fields, arguments and return values.

Enums

ModelFieldScopeDefinition
The scope of a field.
PackageType
The type of the package.

Extensions

ColumnComparisons on ColumnDefinition
ColumnDefinitionPgSqlGeneration on ColumnDefinition
ColumnMigrationPgSqlGenerator on ColumnMigration
ColumnTypeComparison on ColumnType
DatabaseComparisons on DatabaseDefinition
DatabaseDefinitionPgSqlGeneration on DatabaseDefinition
DatabaseDiffComparisons on DatabaseMigration
DatabaseMigrationPgSqlGenerator on DatabaseMigration
ForeignKeyComparisons on ForeignKeyDefinition
ForeignKeyDefinitionPgSqlGeneration on ForeignKeyDefinition
IndexComparisons on IndexDefinition
IndexDefinitionPgSqlGeneration on IndexDefinition
MigrationActionPgSqlGeneration on DatabaseMigrationAction
TableComparisons on TableDefinition
TableDefinitionExtension on TableDefinition
TableDefinitionPgSqlGeneration on TableDefinition
TableDiffComparisons on TableMigration
TableMigrationPgSqlGenerator on TableMigration
VectorIndexDistanceFunction on VectorDistanceFunction

Constants

pgsqlFunctionRandomUuidV7 → const String

Functions

generateDatabaseMigration({required DatabaseDefinition databaseSource, required DatabaseDefinition databaseTarget}) → DatabaseMigration
generateTableMigration(TableDefinition srcTable, TableDefinition dstTable, List<DatabaseMigrationWarning> warnings) → TableMigration?
removeNullability(String type) String

Exceptions / Errors

SourceSpanException
A class for exceptions that have source span information attached.