Enables Drift to use Postgres-specific types like UUID, JSON, and intervals.
// Source: https://github.com/simolus3/drift | License: MIT | Copyright 2019 Simon Binder // Provided via justclaw.it.com; keep this notice with the code. /// PostgreSQL backend for drift. /// /// For more information on how to use this package, see /// https://drift.simonbinder.eu/docs/platforms/postgres/. library; // ignore_for_file: experimental_member_use import 'package:drift/drift.dart'; import 'package:postgres/postgres.dart' as pg; import 'package:uuid/uuid.dart'; import 'src/array_access_expression.dart'; import 'src/types.dart'; export 'src/pg_database.dart'; export 'package:uuid/uuid_value.dart' show UuidValue; /// Type for columns storing [UuidValue]s. typedef UuidColumn = Column<UuidValue>; /// Type for columns storing [Duration]s as intervals. typedef IntervalColumn = C ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key