Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prisma engines #1

Closed
1 of 2 tasks
medz opened this issue Aug 5, 2022 · 11 comments
Closed
1 of 2 tasks

Prisma engines #1

medz opened this issue Aug 5, 2022 · 11 comments
Assignees

Comments

@medz
Copy link
Owner

medz commented Aug 5, 2022

@Ali1Ammar I have done Prisma binary engines download functionality and db push/format. Currently my job is to develop a binary client proxy for query engine, but given that you have already completed https://github.com/Ali1Ammar/prisma-client-dart that is query engine proxy and client generation. I had to reassign work.

Since you've already written the query engine, I think you can just migrate the code over and it will work.

Next, I will use Rust to write Prisma query engine's C APIs dylib to make Prisma for Dart support Flutter.

Regarding the Prisma Data Proxy part, I think we can revisit the distribution of development work after the dylib development is complete.

@medz TODO:

  • A dylib for Prisma query engine written in Rust

@Ali1Ammar TODO:

  • Complete the binary part of Prisma query engine.
@medz
Copy link
Owner Author

medz commented Aug 5, 2022

@Ali1Ammar I'm in contact with the Prisma ORM official to see if I need to move this repository under the prisma org.

medz added a commit that referenced this issue Aug 5, 2022
medz added a commit that referenced this issue Aug 5, 2022
medz added a commit that referenced this issue Aug 5, 2022
medz added a commit that referenced this issue Aug 5, 2022
medz added a commit that referenced this issue Aug 5, 2022
medz added a commit that referenced this issue Aug 6, 2022
@medz
Copy link
Owner Author

medz commented Aug 6, 2022

@Ali1Ammar Can you email me your pub.dev account email address? I will set your permissions in pub.dev on all packages of Prisma ORM.

@medz
Copy link
Owner Author

medz commented Aug 6, 2022

@Ali1Ammar Regarding the three engines of Binary, Dynamic Library, and Data Proxy, I have established a good cross-platform interface for them in the main branch (to be completed).

The responsibilities of each package are as follows:

  1. orm is responsible for the runtime, which is the Prisma Client part, the code is platform independent. But bin still needs to proxy cli so that developers can type as few command strings as possible.
  2. prisma_cli is responsible for completing data management and other related command line tools
  3. prisma_query_engine, for the engine encapsulation of the orm package, export and use platform judgment, so that it supports three engines and the flag of the package is all platforms.
  4. prisma_query_engine_dylib has a built-in toolchain for the C API written by Prisma Engines, and EngineDynamicLibrary is automatically generated during development.

I think you're working on the prisma-engine branch without needing to have the main branch and make some changes to the code.

At the same time I forked the prisma_engine_dylib branch for the development of Dynamic Engine.

@medz
Copy link
Owner Author

medz commented Aug 6, 2022

I think the Engine interface part is what we need to complete together. next, I will focus on development of Dynamic Library Engine and supplement the Engine interface.

@Ali1Ammar
Copy link
Collaborator

I have a working version of the binary engine inside https://github.com/odroe/prisma/tree/query-engine/orm/lib/src/engine
I will merge this implementation inprisma_query_engine/lib/src/native/binary
but I need to access configure class from prisma_cli/lib/src/configure.dart
so I think we need I new package for the shared code between all

medz added a commit that referenced this issue Aug 6, 2022
@medz
Copy link
Owner Author

medz commented Aug 6, 2022

@Ali1Ammar It is possible to create new packages for code sharing. I've also been wondering how to share the configuration.

Loading the configuration requires IO operations, which may affect the Dart Web and Flutter Web platforms, but I think a shared package with IO operations can be implemented first. We'll discuss how to deal with the web platform when we're done developing Prisma Data Proxy.

@Ali1Ammar
Copy link
Collaborator

@medz for the web we could generate the config as dart file with the generate command but for now I will just add todo for that

@medz
Copy link
Owner Author

medz commented Aug 6, 2022

@Ali1Ammar 👌 The i'm idea of web platform support is to only allow Prisma Data Proxy engine drivers.

But that's after we've done the Binary and DynamicLibrary drivers.

@Chris-Precieux
Copy link

Hi guys, i was so excited to use this package until the following command dart run orm generate is not working, so i can't generate the client.
Can you help me to fix that please ?

@Ali1Ammar
Copy link
Collaborator

hello @Chris-Sechri
this package is still under heavy development and we still didn't releases any version for public use

@Chris-Precieux
Copy link

Chris-Precieux commented Aug 25, 2022

hello @Chris-Sechri this package is still under heavy development and we still didn't releases any version for public use

@Chris-Sechri
🎉Happy to announce that Prisma ORM for Dart is available in version 2.0.0-dev.4. But still the following problems:

  1. db pull has not been completed
  2. Model deserialization has not been completed yet, the current model code returns dynamic type

More available check out the version on pub.dev 👉https://pub.dev/packages/orm/versions/2.0.0-dev.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants