-
Notifications
You must be signed in to change notification settings - Fork 250
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
feat: query compiler proof of concept #5024
Merged
Changes from 64 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
740a356
Prepare playground
aqrln b89fd0d
Implement more structure
aqrln 82537d9
Inline the schema in the compiler example
aqrln f2f088f
Remove useless explicit to_string
aqrln a364a78
Fix expression formatting
aqrln 6be72d0
Split ReadQuery and WriteQuery
aqrln d9afbeb
Implement translating simple read query
aqrln 22e73a7
Implement more queries
aqrln ff2390e
Implement placeholders
aqrln 94bd641
[integration]
aqrln 440e3e2
[integration]
aqrln f4d21ea
Expand comment
aqrln f261563
Implement napi method
aqrln 0c1f1f4
[integration]
aqrln 06c3968
Remove useless deref
aqrln 362f5b2
[integration]
aqrln fdcc718
Improve placeholder serialization
aqrln 4b729e6
[integration]
aqrln 20bb454
Fix warnings
aqrln b0d1b7f
Add compile method on wasm
aqrln 3bb68da
Make PrismaValue param parsing consistent with serialization
aqrln d8ebea2
[integration]
aqrln e27a869
Switch dialect to sqlite
aqrln af8159d
[integration]
aqrln ce0e4f6
[integration]
aqrln b820b6a
Comment out react native
aqrln 8f2d9e3
[integration]
aqrln e995e5d
wip add param to dmmf
aqrln 12a506f
Add comment
aqrln 721ced9
[integration]
aqrln 323a232
disable more react-native
aqrln 8c78d8d
check param in query schema in validation
aqrln f778321
switch to sqlite visitor
aqrln 2d54430
[integration]
aqrln cfb698a
add nested query in example
aqrln 89b40cb
Use lld via .cargo/config.toml and not env vars
aqrln 58f35a7
use postgres
aqrln da96b5d
remove dbg
aqrln 18a7faf
first pass at read nested
aqrln ec1a304
Use `pretty` for pretty printing
aqrln 8e7a29c
refactor formatting
aqrln 740e996
Add parent field name to join node
aqrln 96f7233
Drop "with" in "with params"
aqrln 10a05b7
Add filters
aqrln 6836d42
fix: fix createOne (#5121)
jacek-prisma 9ef2ff8
Mark to-one nested reads as unique
aqrln 159c4a0
Add `LIMIT 1` for to-one queries
aqrln 0e6a694
Implement templates for IN
aqrln 361de20
Remove unused stuff
aqrln 244e52c
Extract sql query builder (#5123)
jacek-prisma 6bb3256
Remove napi copypasta from wasm engine
aqrln 9cd8301
feat(compiler): pass through connection_info (#5125)
FGoessler 5f0c232
feat: generic query building (#5127)
jacek-prisma 48e2fc1
chore: extract query-compiler and query-compiler-wasm (#5129)
jacek-prisma 0101a7a
Merge branch 'main' into HEAD
aqrln db04604
Fix building WASM under Nix
aqrln 5fc1879
Fix type error
aqrln c71ba31
Uncomment react-native
aqrln 4bee1bd
Add workspace lints to query-engine-wasm
aqrln 384c3d1
Add workspace lints to schema-engine-wasm
aqrln 8035f1b
Remove obsolete query schema params handling
aqrln 851c3a0
Don't build QC executor for now
aqrln be6edc5
Merge latest main
aqrln 405c44a
Add playground back
aqrln e5f4ae7
cleanup(compiler): revert unneeded changes
FGoessler d6f8a09
cleanup(compiler): make query compiler playground a binary crate
FGoessler 7d1763d
cleanup(compiler): drop example files
FGoessler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Build and publish @prisma/query-compiler-wasm | ||
run-name: npm - release @prisma/query-compiler-wasm@${{ github.event.inputs.packageVersion }} from ${{ github.event.inputs.enginesHash }} on ${{ github.event.inputs.npmDistTag }} | ||
|
||
concurrency: publish-query-compiler-wasm | ||
|
||
on: | ||
# usually triggered via GH Actions Workflow in prisma/engines-wrapper repo | ||
workflow_dispatch: | ||
inputs: | ||
packageVersion: | ||
required: true | ||
description: "New @prisma/query-compiler-wasm package version" | ||
enginesHash: | ||
required: true | ||
description: "query-compiler commit to build" | ||
npmDistTag: | ||
required: true | ||
default: "latest" | ||
description: "npm dist-tag (e.g. latest or integration)" | ||
|
||
jobs: | ||
build: | ||
name: Build and publish @prisma/query-compiler-wasm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print input | ||
run: echo "${{ toJson(github.event.inputs) }}" | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.enginesHash }} | ||
|
||
- uses: ./.github/workflows/include/rust-wasm-setup | ||
|
||
- name: Build @prisma/query-compiler-wasm | ||
run: make build-qc-wasm | ||
env: | ||
QE_WASM_VERSION: ${{ github.event.inputs.packageVersion }} | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
|
||
- name: Set up NPM token for publishing | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Publish @prisma/query-compiler-wasm | ||
run: npm publish --access public --tag ${{ github.event.inputs.npmDistTag }} | ||
working-directory: query-compiler/query-compiler-wasm/pkg | ||
|
||
# | ||
# Failure handlers | ||
# | ||
- name: Set current job url in SLACK_FOOTER env var | ||
if: ${{ failure() }} | ||
run: echo "SLACK_FOOTER=<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|Click here to go to the job logs>" >> $GITHUB_ENV | ||
- name: Slack Notification on Failure | ||
if: ${{ failure() }} | ||
uses: rtCamp/[email protected] | ||
env: | ||
SLACK_TITLE: "Building and publishing @prisma/query-compiler-wasm failed :x:" | ||
SLACK_COLOR: "#FF0000" | ||
SLACK_CHANNEL: feed-prisma-query-compiler-wasm-publish-failures | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WASM_FAILING }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated changes, can be dropped or extracted to a different PR