prisma-dart

Prisma Client Dart is an auto-generated type-safe ORM. It uses Prisma Engine as the data access layer and is as consistent as possible with the Prisma Client JS/TS APIs.

BSD-3-CLAUSE License

Stars
418
Committers
21

Bot releases are visible (Hide)

prisma-dart - Prisma Client Dart v3.4.7

Published by medz 9 months ago

To install Prisma Dart client v3.4.7, run the following command:

dart pub add orm:3.4.7

To update Prisma Dart client v3.4.7, update the orm dependency in your pubspec.yaml file.

dependencies:
  orm: ^3.4.7

What's Changed

  1. Bug: Permission issues that may be caused by using absolute paths are resolved to paths based on pwd.
prisma-dart - Prisma Client Dart v4.0.0-beta.1

Published by medz 9 months ago

To install Prisma Client Dart v4.0.0-beta.1 run:

dart pub add orm:4.0.0-beta.1

Or update your pubspec.yaml file:

dependencies:
  orm: 4.0.0-beta.1

What's Changed

Thanks

@kidusdev

prisma-dart - Prisma Client Dart v4.0.0-beta

Published by medz 9 months ago

To install Prisma Client Dart v4.0.0-beta run:

dart pub add orm:4.0.0-beta

Or update your pubspec.yaml file:

dependencies:
  orm: 4.0.0-beta

What's Changed

The first Beta version is released. This version is a major version. We will conduct a lot of testing on this version to ensure the stability of this version.
In addition, there are no actual code updates in this version, the documentation brings updates to the API Reference:

  1. Client API Reference
  2. Model Delegate API Reference
prisma-dart - Prisma Dart client v4.0.0-alpha.5

Published by medz 9 months ago

To install Prisma Dart client v4.0.0-alpha.5 run:

dart pub add orm:4.0.0-alpha.5

Or update your pubspec.yaml file:

dependencies:
  orm: 4.0.0-alpha.5

What's Changed

  1. FIX fix transaction isolation level not expected.
prisma-dart - Prisma Dart client v4.0.0-alpha.4

Published by medz 9 months ago

To install Prisma Dart client v4.0.0-alpha.4 run:

dart pub add orm:4.0.0-alpha.4

Or update your pubspec.yaml file:

dependencies:
  orm: 4.0.0-alpha.4

What's Changed

  1. OPTIMIZATION Prisma Dart client generator outputs more user-friendly error messages that help you know where the problem lies.
  2. REFACTOR Adjust src code storage structure.
  3. FIX Rethrow start error
  4. FIX Fix input types required multiple fields.
  5. FIX Fix relation count not arguments in include.
prisma-dart - Prisma Dart client v4.0.0-alpha.3

Published by medz 9 months ago

To install Prisma Dart client v4.0.0-alpha.3 run:

dart pub add orm:4.0.0-alpha.3

Or update your pubspec.yaml file:

dependencies:
  orm: 4.0.0-alpha.3

What's Changed

  1. Dump webfetch to 0.0.14 version.
  2. Fixed using a model name with an underscore (_) in schema.prisma causing the generator to fail. - #317 #316
prisma-dart - Prisma Dart client v4.0.0-alpha.2

Published by medz 10 months ago

To install Prisma Dart client v4.0.0-alpha.2 run:

dart pub add orm:4.0.0-alpha.2

Or update your pubspec.yaml file:

dependencies:
  orm: 4.0.0-alpha.2

What's Changed

  1. Change Dart SDK version to ^3.2.0
  2. Support RAW query and execute feature, See Raw queries

Raw queries

You can use $raw to execute raw queries

$raw.query

Execute a raw query, for example:

final result = await prisma.$raw.query('SELECT * FROM "User"'); // PostgreSQL

$raw.execute

Execute a raw query, for example:

final result = await prisma.$raw.execute('DELETE FROM "User"'); // PostgreSQL

Parameters

$raw.query and $raw.execute support parameters, for example:

// PostgreSQL
final result = await prisma.$raw.query(
  'SELECT * FROM "User" WHERE "id" = \$1',
  [1],
);

// MySQL
final result = await prisma.$raw.query(
  'SELECT * FROM `User` WHERE `id` = ?',
  [1],
);

SQL template string see your used database.

prisma-dart - Prisma Dart client v3.4.6

Published by medz 10 months ago

To install Prisma Dart client v3.4.6, run the following command:

dart pub add orm

To update Prisma Dart client v3.4.6, update the orm dependency in your pubspec.yaml file.

dependencies:
  orm: ^3.4.6

What's Changed

  1. The binary engine will be copied to the current working command and named prisma-query-engine
  2. Add the .dart_tool directory to the search directory

About not found prisma-query-engine error

Cannot find the query engine binary (Basename: C:\path\does\not\matter\query-engine-windows.exe | prisma-query-engine)

If you just run your app using the dart run {script}.dart command, you don’t need to do anything.

If you use dart compile exe to package your app as a executable, copy prisma-query-engine to the same location as your run file

prisma-dart - Prisma Dart client v4.0.0-alpha.1

Published by medz 10 months ago

To install Prisma Dart client v4.0.0-alpha.1 run:

dart pub add orm:4.0.0-alpha.1

Or update your pubspec.yaml file:

dependencies:
  orm: 4.0.0-alpha.1

What's Changed

  1. Refactor the entire client generator
  2. PrismaClient is now generated by the generator
  3. Ability to operate transactions on your own
  4. Use binary engine by default
  5. Supports full select and include features.
prisma-dart - Prisma Dart client v3.4.5

Published by medz 11 months ago

To install Prisma Dart client v3.4.5, run the following command:

dart pub add orm

To update Prisma Dart client v3.4.5, update the orm dependency in your pubspec.yaml file.

dependencies:
  orm: ^3.4.5

What's Changed

  1. Bug: fix not working on Prisma 5.
  2. Bug: type 'Null' is not a subtype of type 'bool' in type cast. #273 #259
  3. Feature: Now, Copy current platform engine to output directory. #285
prisma-dart - Prisma Dart client v4.0.0-alpha.0

Published by medz 11 months ago

To install Prisma Dart client v4.0.0-alpha.0 run:

# If you are using Dart
dart pub add orm:4.0.0-alpha.0

# Or if you are using Flutter
flutter pub add orm:4.0.0-alpha.0

To upgrade to Prisma Dart client v4.0.0-alpha.0, Please follow the announcements and update your pubspec.yaml file:

dependencies:
  orm: 4.0.0-alpha.0

Read Prisma Dart Client v4.0.0-alpha.0 release notes on the Prisma Dart discussions

What's Changed

  • Whole project refactoring
  • Remove any JSON serialization tool, now it's ready to use by just generating the client without any other dependencies and extra commands
  • Switch from GraphQL protocol to JSON protocol
  • Client takes a standalone Prisma engine instance
  • Client and all input/output types are standalone and can be distributed to any Dart platform
  • Add database field reference support
  • Support select feature (incomplete, currently only support rough one-level Model fields)
  • Support include feature (incomplete, currently only support rough one-level Model fields)
  • PrismaUnion regression, now can structure nested inputs of multiple parameters via union
  • PrismaNull regression, now support database null data setting
  • DMMF, generator helpers regression, no need to depend on other packages, can directly use orm as the base package for developing Dart Prisma ecosystem packages
  • Add Decimal type support (from decimal package, exported by orm proxy)
prisma-dart - orm: v3.4.4

Published by github-actions[bot] over 1 year ago

3.4.4 (2023-07-03)

Bug Fixes

  • bump analyzer from 5.13.0 to 6.0.0 (c03aaa9)
prisma-dart - orm: v3.4.3

Published by github-actions[bot] over 1 year ago

3.4.3 (2023-05-30)

Bug Fixes

  • type 'Null' is not a subtype of type 'String' in type cast (b28cd4e), closes #227
prisma-dart - orm: v3.4.2

Published by github-actions[bot] over 1 year ago

3.4.2 (2023-05-30)

Bug Fixes

  • generator: Fixed field kind enum type origin value (bc508a0), closes #225
prisma-dart -

Published by medz over 1 year ago

prisma-dart -

Published by medz over 1 year ago

BREAKING CHANGE

  • Update Dart SDK to ^3.0.0
  • Generator: Adapt to upstream dependencies
prisma-dart - orm: v3.3.2

Published by github-actions[bot] over 1 year ago

3.3.2 (2023-05-23)

Bug Fixes

  • generator: Json field short input type selection (dd904d7)
prisma-dart - orm: v3.3.1

Published by github-actions[bot] over 1 year ago

3.3.1 (2023-05-23)

Bug Fixes

  • RAW parameter decoder (cba5e9e) Thx @PeterMX
prisma-dart - orm: v3.3.0

Published by github-actions[bot] over 1 year ago

3.3.0 (2023-04-05)

Features

Bug Fixes

  • runtime: Fix repeat attach engine in finalizer (a5890b7)
  • runtime: Fix the engine stop caused by calling $disconnect outside of transaction (4448438)
  • runtime: Remove deprecated transactionId (2606456)

Contributors

@medz @craiglabenz

prisma-dart - orm: v3.2.6

Published by github-actions[bot] over 1 year ago

3.2.6 (2023-03-27)

Bug Fixes

  • engine: Fix ignored errors (fe8c89f)