ormed_sqlite_core 0.1.0 copy "ormed_sqlite_core: ^0.1.0" to clipboard
ormed_sqlite_core: ^0.1.0 copied to clipboard

Shared SQLite grammar, schema dialect, type mapping, and codecs for Ormed runtime adapters.

ormed_sqlite_core #

Shared SQLite primitives for Ormed runtime adapters.

This package contains SQLite logic that is runtime-agnostic:

  • SQL grammar compilation
  • Schema dialect generation
  • Type mapping and value codecs
  • Migration blueprint extensions

Use this package when implementing a SQLite-compatible runtime driver (for example, local sqlite3, D1, or other remote SQLite services).

For the default local SQLite runtime adapter, use package:ormed_sqlite/ormed_sqlite.dart.

Application code should use runtime package helpers (not ormed_sqlite_core directly):

import 'dart:io';

import 'package:ormed/ormed.dart';
import 'package:ormed_sqlite/ormed_sqlite.dart';
import 'package:your_app/src/models/user.orm.dart';

DataSource createDataSource() {
  final env = OrmedEnvironment.fromDirectory(Directory.current);
  final registry = ModelRegistry()..register(UserOrmDefinition.definition);
  final path = env.string('DB_PATH', fallback: 'database/app.sqlite');
  return DataSource(
    registry.sqliteFileDataSourceOptions(path: path, name: 'default'),
  );
}

Example #

ormed_sqlite_core is most useful when building adapters/tools around SQLite SQL generation. Run the example to preview generated SQLite DDL:

dart run example/main.dart
0
likes
160
points
84
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Shared SQLite grammar, schema dialect, type mapping, and codecs for Ormed runtime adapters.

Repository (GitHub)
View/report issues

Topics

#orm #database #sqlite #driver

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

ormed

More

Packages that depend on ormed_sqlite_core