Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
284 commits
Select commit Hold shift + click to select a range
9f31602
fix: runtime crash at handle.create_exception() when call delete().
jrjrmiih Jan 2, 2025
1133095
feat:Database impl delete_objects.
loginSin Jan 2, 2025
3ca3626
feat:add value and select files
HelloArmanX Jan 2, 2025
88cf508
docs: add README for rust.
jrjrmiih Jan 2, 2025
181d6bf
refactor: move WCDBResult to wcdb_exception.rs
jrjrmiih Jan 2, 2025
5faef0a
refactor: reimplement get_description().
jrjrmiih Jan 2, 2025
8c069cb
chore: implement IdentifierTrait for concerned structs.
jrjrmiih Jan 2, 2025
f3b58f9
feat:Database impl update_object
loginSin Jan 2, 2025
ab48958
chore: update gitlab-ci.
jrjrmiih Jan 6, 2025
a266117
feat:Value impl get_long get_double get_text get_blob
loginSin Jan 6, 2025
45bb2c3
feat:Database impl insert_or_replace_object() insert_or_ignore_object…
loginSin Jan 6, 2025
996df68
feat:Database impl delete_objects_by_expression_order_limit() delete_…
loginSin Jan 6, 2025
6ee445d
feat:Database impl get_all_objects()
loginSin Jan 7, 2025
18a162c
chore: update gitlab-ci.
jrjrmiih Jan 6, 2025
e9dc478
fix: build compile error.
jrjrmiih Jan 7, 2025
dd8cd72
fix: gitlab CI compile error.
jrjrmiih Jan 8, 2025
283bb6a
feat:WCDBField support bool、i8、i16、i64、f32、f64
loginSin Jan 8, 2025
e8fda09
perf: optimize gitlab ci execution time.
jrjrmiih Jan 8, 2025
64ba006
feat:Database impl get_first_object() get_first_object_by_expression()
loginSin Jan 9, 2025
d65c89e
feat:improve table_operation file logic.
jrjrmiih Jan 9, 2025
dce7d3c
revert: non-rust code changes.
jrjrmiih Jan 10, 2025
e841740
feat: support String type for db set & get.
jrjrmiih Jan 10, 2025
e582d58
refactor: rename variables.
jrjrmiih Jan 10, 2025
3d07858
Merge branch 'Tencent:master' into rust
jrjrmiih Jan 10, 2025
1c010ca
feat:impl unit test
loginSin Jan 14, 2025
3ec4d37
feat:orm test AllTypeObject
loginSin Jan 15, 2025
e5fef28
feat:Table impl insert_object() insert_objects() get_first_object_by_…
loginSin Jan 15, 2025
d4ac772
feat:Added ExpressionOperable file method logic
HelloArmanX Jan 15, 2025
66d7756
test: refactor test directory.
jrjrmiih Jan 15, 2025
a81d0f7
feat: database update_object()
chinaspx Jan 15, 2025
e951b74
ci: add git commit check & format cpp code.
jrjrmiih Jan 16, 2025
f226ca1
docs: update README.
jrjrmiih Jan 16, 2025
d49b639
feat: table orm operation.
Jan 16, 2025
f6787da
feat(WCDBField): add support for column_name.
loginSin Jan 17, 2025
e01649f
feat(WCDBField): add support for check is_primary & is_auto_increment.
loginSin Jan 17, 2025
bfdfa3e
fix(WCDBException): malloc crash.
loginSin Jan 23, 2025
96b6683
feat(WCDBField): support is_primary & is_auto_increment & enable_auto…
loginSin Jan 23, 2025
d317d86
fix(setup): remove_file error.
loginSin Jan 23, 2025
11b4bcb
feat(ExpressionTest): add ExpressionOperable file method logic.
HelloArmanX Jan 23, 2025
8d7b2df
fix(Database): traceSQL not callback rust.
loginSin Jan 23, 2025
6807ec3
feat(database): add database file method logic.
HelloArmanX Feb 6, 2025
d5261d9
feat(testConfig): modified to execute unit tests single-threaded.
HelloArmanX Feb 8, 2025
60479aa
feat(database p2): add database file method logic.
HelloArmanX Feb 8, 2025
134cbb6
feat(database): the db.can_open method is suspected not to be blocked.
HelloArmanX Feb 8, 2025
bae2cee
feat(ExpressionTest): add ExpressionOperable file method logic.
HelloArmanX Feb 12, 2025
ddaea85
feat(ExpressionTest): add common method logic in the ExpressionOperab…
HelloArmanX Feb 13, 2025
78eb661
feat(transaction): add a database transaction unit test.
HelloArmanX Feb 14, 2025
4c5219f
chore: minor update, and TODO comments.
jrjrmiih Feb 14, 2025
804fc59
feat(StatementSelect): add table file method logic.
HelloArmanX Feb 17, 2025
75f85b5
refactor: fix trait TableORMOperationTrai to use same generic type.
jrjrmiih Feb 19, 2025
1bef0a5
feat(database): add logic for database corruption, backup, and repair.
HelloArmanX Feb 19, 2025
c4d129f
feat(database): add logic for database corruption, backup, and repair.
HelloArmanX Feb 24, 2025
f031c87
feat(WCDBTable): impl multi_indexes.
loginSin Feb 27, 2025
7336a25
feat(TableCoding): format as a java project structure.
HelloArmanX Feb 27, 2025
a456bdc
refactor: update WCDBTableCoding Field generator.
loginSin Feb 27, 2025
b55ecf8
feat(TableCode): add logic related to MultiUnique, MultiPrimaries, an…
HelloArmanX Feb 27, 2025
b0ad521
feat(WCDBField): impl is_unique & is_not_null & is_not_indexed.
loginSin Feb 28, 2025
032edce
refactor: split test class from orm_test.
loginSin Feb 28, 2025
0372f62
feat(TableConfig): add multi_indexes logic.
HelloArmanX Feb 28, 2025
f8f6a58
feat(TableCoding): tidy up the RustCodeGenerator code structure.
HelloArmanX Feb 28, 2025
2d70d75
feat(StatementCreateTable): impl create_table() & define().
loginSin Mar 3, 2025
541b61b
refactor: delete unused file.
loginSin Mar 3, 2025
2cdac1a
feat(StatementDropTable): impl drop_table() & of() & if_exist().
loginSin Mar 3, 2025
67e95d4
feat(BasicTypes): impl BasicTypes.
loginSin Mar 3, 2025
27872e2
test: add number MAX & MIN for BasicTypes.
loginSin Mar 3, 2025
446fce7
docs: add notes for BasicTypes.
loginSin Mar 3, 2025
4ed9abc
feat(rust_code_generator): add wcdb_default logic.
HelloArmanX Mar 3, 2025
90a9951
feat(WCDBBasicTypes): support i8、i16、i32、i64、f32、f64、bool、String、&str.
loginSin Mar 4, 2025
b254ef7
feat(rust_code_generator): add wcdb_index logic.
HelloArmanX Mar 4, 2025
bffe026
feat(StatementAlterTable): impl StatementAlterTable.
loginSin Mar 4, 2025
59eb85e
feat(StatementDropIndex): impl StatementDropIndex.
loginSin Mar 4, 2025
49aa6ba
refactor(WCDBRust): c method change to private.
loginSin Mar 4, 2025
dc5ebf8
feat(statement_create_index_test): add default、index logic.
HelloArmanX Mar 4, 2025
da6c9dc
feat(StatementTest): add statement test.
a1252425 Mar 4, 2025
732985a
feat(main): impl global_trace().
loginSin Mar 4, 2025
c065ea8
feat(Database): impl execute_sql().
loginSin Mar 5, 2025
82929d6
feat(Database): impl table_exist().
loginSin Mar 5, 2025
ad929fc
feat(table_coding): add macro field checking logic.
HelloArmanX Mar 5, 2025
5fd3862
feat(ExpressionOperable): the ExpressionOperable logic aligns java.
HelloArmanX Mar 5, 2025
b250627
test: table update primary key.
loginSin Mar 5, 2025
435116e
test: column rename.
loginSin Mar 5, 2025
6f788bb
feat(Join): add join logic.
HelloArmanX Mar 5, 2025
b51cd8a
test: database retrieve after delete wal.
loginSin Mar 6, 2025
9e9f21e
test: database retrieve with wal_autocheckpoint.
loginSin Mar 6, 2025
c6e72d7
test: database retrieve after delete shm.
loginSin Mar 6, 2025
22df49e
test: check exception for modify db file.
loginSin Mar 6, 2025
03bc0e6
test: database retrieve after modify db file.
loginSin Mar 7, 2025
234a652
refactor: add CorruptedBaseTestCase.
loginSin Mar 7, 2025
5289008
test: add test case for truncate file.
loginSin Mar 10, 2025
21b5c85
test: add test case for terminated_when_write.
loginSin Mar 10, 2025
db1c4e3
feat(Join): add join use case code and database missing logic.
HelloArmanX Mar 10, 2025
68943ef
feat(TableOperation): m-5343946023 add TableOperation fn.
a1252425 Mar 6, 2025
20fad10
chore: add Dockerfile.
loginSin Mar 11, 2025
3a7b2bd
feat(ResultColumn): add alias logic.
HelloArmanX Mar 11, 2025
4b71940
feat(TableOperation): m-5343946023 add TableOperation fn.
a1252425 Mar 6, 2025
7985e93
test: add test case for delete db file.
loginSin Mar 11, 2025
5fbcf6e
chore: use docker image 0.1.4.
loginSin Mar 12, 2025
c9c2ecf
feat(Database): impl set_cipher_key & set_default_cipher_version.
loginSin Mar 12, 2025
4aa2403
feat(Exception): m-5506978196 exception key map.
a1252425 Mar 12, 2025
fcae745
feat(Upgrade): add upgrade test logic.
HelloArmanX Mar 14, 2025
d161674
feat(TableORMOperation): m-5343946023 TableORMOperation fn.
a1252425 Mar 14, 2025
18351ff
feat(Statement): m-5508739054 statement unit test.
a1252425 Mar 14, 2025
8e69d1c
feat(WCDBField): support Option.
loginSin Mar 19, 2025
107a337
feat(ExpressionTest): add db performance tests and setConfig logic.
HelloArmanX Mar 19, 2025
f2175fe
feat(StatementUpdate): add StatementUpdate file method logic.
HelloArmanX Mar 19, 2025
2d5c951
feat(WCDBField): add not null check.
loginSin Mar 19, 2025
d005721
feat(Insert): impl get_last_insert_row_id.
loginSin Mar 19, 2025
f4c4d40
feat(Database): get_first return Option<T>.
loginSin Mar 19, 2025
b98e8e9
fix(Database): update_object index mismatch.
loginSin Mar 20, 2025
00d82cf
feat(CodeGenerator): impl get field methods.
loginSin Mar 20, 2025
b2d96b6
refactor: express new_with_column use Column ref.
loginSin Mar 20, 2025
b114707
fix(Binding): extract_object index mismatch.
loginSin Mar 20, 2025
d8589d8
refactor: fix some problem.
loginSin Mar 20, 2025
3c13463
test: add test case for ordering_term_test.
loginSin Mar 20, 2025
c938536
refactor: code generator.
loginSin Mar 21, 2025
3210055
feat(config_test_case): fix setConfig crash.
HelloArmanX Mar 21, 2025
fe944c7
refactor: code generator.
loginSin Mar 21, 2025
a4e3e68
refactor: delete empty files.
loginSin Mar 21, 2025
83f3de2
feat(WCDBField): support blob.
loginSin Mar 21, 2025
f131190
refactor: rename sdk for rust specification.
loginSin Mar 24, 2025
f0fc326
fix(DataBaseRust): convert to WCDBConfigCallback type.
a1252425 Mar 25, 2025
7499f98
feat(Conversation): m-5547623134 add order vec.
a1252425 Mar 25, 2025
db1ce7f
feat(ExpressionTest): change Expression to pass by reference.
HelloArmanX Mar 26, 2025
96f4a6a
feat(Upsert): add Upsert file method logic.
HelloArmanX Mar 27, 2025
b22c071
feat(Conversation): m-5580991583 add select obj by sql.
a1252425 Mar 28, 2025
f308786
feat(StatementUpdate): modify the set_columns parameter type in the S…
HelloArmanX Apr 2, 2025
d9af3d8
feat(Upsert): add Upsert file method logic.
HelloArmanX Apr 2, 2025
841fbed
feat(Database): remove the unwrap() call code from the Database and P…
HelloArmanX Apr 10, 2025
66202ce
feat(build): support submodule update.
loginSin Apr 10, 2025
a6fe516
fix(build): submodule add openssl.
loginSin Apr 10, 2025
283b240
chore: once_cell change to 1.19.0.
loginSin Apr 10, 2025
bbd59e5
chore: add proxy to fetch github.
loginSin Apr 15, 2025
a7682b4
feat(Expression): impl is_null() not_null().
loginSin Apr 15, 2025
39fe64d
revert: non-rust code changes.
jrjrmiih Apr 15, 2025
54ae10c
Merge branch 'Tencent:master' into rust
jrjrmiih Apr 15, 2025
4299eee
feat(Handle): change handle_inner to RefCell.
loginSin Apr 15, 2025
86c24f0
feat(WCDB): clear calls to unsafe functions such as unwrap and add CI…
HelloArmanX Apr 15, 2025
fadadcd
feat(WCDB): clear calls to unsafe functions such as panic and add CI …
HelloArmanX Apr 15, 2025
8841ec0
feat(Column): impl is_null() not_null().
loginSin Apr 17, 2025
1ed9949
chore: update build.rs search path.
loginSin Apr 28, 2025
69af48e
feat(Database): impl trace_performance.
loginSin May 13, 2025
d077146
refactor(Database): tracePerformance global store to property.
loginSin May 14, 2025
101ec1b
refactor(Database): trace_sql trace_exception.
loginSin May 14, 2025
3a04669
refactor: delete unused import.
loginSin May 30, 2025
22de53e
chore: support android.
loginSin May 30, 2025
cf785df
fix(Insert): free memory when drop.
loginSin Jun 4, 2025
ca4a590
feat(get_values_from_sql): impl get_values_from_sql.
loginSin Jun 16, 2025
dbefbb5
refactor: wcdb exception fmt.
loginSin Jun 16, 2025
ff56383
refactor: delete unused code.
loginSin Jun 19, 2025
1f78339
feat: build.rs support ohos.
loginSin Jun 19, 2025
ea979c6
feat: build.rs support CXX.
loginSin Jun 20, 2025
61fd3cd
refactor: optimize openssl search path.
loginSin Jun 20, 2025
a6f0fd1
fix: android arm64 target error.
loginSin Jun 20, 2025
c655bb0
chore: build.rs support android.
loginSin Jun 20, 2025
89b579c
feat: build static lib for apple.
loginSin Jun 23, 2025
c58b123
feat: support 32 bit.
loginSin Jun 24, 2025
54aff19
feat: build.rs support mac & ios.
loginSin Jun 30, 2025
eae9b5e
Merge branch 'Tencent:master' into rust
jrjrmiih Jul 8, 2025
b3a798a
chore: remove docker folder.
jrjrmiih Jul 8, 2025
cdc73b6
fix: build error for createDatabase.
loginSin Jul 8, 2025
047baf0
feat: support windows.
loginSin Jul 9, 2025
cd79e01
chore: use glibc 2.31 to support gettid().
loginSin Jul 15, 2025
ea22e03
feat(Database): remove the unsafe function call Arc::get_mut_unchecked.
HelloArmanX Jul 17, 2025
7aa310a
feat(BindParameter): add BindParameter file method logic.
HelloArmanX Jul 18, 2025
d888a9b
feat(Expression): add Expression file method logic.
HelloArmanX Jul 21, 2025
e53e497
fix: CString memory leak.
loginSin Aug 19, 2025
2669858
Revert "fix: CString memory leak."
loginSin Aug 19, 2025
fc957fe
fix: CString memory leak.
loginSin Aug 19, 2025
d0e5851
fix: cache CString avoid crash.
loginSin Aug 19, 2025
292592b
fix: linux test failed.
loginSin Aug 19, 2025
4edb498
fix: trace_exception crash.
loginSin Aug 19, 2025
2e86699
chore: change the instance name of the table macro definition from al…
jrjrmiih Aug 7, 2025
7416ed1
test: use database's api to test curd, do not use operation's directly.
jrjrmiih Aug 7, 2025
e3a48b8
fix: get table's filed using an incorrect method.
jrjrmiih Aug 7, 2025
3ad06ee
fix: bench demo build error.
jrjrmiih Aug 18, 2025
a30c613
refactor(can't build)!: redesign rust-style for all apis.
jrjrmiih Aug 27, 2025
ee77372
refactor: redesign rust-style for all apis, done.
jrjrmiih Aug 28, 2025
f467c15
test: refactor case impl for new api.
jrjrmiih Aug 29, 2025
e4269e3
refactor(can't build)!: fix build errors.
jrjrmiih Sep 1, 2025
40beeab
refactor(can't build)!: refactor database.
loginSin Sep 2, 2025
5c18dd1
refactor(can't build)!: fix build errors.
loginSin Sep 2, 2025
2e2dfe2
refactor(can't build)!: fix build errors.
loginSin Sep 2, 2025
8d231ac
refactor(can't build)!: fix build errors.
loginSin Sep 2, 2025
25e7489
refactor: fix build errors.
loginSin Sep 2, 2025
5abb57f
style: format code.
loginSin Sep 2, 2025
0c56af8
refactor: change mut to ref.
loginSin Sep 2, 2025
8eb2c12
feat: impl run_transaction in handle_operation.
loginSin Sep 2, 2025
663d77c
refactor: handle.
loginSin Sep 3, 2025
3278d79
refactor: table_operation table_orm_operation table.
loginSin Sep 3, 2025
4f31c22
feat(StatementRollback): add StatementRollback file method logic.
HelloArmanX Sep 3, 2025
30dd8eb
refactor: fix WCDBTableCoding build error.
loginSin Sep 3, 2025
6d234ed
refactor: fix test error.
loginSin Sep 3, 2025
1bb83fc
feat(StatementExplain): add StatementExplain file method logic.
HelloArmanX Sep 3, 2025
90e491a
feat(StatementBegin): add StatementBegin file method logic.
HelloArmanX Sep 3, 2025
bcea215
refactor: fix test error.
loginSin Sep 3, 2025
6df87ae
refactor: rename statement_begin
loginSin Sep 3, 2025
34de88c
refactor: fix test error.
loginSin Sep 3, 2025
003f431
feat(StatementDropView): add StatementDropView file method logic.
HelloArmanX Sep 4, 2025
6710a7b
feat(StatementDetach): add StatementDetach file method logic.
HelloArmanX Sep 4, 2025
86753e4
refactor: fix test error.
loginSin Sep 4, 2025
aa179a7
feat(StatementDropTrigger): add StatementDropTrigger file method logic.
HelloArmanX Sep 4, 2025
2f7b3a7
feat(StatementCreateView): add StatementCreateView file method logic.
HelloArmanX Sep 4, 2025
0b868e9
feat(StatementAnalyze): add StatementAnalyze file method logic.
HelloArmanX Sep 4, 2025
b12ab30
refactor: fix test error.
loginSin Sep 4, 2025
f7567e1
refactor: fix test error.
loginSin Sep 4, 2025
ffe0dbf
feat(StatementCreateVirtualTable): add StatementCreateVirtualTable fi…
HelloArmanX Sep 4, 2025
add97bc
refactor: fix test error.
HelloArmanX Sep 4, 2025
8bcb5e6
feat(StatementAttach): add StatementAttach file method logic.
HelloArmanX Sep 4, 2025
67be849
refactor: fix test error.
loginSin Sep 4, 2025
9995cf1
refactor: fix test error.
loginSin Sep 4, 2025
aff4831
refactor: fix build error.
loginSin Sep 5, 2025
18b2a6e
refactor: fix test error.
loginSin Sep 5, 2025
cc35d87
feat(StatementCreateTrigger): add StatementCreateTrigger file method …
HelloArmanX Sep 5, 2025
210f603
refactor: fix test error.
loginSin Sep 5, 2025
6b6975d
refactor: fix build errors.
loginSin Sep 5, 2025
555e575
refactor: fix build errors.
loginSin Sep 5, 2025
44f84d8
refactor: fix build errors.
loginSin Sep 5, 2025
6ddb27e
refactor: fix build errors.
loginSin Sep 5, 2025
7ef0a68
refactor: fix build errors.
loginSin Sep 5, 2025
273b8be
refactor: fix build errors.
loginSin Sep 5, 2025
dac56cd
refactor: fix build errors.
loginSin Sep 5, 2025
ee92307
refactor: fix build errors.
loginSin Sep 5, 2025
bc3624f
refactor: fix build errors.
loginSin Sep 5, 2025
e2eb798
refactor: fix warning.
loginSin Sep 5, 2025
f941d94
feat(StatementReindex): add StatementReindex file method logic.
HelloArmanX Sep 6, 2025
ba072b9
feat(ForeignKey): add ForeignKey file method logic.
HelloArmanX Sep 6, 2025
2ffb612
refactor: fix test errors.
loginSin Sep 8, 2025
88019d3
refactor: fix test errors.
loginSin Sep 8, 2025
e2d250c
refactor: fix test errors.
loginSin Sep 8, 2025
7edb20c
refactor: fix test errors.
loginSin Sep 9, 2025
b67a743
refactor: fix test errors.
loginSin Sep 9, 2025
a451ebf
refactor: fix test crash.
loginSin Sep 9, 2025
5e3f30a
refactor: fix build errors.
loginSin Sep 9, 2025
ab8f5e9
refactor: fix test crash.
loginSin Sep 9, 2025
f621444
refactor: fix test crash temporary.
loginSin Sep 9, 2025
8b601e7
refactor: fix test failed.
loginSin Sep 10, 2025
f2be36a
refactor: fix test crash.
loginSin Sep 10, 2025
1fdb180
refactor: fix test failed.
loginSin Sep 10, 2025
2e07c87
refactor: remove todo.
loginSin Sep 10, 2025
a1c8d7a
fix: avoid null ptr exception.
loginSin Sep 10, 2025
509e23a
feat: change Expression & OrderingTerm to ref.
loginSin Sep 11, 2025
23bc390
fix: move db file to tmp dir.
loginSin Sep 11, 2025
197c509
feat(ResultColumn): new support ResultColumnConvertibleTrait.
loginSin Sep 11, 2025
f35a4d6
refactor: rename method without r#.
loginSin Sep 11, 2025
5d1710a
fix: statement_select order_by crash.
loginSin Sep 11, 2025
1b37064
refactor: change peekable to vec.
loginSin Sep 11, 2025
27902a1
refactor: rename not_in_ to not_in.
loginSin Sep 11, 2025
8d0706b
refactor: rename enum params.
jrjrmiih Sep 11, 2025
de966b5
Merge branch 'Tencent:master' into rust
jrjrmiih Sep 11, 2025
5574017
style: format code.
jrjrmiih Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
57 changes: 57 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

image: "harbor.rongcloud.net/library/rust/wcdb:0.1.4"

cache:
paths:
- CargoHome/registry/index/
- CargoHome/registry/cache/
- src/rust/target/
- src/rust/Cargo.lock

stages:
- check
- test

variables:
GIT_DEPTH: 1

run_check_unsafe_keywords:
stage: check
script: |
echo "Check danger function..."
if find src/rust/wcdb/src -name '*.rs' | xargs -P4 grep -n '\bc_long\b|\.unwrap()\|\.expect(\|unreachable!\|panic!'; then
echo "Error: banned c_long/unwrap/expect/unreachable!/panic!"
exit 1
fi
rules:
- changes:
- "src/rust/wcdb/src/**/*.rs"

run_test:
stage: test
before_script:
- export http_proxy=http://172.19.23.87:7890
- export https_proxy=http://172.19.23.87:7890
- export NO_PROXY=localhost,127.0.0.1,rsproxy.cn
- git submodule update --init openssl sqlcipher zstd
- npm config set registry https://registry.npmmirror.com
- npm install --save-dev @commitlint/config-conventional @commitlint/cli
script:
- export CARGO_HOME=${CI_PROJECT_DIR}/CargoHome
- export RUSTFLAGS="-D warnings -A unused -A deprecated"
- export CC=`which cc`
- export CXX=`which c++`
- cd src/rust
- echo "${CI_COMMIT_MESSAGE}" | npx commitlint
- autocorrect --lint
- FILES=$(git ls-files '*.c' '*.cpp' '*.h')
- for file in $FILES; do
clang-format "$file" | colordiff -u "$file" -;
done
- cargo fmt -- --check
- cargo test -- --test-threads=1
- TARGET_SIZE=$(du -sm target 2>/dev/null | awk '{print $1}')
- echo "target:${TARGET_SIZE}m"
- if [ "$TARGET_SIZE" -gt 2048 ]; then
rm -rf target;
fi
25 changes: 19 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ file(GLOB_RECURSE WCDB_BRIDGE_SRC
${WCDB_SRC_DIR}/bridge/winqbridge/*.[ch]pp
)
recursive_subdirs(WCDB_BRIDGE_INCLUDES ${WCDB_SRC_DIR}/bridge)
if (WIN32)
# Ignore symlinks in src/brideg/include for windows to avoid redefinition errors
list(FILTER WCDB_BRIDGE_INCLUDES EXCLUDE REGEX ".*[\\\\/]include")
endif()

# Copy all headers to include folder
file(GLOB_RECURSE WCDB_PUBLIC_HEADERS
Expand Down Expand Up @@ -523,12 +527,21 @@ elseif (APPLE AND NOT WCONAN_MODE)
target_sources(${TARGET_NAME} PUBLIC ${WCDB_PUBLIC_HEADERS})
file(STRINGS "../VERSION" WCDB_VERSION)
message(STATUS "Xcode ${TARGET_NAME}.framework version ${WCDB_VERSION}")
set_target_properties(${TARGET_NAME} PROPERTIES
FRAMEWORK TRUE
FRAMEWORK_VERSION ${WCDB_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER com.tencent.${TARGET_NAME}
PUBLIC_HEADER "${WCDB_PUBLIC_HEADERS}"
)
if(BUILD_FROM_CARGO)
message(STATUS "---- BUILD FOR APPLE FROM CARGO ----")
if (BUILD_SHARED_LIBS)
target_link_libraries(${TARGET_NAME} PRIVATE crypto z)
else()
target_link_libraries(${TARGET_NAME} PUBLIC crypto z)
endif()
else()
set_target_properties(${TARGET_NAME} PROPERTIES
FRAMEWORK TRUE
FRAMEWORK_VERSION ${WCDB_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER com.tencent.${TARGET_NAME}
PUBLIC_HEADER "${WCDB_PUBLIC_HEADERS}"
)
endif()
elseif (OHOS)
message(STATUS "---- BUILD FOR OPENHARMONY ----")
target_link_libraries(${TARGET_NAME} PUBLIC
Expand Down
2 changes: 2 additions & 0 deletions src/bridge/base/ErrorBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "Notifier.hpp"
#include "ObjectBridge.hpp"

#include <climits>

long WCDBErrorGetCode(CPPError error)
{
WCDBGetObjectOrReturnValue(error, WCDB::Error, cppError, INT_MAX);
Expand Down
2 changes: 1 addition & 1 deletion src/common/platform/CrossPlatform.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <errno.h>
#include <unistd.h>

#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 32
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target/
cmake-build-*/

*.sqlite3*1
Loading