Skip to content

Commit 7ae8fa3

Browse files
committed
Refactor building schema statements
1 parent e957857 commit 7ae8fa3

File tree

24 files changed

+821
-479
lines changed

24 files changed

+821
-479
lines changed

.github/actions/android/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ runs:
2525
- name: Setup
2626
shell: bash
2727
run: |
28-
rustup toolchain install nightly-2025-10-31-x86_64-unknown-linux-gnu
29-
rustup component add rust-src --toolchain nightly-2025-10-31-x86_64-unknown-linux-gnu
28+
rustup toolchain install nightly-2025-12-05-x86_64-unknown-linux-gnu
29+
rustup component add rust-src --toolchain nightly-2025-12-05-x86_64-unknown-linux-gnu
3030
rustup target add \
3131
aarch64-linux-android \
3232
armv7-linux-androideabi \

.github/actions/linux/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
- name: Install Rust Nightly
88
uses: dtolnay/rust-toolchain@stable
99
with:
10-
toolchain: nightly-2025-10-31
10+
toolchain: nightly-2025-12-05
1111
components: rust-src
1212
targets: aarch64-unknown-linux-gnu,x86_64-unknown-linux-gnu,i686-unknown-linux-gnu,riscv64gc-unknown-linux-gnu,armv7-unknown-linux-gnueabihf
1313

.github/actions/macos/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
- name: Install Rust Nightly
88
uses: dtolnay/rust-toolchain@stable
99
with:
10-
toolchain: nightly-2025-10-31
10+
toolchain: nightly-2025-12-05
1111
components: rust-src
1212
targets: x86_64-apple-darwin,aarch64-apple-darwin
1313

.github/actions/wasm/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
- name: Install Rust Nightly
88
uses: dtolnay/rust-toolchain@stable
99
with:
10-
toolchain: nightly-2025-10-31
10+
toolchain: nightly-2025-12-05
1111
components: rust-src
1212

1313
- name: Setup emsdk

.github/actions/windows/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
- name: Install Rust Nightly
88
uses: dtolnay/rust-toolchain@stable
99
with:
10-
toolchain: nightly-2025-10-31
10+
toolchain: nightly-2025-12-05
1111
components: rust-src
1212
targets: x86_64-pc-windows-msvc,aarch64-pc-windows-msvc,i686-pc-windows-msvc
1313

.github/actions/xcframework/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ runs:
77
- name: Setup
88
shell: bash
99
run: |
10-
rustup toolchain install nightly-2025-10-31-aarch64-apple-darwin
11-
rustup component add rust-src --toolchain nightly-2025-10-31-aarch64-apple-darwin
10+
rustup toolchain install nightly-2025-12-05-aarch64-apple-darwin
11+
rustup component add rust-src --toolchain nightly-2025-12-05-aarch64-apple-darwin
1212
rustup target add \
1313
x86_64-apple-darwin \
1414
aarch64-apple-darwin \

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- name: Install Rust Nightly
8282
uses: dtolnay/rust-toolchain@stable
8383
with:
84-
toolchain: nightly-2025-10-31
84+
toolchain: nightly-2025-12-05
8585
components: rust-src,rustfmt,clippy
8686

8787
- name: Check formatting
@@ -201,7 +201,7 @@ jobs:
201201
- name: Install Rust Nightly
202202
uses: dtolnay/rust-toolchain@stable
203203
with:
204-
toolchain: nightly-2025-10-31
204+
toolchain: nightly-2025-12-05
205205
components: rust-src
206206

207207
- name: Install valgrind

crates/core/src/crud_vtab.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::error::PowerSyncError;
1515
use crate::ext::SafeManagedStmt;
1616
use crate::schema::TableInfoFlags;
1717
use crate::state::DatabaseState;
18-
use crate::util::MAX_OP_ID;
18+
use crate::utils::MAX_OP_ID;
1919
use crate::vtab_util::*;
2020

2121
const MANUAL_NAME: &CStr = c"powersync_crud_";

crates/core/src/fix_data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ use alloc::string::String;
66
use crate::create_sqlite_optional_text_fn;
77
use crate::error::{PSResult, PowerSyncError};
88
use crate::schema::inspection::ExistingTable;
9+
use crate::utils::SqlBuffer;
910
use powersync_sqlite_nostd::{self as sqlite, ColumnType, Value};
1011
use powersync_sqlite_nostd::{Connection, Context, ResultCode};
1112

1213
use crate::ext::SafeManagedStmt;
13-
use crate::util::quote_identifier;
1414

1515
// Apply a data migration to fix any existing data affected by the issue
1616
// fixed in v0.3.5.
@@ -33,7 +33,7 @@ pub fn apply_v035_fix(db: *mut sqlite::sqlite3) -> Result<i64, PowerSyncError> {
3333
continue;
3434
};
3535

36-
let quoted = quote_identifier(full_name);
36+
let quoted = SqlBuffer::quote_identifier(full_name);
3737

3838
// language=SQLite
3939
let statement = db.prepare_v2(&format!(

crates/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mod state;
2828
mod sync;
2929
mod sync_local;
3030
mod update_hooks;
31-
mod util;
31+
mod utils;
3232
mod uuid;
3333
mod version;
3434
mod view_admin;

0 commit comments

Comments
 (0)