masamune_model_tidb_annotation 3.2.0 copy "masamune_model_tidb_annotation: ^3.2.0" to clipboard
masamune_model_tidb_annotation: ^3.2.0 copied to clipboard

unlisted

Define annotations that generate TiDB Data Service configuration from Masamune models.

masamune_model_tidb_annotation #

Annotations for generating TiDB Data Service Configuration as Code from Masamune models.

@tidbDataService
@CollectionModelPath("users")
abstract class UserModel {
  const UserModel({required this.name});
  final String name;
}

TidbDataService can override the logical database, output directory, and Cloudflare rules.json path. Data Service v1 supports flat model paths only.

Use prefixes to generate physical databases for adapter prefixes in addition to the unprefixed production database.

@TidbDataService(prefixes: ["dev", "staging_"])
@CollectionModelPath("database/main/users")
abstract class UserModel {}

The values above are normalized to dev_ and staging_, generating main.users, dev_main.users, and staging_main.users. Rules are still evaluated with the logical database name main.

0
likes
0
points
285
downloads

Publisher

verified publishermathru.net

Weekly Downloads

Define annotations that generate TiDB Data Service configuration from Masamune models.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

masamune_annotation

More

Packages that depend on masamune_model_tidb_annotation