-
Notifications
You must be signed in to change notification settings - Fork 12
add cloudsync-wasm build #5
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
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d042fe2
feat: add WASM support with sqlite3_wasm_extra_init function and rela…
Gioee 2627620
fix: update WASM build instructions and exclude wasm.c from coverage
Gioee 6143d5f
feat: add make wasm platform spec to build matrix in GitHub Actions w…
Gioee 71ba636
fix: correct sourcing of emsdk_env.sh in Makefile for WASM build with…
Gioee 3eb08b1
fix: update emsdk_env.sh sourcing in Makefile for WASM build process
Gioee 7ebd8f0
feat: add WASM npm build step and version retrieval in Makefile
Gioee 6582d6b
fix: streamline version retrieval in WASM build process and skip npm fix
Gioee 58c040d
fix: rename wasm npm build step to wasm npm pack and update package n…
Gioee 8d4fa13
fix: update README.md for sqlite-wasm with new package name and versi…
Gioee e0c886b
fix: update npm build step in workflow to include 'npm run fix' for s…
Gioee 29d29d2
fix: update sqlite version for WASM static build to 3.50.0 and clone …
Gioee ef0d5ea
fix: clean up sqlite-wasm build process and fix npm fix command
Gioee 1ca0b03
fix: improve cleanup process for sqlite-wasm
Gioee eb8e0f6
test with latest main sqlite-wasm
Gioee b8c082a
lowering version should fix the export default issue
Gioee 9f9a7b9
fix: update package name references for sqlite-wasm to @sqliteai/clou…
Gioee a87b266
fix: update path for npm publish command in workflow
Gioee 856e180
draft feat: wasm network layer
Gioee 5a65e2b
fix workflow
Gioee 56c4469
fix: update WASM build process and add flags for fetch support
Gioee 2e816cc
fix: improve WASM_FLAGS handling in Makefile
Gioee 4838dad
fix: improve WASM_FLAGS handling in Makefile using awk for uniqueness…
Gioee 97357f2
fix: correct WASM makefile name
Gioee c2e11cd
fix: conditional SQLITE_WASM_EXTRA_INIT escape single quotes instead …
Gioee 6568290
fix: endpoint port handling in network_compute_endpoints function
Gioee 356fa9b
fix(fetch): sync fetch and single quotes
a4dc460
fix: remove debug print statement from sqlite3_cloudsync_init function
Gioee 72b57c1
refactor: network_receive_buffer and improve buffer management
Gioee 96b8e75
Merge branch 'main' into wasm-build
Gioee 0a62166
npm publish
Gioee 704d9b8
fix: missing npm ci and setup
Gioee e7a85eb
fix: rm npm ci
Gioee 4bd8a94
fix: update npm registry URL to use npmjs.org
Gioee f702921
fix: update wasm npm publish step to include provenance and public ac…
Gioee 1f44ee4
fix: update wasm npm publish command to remove provenance option
Gioee 4534c87
test: revert version extraction method in release step to read from c…
Gioee 7b1c9c7
fix: correct version format in jq command and npm publish step for cl…
Gioee 0d76b81
fix: update version extraction method in release step to use make com…
Gioee 17feec7
fix: release only in main branch
Gioee 10c2189
bump version
Gioee e8a1cce
Merge branch 'main' into wasm-build
andinux 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -360,7 +360,7 @@ char *db_version_build_query (sqlite3 *db) { | |
|
|
||
| // the good news is that the query can be computed in SQLite without the need to do any extra computation from the host language | ||
| const char *sql = "WITH table_names AS (" | ||
| "SELECT format(\"%w\", name) as tbl_name " | ||
| "SELECT format('%w', name) as tbl_name " | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is wrong, identifiers like table names must be quoted in double quotes. |
||
| "FROM sqlite_master " | ||
| "WHERE type='table' " | ||
| "AND name LIKE '%_cloudsync'" | ||
|
|
||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -419,7 +419,7 @@ bool dbutils_table_sanity_check (sqlite3 *db, sqlite3_context *context, const ch | |
| // the affinity of a column is determined by the declared type of the column, | ||
| // according to the following rules in the order shown: | ||
| // 1. If the declared type contains the string "INT" then it is assigned INTEGER affinity. | ||
| sql = sqlite3_snprintf((int)blen, buffer, "SELECT count(*) FROM pragma_table_info('%w') WHERE pk=1 AND \"type\" LIKE \"%%INT%%\";", name); | ||
| sql = sqlite3_snprintf((int)blen, buffer, "SELECT count(*) FROM pragma_table_info('%w') WHERE pk=1 AND \"type\" LIKE '%%INT%%';", name); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is right because %%INT%% is a literal |
||
| sqlite3_int64 count2 = dbutils_int_select(db, sql); | ||
| if (count == count2) { | ||
| dbutils_context_result_error(context, "Table %s uses an single-column INTEGER primary key. For CRDT replication, primary keys must be globally unique. Consider using a TEXT primary key with UUIDs or ULID to avoid conflicts across nodes. If you understand the risk and still want to use this INTEGER primary key, set the third argument of the cloudsync_init function to 1 to skip this check.", name); | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.