orm 4.0.0-alpha.1 copy "orm: ^4.0.0-alpha.1" to clipboard
orm: ^4.0.0-alpha.1 copied to clipboard

◭ Next-generation ORM for Dart & Flutter | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB.

example/main.dart

import 'dart:io';

import 'package:orm/orm.dart';

import '../prisma/dart/client.dart';
import '../prisma/dart/prisma.dart';

void main() async {
  final prisma = PrismaClient();
  try {
    final user = await prisma.user.findFirstOrThrow(
      select: UserSelect(id: true, name: true, $count: PrismaUnion.$1(true)),
    );

    print(
        'Fond user ${user.name} (ID: ${user.id}), Total posts: ${user.$count?.posts}');
  } finally {
    await prisma.$disconnect();
    exit(0);
  }
}
213
likes
0
pub points
88%
popularity

Publisher

verified publisherodroe.dev

◭ Next-generation ORM for Dart & Flutter | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB.

Homepage
Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

github.com
opencollective.com
www.patreon.com

License

unknown (license)

Dependencies

code_builder, dart_style, decimal, json_rpc_2, path, recase, retry, stream_channel, webfetch

More

Packages that depend on orm