phorm_annotations 1.2.0 copy "phorm_annotations: ^1.2.0" to clipboard
phorm_annotations: ^1.2.0 copied to clipboard

Annotation library for declarative SQL table and schema definitions in Dart. Designed to be used with code generators that produce SQL schemas, migrations, or runtime metadata.

example/main.dart

// Examples print to the console for illustration only.
// ignore_for_file: avoid_print

import 'package:phorm_annotations/phorm_annotations.dart';

void main() {
  // Describe a table declaratively with PHORM annotations.
  // In a real project you put these annotations on your model classes and let
  // `phorm_generator` produce the schema, mappers and migrations for you.
  const userSchema = Schema(tableName: 'users');

  print('Configured table: ${userSchema.tableName}');
  print('Target dialect:   ${userSchema.dialect}');
  print('Timestamps:       ${userSchema.timestamps}');
}
1
likes
160
points
561
downloads
screenshot

Documentation

API reference

Publisher

verified publisherinterlib.dev

Weekly Downloads

Annotation library for declarative SQL table and schema definitions in Dart. Designed to be used with code generators that produce SQL schemas, migrations, or runtime metadata.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

meta

More

Packages that depend on phorm_annotations