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

powersync-sqlite-core 0.3.0 #14

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/six-candles-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@journeyapps/wa-sqlite": minor
---

powersync-sqlite-core 0.3.0
2 changes: 1 addition & 1 deletion dist/wa-sqlite-async.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=V.Le)(
d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=V.Se)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=V.Te)(a,b,c,e);d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=V.Ue)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=V.Ve)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=V.We)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=V.Xe)(a,b);d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=V.Ye)(a,b);
d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=V.Ze)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=V._e)(a);d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=V.$e)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=V.af)();var $c=d._malloc=a=>($c=d._malloc=V.bf)(a),ed=d._free=a=>(ed=d._free=V.cf)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=V.df)(a);d._set_authorizer=a=>(d._set_authorizer=V.ef)(a);
d._create_function=(a,b,c,e,f,h)=>(d._create_function=V.ff)(a,b,c,e,f,h);d._on_tables_changed=(a,b,c,e,f,h)=>(d._on_tables_changed=V.gf)(a,b,c,e,f,h);d._register_table_update_hook=a=>(d._register_table_update_hook=V.hf)(a);d._create_module=(a,b,c,e)=>(d._create_module=V.jf)(a,b,c,e);d._progress_handler=(a,b)=>(d._progress_handler=V.kf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=V.lf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=V.mf)();var qd=d._main=(a,b)=>(qd=d._main=V.nf)(a,b);
d._setup_powersync=()=>(d._setup_powersync=V.of)();var gb=(a,b)=>(gb=V.qf)(a,b),rd=()=>(rd=V.rf)(),ld=a=>(ld=V.sf)(a),md=a=>(md=V.tf)(a),nd=()=>(nd=V.uf)(),cd=a=>(cd=V.vf)(a),Rc=()=>(Rc=V.wf)(),bd=a=>(bd=V.xf)(a),dd=()=>(dd=V.yf)();d._sqlite3_version=46872;d.getTempRet0=()=>rd();d.ccall=Z;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Z(a,b,c,h,e)};
d._setup_powersync=()=>(d._setup_powersync=V.of)();var gb=(a,b)=>(gb=V.qf)(a,b),rd=()=>(rd=V.rf)(),ld=a=>(ld=V.sf)(a),md=a=>(md=V.tf)(a),nd=()=>(nd=V.uf)(),cd=a=>(cd=V.vf)(a),Rc=()=>(Rc=V.wf)(),bd=a=>(bd=V.xf)(a),dd=()=>(dd=V.yf)();d._sqlite3_version=50840;d.getTempRet0=()=>rd();d.ccall=Z;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Z(a,b,c,h,e)};
d.addFunction=(a,b)=>{if(!jd){jd=new WeakMap;var c=hd.length;if(jd)for(var e=0;e<0+c;e++){var f=hd.get(e);f&&jd.set(f,e)}}if(c=jd.get(a)||0)return c;if(kd.length)c=kd.pop();else{try{hd.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=hd.length-1}try{hd.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var h=
{parameters:[],results:"v"==b[0]?[]:[f[b[0]]]},k=1;k<b.length;++k)h.parameters.push(f[b[k]]);b=new e(h,a)}else{e=[1];f=b.slice(0,1);b=b.slice(1);h={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96);k=b.length;128>k?e.push(k):e.push(k%128|128,k>>7);for(k=0;k<b.length;++k)e.push(h[b[k]]);"v"==f?e.push(0):e.push(1,h[f]);b=[0,97,115,109,1,0,0,0,1];f=e.length;128>f?b.push(f):b.push(f%128|128,f>>7);b.push(...e);b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));b=(new WebAssembly.Instance(b,
{e:{f:a}})).exports.f}hd.set(c,b)}jd.set(a,c);return c};d.setValue=I;d.getValue=H;d.UTF8ToString=(a,b)=>a?J(w,a,b):"";d.stringToUTF8=(a,b,c)=>K(a,w,b,c);d.lengthBytesUTF8=Ua;d.intArrayFromString=Va;d.intArrayToString=function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c];255<e&&(e&=255);b.push(String.fromCharCode(e))}return b.join("")};d.AsciiToString=a=>{for(var b="";;){var c=w[a++];if(!c)return b;b+=String.fromCharCode(c)}};
Expand Down
Binary file modified dist/wa-sqlite-async.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/wa-sqlite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=Z.Le)(
d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=Z.Se)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=Z.Te)(a,b,c,e);d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=Z.Ue)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=Z.Ve)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=Z.We)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=Z.Xe)(a,b);d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=Z.Ye)(a,b);
d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=Z.Ze)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=Z._e)(a);d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=Z.$e)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=Z.af)();d._malloc=a=>(d._malloc=Z.bf)(a);d._free=a=>(d._free=Z.cf)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=Z.df)(a);d._set_authorizer=a=>(d._set_authorizer=Z.ef)(a);
d._create_function=(a,b,c,e,f,h)=>(d._create_function=Z.ff)(a,b,c,e,f,h);d._on_tables_changed=(a,b,c,e,f,h)=>(d._on_tables_changed=Z.gf)(a,b,c,e,f,h);d._register_table_update_hook=a=>(d._register_table_update_hook=Z.hf)(a);d._create_module=(a,b,c,e)=>(d._create_module=Z.jf)(a,b,c,e);d._progress_handler=(a,b)=>(d._progress_handler=Z.kf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=Z.lf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=Z.mf)();var Pc=d._main=(a,b)=>(Pc=d._main=Z.nf)(a,b);
d._setup_powersync=()=>(d._setup_powersync=Z.of)();var eb=(a,b)=>(eb=Z.qf)(a,b),Qc=()=>(Qc=Z.rf)(),Mc=a=>(Mc=Z.sf)(a),Kc=a=>(Kc=Z.tf)(a),Lc=()=>(Lc=Z.uf)();d._sqlite3_version=46872;d.getTempRet0=()=>Qc();d.ccall=Y;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Y(a,b,c,h,e)};
d._setup_powersync=()=>(d._setup_powersync=Z.of)();var eb=(a,b)=>(eb=Z.qf)(a,b),Qc=()=>(Qc=Z.rf)(),Mc=a=>(Mc=Z.sf)(a),Kc=a=>(Kc=Z.tf)(a),Lc=()=>(Lc=Z.uf)();d._sqlite3_version=50840;d.getTempRet0=()=>Qc();d.ccall=Y;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Y(a,b,c,h,e)};
d.addFunction=(a,b)=>{if(!Ic){Ic=new WeakMap;var c=Hc.length;if(Ic)for(var e=0;e<0+c;e++){var f=Hc.get(e);f&&Ic.set(f,e)}}if(c=Ic.get(a)||0)return c;if(Jc.length)c=Jc.pop();else{try{Hc.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=Hc.length-1}try{Hc.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var h=
{parameters:[],results:"v"==b[0]?[]:[f[b[0]]]},k=1;k<b.length;++k)h.parameters.push(f[b[k]]);b=new e(h,a)}else{e=[1];f=b.slice(0,1);b=b.slice(1);h={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96);k=b.length;128>k?e.push(k):e.push(k%128|128,k>>7);for(k=0;k<b.length;++k)e.push(h[b[k]]);"v"==f?e.push(0):e.push(1,h[f]);b=[0,97,115,109,1,0,0,0,1];f=e.length;128>f?b.push(f):b.push(f%128|128,f>>7);b.push(...e);b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));b=(new WebAssembly.Instance(b,
{e:{f:a}})).exports.f}Hc.set(c,b)}Ic.set(a,c);return c};d.setValue=I;d.getValue=H;d.UTF8ToString=(a,b)=>a?J(v,a,b):"";d.stringToUTF8=(a,b,c)=>K(a,v,b,c);d.lengthBytesUTF8=Ta;d.intArrayFromString=Ua;d.intArrayToString=function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c];255<e&&(e&=255);b.push(String.fromCharCode(e))}return b.join("")};d.AsciiToString=a=>{for(var b="";;){var c=v[a++];if(!c)return b;b+=String.fromCharCode(c)}};
Expand Down
Binary file modified dist/wa-sqlite.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion powersync-sqlite-core
Submodule powersync-sqlite-core updated 40 files
+23 −0 .cargo/config.toml
+0 −6 .github/workflows/android.yml
+0 −2 .github/workflows/ios.yml
+0 −2 .github/workflows/linux.yml
+42 −0 .github/workflows/macos.yml
+21 −6 .github/workflows/release.yml
+19 −4 .github/workflows/tests.yml
+20 −0 .github/workflows/wasm.yml
+0 −2 .github/workflows/windows.yml
+4 −4 Cargo.lock
+1 −1 Cargo.toml
+3 −2 RELEASING.md
+37 −25 android/build.gradle.kts
+1 −1 android/gradle/wrapper/gradle-wrapper.properties
+7 −0 android/src/AndroidManifest.xml
+9 −0 android/src/prefab/modules/powersync/include/powersync.h
+7 −0 android/src/prefab/modules/powersync/libs/android.arm64-v8a/abi.json
+7 −0 android/src/prefab/modules/powersync/libs/android.armeabi-v7a/abi.json
+7 −0 android/src/prefab/modules/powersync/libs/android.x86/abi.json
+7 −0 android/src/prefab/modules/powersync/libs/android.x86_64/abi.json
+4 −0 android/src/prefab/modules/powersync/module.json
+6 −0 android/src/prefab/prefab.json
+2 −2 build-pod.sh
+3 −14 crates/core/src/checkpoint.rs
+1 −0 crates/core/src/lib.rs
+287 −0 crates/core/src/migrations.rs
+105 −119 crates/core/src/operations.rs
+61 −20 crates/core/src/schema_management.rs
+24 −17 crates/core/src/sync_local.rs
+100 −193 crates/core/src/view_admin.rs
+38 −40 crates/core/src/views.rs
+1 −0 dart/.gitignore
+15 −0 dart/README.md
+389 −0 dart/pubspec.lock
+10 −0 dart/pubspec.yaml
+179 −0 dart/test/migration_test.dart
+339 −0 dart/test/utils/migration_fixtures.dart
+50 −0 dart/test/utils/native_test_utils.dart
+110 −0 dart/test/utils/schema.dart
+1 −1 powersync-sqlite-core.podspec
Loading