diff --git a/.github/workflows/cross.yml b/.github/workflows/cross.yml index 4f384d4e..9f2ff201 100644 --- a/.github/workflows/cross.yml +++ b/.github/workflows/cross.yml @@ -280,7 +280,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: surrealdb - path: build/libs/surrealdb-0.2.0.jar + path: build/libs/surrealdb-0.2.1-SNAPSHOT.jar - name: Linux Integration Test run: ./gradlew -i integrationTest diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 49a9056f..0965890e 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -54,6 +54,7 @@ jobs: - name: Deploy uses: peaceiris/actions-gh-pages@v4 + if: github.ref == 'refs/heads/main' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build/reports diff --git a/CHANGELOG.md b/CHANGELOG.md index c352d4a0..46b465e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog -## [0.2.0] - 2024-06-XX +## [0.2.0] - 2024-10-08 + Native driver ## [0.1.0] - 2022-09-23 + First GA release diff --git a/Cargo.lock b/Cargo.lock index d4da40ee..ac41c8e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,9 +23,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -71,9 +71,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "ammonia" @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" [[package]] name = "arc-swap" @@ -252,7 +252,7 @@ dependencies = [ "proc-macro2", "quote", "strum", - "syn 2.0.79", + "syn 2.0.87", "thiserror", ] @@ -299,7 +299,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -316,7 +316,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -473,9 +473,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "f5327f6c99920069d1fe374aa743be1af0031dea9f250852cdf1ae6a0861ee24" dependencies = [ "borsh-derive", "cfg_aliases", @@ -483,16 +483,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "10aedd8f1a81a8aafbfde924b0e3061cd6fedd6f6bbcfc6a76e6fd426d7bfe26" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.79", - "syn_derive", + "syn 2.0.87", ] [[package]] @@ -525,9 +524,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" [[package]] name = "byteorder" @@ -537,9 +536,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -555,9 +554,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.24" +version = "1.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" +checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" dependencies = [ "shlex", ] @@ -800,7 +799,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -811,7 +810,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -895,6 +894,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dmp" version = "0.2.0" @@ -949,9 +959,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1020,9 +1030,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fixedbitset" @@ -1042,6 +1052,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1075,9 +1091,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1090,9 +1106,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1100,15 +1116,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1117,15 +1133,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ "fastrand", "futures-core", @@ -1136,26 +1152,26 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -1165,9 +1181,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1255,9 +1271,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "half" @@ -1299,9 +1315,14 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] [[package]] name = "heapless" @@ -1357,7 +1378,7 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1408,9 +1429,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -1445,9 +1466,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1485,6 +1506,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1493,12 +1632,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1541,7 +1691,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -1617,9 +1767,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1687,15 +1837,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.159" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libredox" @@ -1725,6 +1875,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -1743,11 +1899,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.1", ] [[package]] @@ -1822,7 +1978,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1997,9 +2153,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -2027,12 +2183,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "parking" @@ -2116,9 +2269,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -2195,7 +2348,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "unicase", ] @@ -2226,9 +2379,9 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2236,12 +2389,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "portable-atomic" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" - [[package]] name = "powerfmt" version = "0.2.0" @@ -2298,9 +2445,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -2401,10 +2548,11 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", @@ -2546,14 +2694,14 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2563,9 +2711,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2589,9 +2737,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -2669,7 +2817,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2680,7 +2828,7 @@ checksum = "5f0ec466e5d8dca9965eb6871879677bef5590cf7525ad96cae14376efb75073" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2778,9 +2926,9 @@ checksum = "cbf4a6aa5f6d6888f39e980649f3ad6b666acdce1d78e95b8a2cb076e687ae30" [[package]] name = "rstar" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133315eb94c7b1e8d0cb097e5a710d850263372fd028fff18969de708afc7008" +checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb" dependencies = [ "heapless", "num-traits", @@ -2845,9 +2993,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ "bitflags", "errno", @@ -2858,9 +3006,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "log", "once_cell", @@ -2882,9 +3030,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" dependencies = [ "web-time", ] @@ -2902,9 +3050,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2971,9 +3119,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] @@ -2989,20 +3137,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "indexmap 2.6.0", "itoa", @@ -3025,9 +3173,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9720086b3357bcb44fce40117d769a4d068c70ecfa190850a980a71755f66fcc" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", @@ -3043,14 +3191,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f1abbfe725f27678f4663bcacb75a83e829fd464c25d78dd038a3a29e307cec" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -3273,7 +3421,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -3284,7 +3432,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "surrealdb" -version = "0.2.0" +version = "0.2.1" dependencies = [ "chrono", "dashmap 6.1.0", @@ -3294,15 +3442,15 @@ dependencies = [ "parking_lot", "rust_decimal", "serde", - "surrealdb 2.0.3", + "surrealdb 2.0.4", "tokio", ] [[package]] name = "surrealdb" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96e77fb57ae0883b520410cf3892b8f7a66cc59ed2e1d4e22393f2017f51d07" +checksum = "300749e641e2a5546a142333d91b3537969e9c4cbd1fa2d1d10d92f01624d470" dependencies = [ "arrayvec", "async-channel 1.9.0", @@ -3341,9 +3489,9 @@ dependencies = [ [[package]] name = "surrealdb-core" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e17b65d1ccc533b44774a567f4bca122347cc57a13c41efb2d44bf316cbd7e4" +checksum = "5795fca60f099754934069dfb3d20824cfec94b4c13c7130d1cd52e0fcadfc42" dependencies = [ "addr", "ahash 0.8.11", @@ -3468,9 +3616,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -3478,24 +3626,23 @@ dependencies = [ ] [[package]] -name = "syn_derive" -version = "0.1.8" +name = "sync_wrapper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.79", + "futures-core", ] [[package]] -name = "sync_wrapper" -version = "1.0.1" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "futures-core", + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] @@ -3506,9 +3653,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -3541,22 +3688,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -3609,6 +3756,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -3626,9 +3783,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -3648,7 +3805,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -3734,7 +3891,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -3810,18 +3967,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.17" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" @@ -3874,9 +4022,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -3895,11 +4043,23 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "serde", @@ -3945,9 +4105,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -3956,24 +4116,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -3983,9 +4143,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3993,28 +4153,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -4025,9 +4185,9 @@ dependencies = [ [[package]] name = "wasmtimer" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f656cd8858a5164932d8a90f936700860976ec21eb00e0fe2aa8cab13f6b4cf" +checksum = "c7ed9d8b15c7fb594d72bfb4b5a276f3d2029333cd93a932f376f5937f6f80ee" dependencies = [ "futures", "js-sys", @@ -4038,9 +4198,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -4292,6 +4452,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "ws_stream_wasm" version = "0.7.4" @@ -4320,6 +4492,30 @@ dependencies = [ "tap", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -4338,7 +4534,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -4346,3 +4563,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/Cargo.toml b/Cargo.toml index a8d908f8..e056c013 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "surrealdb" -version = "0.2.0" +version = "0.2.1" authors = ["Emmanuel Keller "] edition = "2021" @@ -13,12 +13,12 @@ opt-level = 3 [dependencies] jni = "0.21.1" -surrealdb = "2.0.3" -serde = "1.0.210" +surrealdb = "2.0.4" +serde = "1.0.214" rust_decimal = "1.36.0" -tokio = "1.40.0" +tokio = "1.41.1" parking_lot = "0.12.3" -once_cell = "1.20.1" +once_cell = "1.20.2" chrono = "0.4.38" log = "0.4.22" dashmap = "6.1.0" diff --git a/README.md b/README.md index 997f5de9..20b6cc24 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Gradle: ```groovy ext { - surrealdbVersion = "0.2.0" + surrealdbVersion = "0.2.1-SNAPSHOT" } dependencies { @@ -80,7 +80,7 @@ Maven: com.surrealdb surrealdb - 0.2.0 + 0.2.1-SNAPSHOT ``` diff --git a/build.gradle b/build.gradle index 18cb6349..c06e752f 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { } group 'com.surrealdb' -version '0.2.0' +version '0.2.1-SNAPSHOT' repositories { mavenCentral() @@ -31,7 +31,7 @@ configurations { dependencies { testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' - integrationTestImplementation files("build/libs/surrealdb-0.2.0.jar") + integrationTestImplementation files("build/libs/surrealdb-0.2.1-SNAPSHOT.jar") } jacoco { diff --git a/src/main/java/com/surrealdb/Array.java b/src/main/java/com/surrealdb/Array.java index 7be91fd2..f5025079 100644 --- a/src/main/java/com/surrealdb/Array.java +++ b/src/main/java/com/surrealdb/Array.java @@ -2,6 +2,11 @@ import java.util.Iterator; +/** + * The Array class represents a native array structure and provides methods to + * interact with and retrieve values from the array. + * It implements the Iterable interface for Value type. + */ public class Array extends Native implements Iterable { diff --git a/src/main/java/com/surrealdb/Entry.java b/src/main/java/com/surrealdb/Entry.java index e7ea2e50..e2a41fb1 100644 --- a/src/main/java/com/surrealdb/Entry.java +++ b/src/main/java/com/surrealdb/Entry.java @@ -1,5 +1,10 @@ package com.surrealdb; +/** + * Entry represents a key-value pair entry in a native data structure. + *

+ * Entry provides methods to retrieve the key and value associated with the entry. + */ public class Entry extends Native { Entry(long ptr) { diff --git a/src/main/java/com/surrealdb/EntryIterator.java b/src/main/java/com/surrealdb/EntryIterator.java index 71db24ee..64b42901 100644 --- a/src/main/java/com/surrealdb/EntryIterator.java +++ b/src/main/java/com/surrealdb/EntryIterator.java @@ -3,6 +3,11 @@ import java.util.Iterator; import java.util.Objects; +/** + * EntryIterator is a specialized iterator for traversing entries. + * This class implements the Java Iterator interface to provide a seamless way to + * iterate over Entry objects. + */ public class EntryIterator extends Native implements Iterator { EntryIterator(long ptr) { diff --git a/src/main/java/com/surrealdb/Id.java b/src/main/java/com/surrealdb/Id.java index 6af408d9..909b38d2 100644 --- a/src/main/java/com/surrealdb/Id.java +++ b/src/main/java/com/surrealdb/Id.java @@ -1,5 +1,8 @@ package com.surrealdb; +/** + * The Id class represents a unique identifier that can be either a long value or a string. + */ public class Id extends Native { Id(long ptr) { diff --git a/src/main/java/com/surrealdb/InsertRelation.java b/src/main/java/com/surrealdb/InsertRelation.java index 33e41034..2dcd4f9a 100644 --- a/src/main/java/com/surrealdb/InsertRelation.java +++ b/src/main/java/com/surrealdb/InsertRelation.java @@ -3,6 +3,19 @@ import java.lang.Object; import java.util.Objects; +/** + * The InsertRelation class represents a relationship between entities in a graph database. + * It is primarily used to insert relations into a table using SurrealDB. + *

+ * This class encapsulates the identifiers for the relation, including the IDs for the entities that + * participate in the relationship. Specifically, it includes the following fields: + *

+ *

+ */ public class InsertRelation { public Id id; diff --git a/src/main/java/com/surrealdb/Object.java b/src/main/java/com/surrealdb/Object.java index dd016fc1..087a8ed8 100644 --- a/src/main/java/com/surrealdb/Object.java +++ b/src/main/java/com/surrealdb/Object.java @@ -2,6 +2,10 @@ import java.util.Iterator; +/** + * The Object class implements the Iterable interface for Entry objects. + * It provides methods for object manipulation and interaction. + */ public class Object extends Native implements Iterable { Object(long ptr) { diff --git a/src/main/java/com/surrealdb/RecordId.java b/src/main/java/com/surrealdb/RecordId.java index 3d8990ec..96048ecf 100644 --- a/src/main/java/com/surrealdb/RecordId.java +++ b/src/main/java/com/surrealdb/RecordId.java @@ -1,5 +1,12 @@ package com.surrealdb; +/** + * The RecordId class represents a unique identifier for a record in a database. + *

+ * It provides methods to create and manipulate record IDs using either a table + * name and a long ID or a table name and a string ID. Additionally, it allows + * retrieval of the table associated with the ID and the ID itself. + */ public class RecordId extends Native { diff --git a/src/main/java/com/surrealdb/Relation.java b/src/main/java/com/surrealdb/Relation.java index a16b6abe..43131c11 100644 --- a/src/main/java/com/surrealdb/Relation.java +++ b/src/main/java/com/surrealdb/Relation.java @@ -3,6 +3,10 @@ import java.lang.Object; import java.util.Objects; +/** + * The Relation class represents a relationship between two records within a database. + * It holds the identifiers for the relationship itself and the two records it connects. + */ public class Relation { public RecordId id; diff --git a/src/main/java/com/surrealdb/Response.java b/src/main/java/com/surrealdb/Response.java index d29cbb5e..5a815957 100644 --- a/src/main/java/com/surrealdb/Response.java +++ b/src/main/java/com/surrealdb/Response.java @@ -2,6 +2,9 @@ import java.util.Objects; +/** + * The Response class is a specialized wrapper for handling responses from SurrealDB. + */ public class Response extends Native { Response(long ptr) { diff --git a/src/main/java/com/surrealdb/Surreal.java b/src/main/java/com/surrealdb/Surreal.java index 850c810f..7e17bf39 100644 --- a/src/main/java/com/surrealdb/Surreal.java +++ b/src/main/java/com/surrealdb/Surreal.java @@ -7,12 +7,20 @@ import java.util.stream.LongStream; import java.util.stream.Stream; +/** + * The {@code Surreal} class provides methods to interact with a Surreal database. + * It includes functionality to connect to the database, sign in with different scopes, + * set the namespace and database, execute queries, and perform CRUD operations on records. + */ public class Surreal extends Native implements AutoCloseable { static { Loader.loadNative(); } + /** + * Constructs a new Surreal object. + */ public Surreal() { super(Surreal.newInstance()); } @@ -102,11 +110,28 @@ final boolean equals(long ptr1, long ptr2) { @Override final native boolean deleteInstance(long ptr); + /** + * Establishes a connection to the Surreal database using the provided connection string. + * + * @param connect the connection string used to establish the connection + * @return the current instance of the {@code Surreal} class + */ public Surreal connect(String connect) { connect(getPtr(), connect); return this; } + /** + * Attempts to sign in to the Surreal system using the provided credentials. + * The type of signin object determines the scope of the sign-in (Root, Namespace, or Database). + *

+ * For more details, check the authentication documentation. + *

+ * + * @param signin the credentials for signing in, which can be an instance of Root, Namespace, or Database + * @return a Token representing the session token after a successful sign-in + * @throws SurrealException if the signin type is unsupported + */ public Token signin(Signin signin) { if (signin instanceof Database) { final Database db = (Database) signin; @@ -121,34 +146,104 @@ public Token signin(Signin signin) { throw new SurrealException("Unsupported sign in"); } + /** + * Sets the namespace for the Surreal instance. + *

+ * For more details, check the use statement documentation. + *

+ * + * @param ns the namespace to use + * @return the current instance of the {@code Surreal} class + */ public Surreal useNs(String ns) { useNs(getPtr(), ns); return this; } - public Surreal useDb(String ns) { - useDb(getPtr(), ns); + /** + * Sets the database for the current instance of the Surreal class. + *

+ * For more details, check the use statement documentation. + *

+ * + * @param db the database name to use + * @return the current instance of the {@code Surreal} class + */ + public Surreal useDb(String db) { + useDb(getPtr(), db); return this; } + /** + * Executes a SurrealQL query on the database. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param sql the SurrealQL query to be executed + * @return a Response object containing the results of the query + */ public Response query(String sql) { return new Response(query(getPtr(), sql)); } + /** + * Executes a parameterized SurrealQL query on the database. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param sql the SurrealQL query to be executed + * @param params a map containing parameter values to be bound to the SQL query + * @return a Response object containing the results of the query + */ public Response queryBind(String sql, Map params) { return new Response(queryBind(getPtr(), sql, params)); } + /** + * Creates a record in the database with the given `RecordID` as the key and the provided content as the value. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param the type of the content + * @param thg the RecordId associated with the new record + * @param content the content of the created record + * @return a new Value object initialized with the provided RecordId and content + */ public Value create(RecordId thg, T content) { final ValueMut valueMut = ValueBuilder.convert(content); final long valuePtr = createThingValue(getPtr(), thg.getPtr(), valueMut.getPtr()); return new Value(valuePtr); } + /** + * Creates a record in the database with the given `RecordID` as the key and the provided content as the value. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param type The class type of the object to create + * @param thg The RecordId used with the new record + * @param content The content of the created record + * @return An instance of the specified type + */ public T create(Class type, RecordId thg, T content) { return create(thg, content).get(type); } + /** + * Creates records in the database with the given table and the provided contents as the values. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param the type of the contents + * @param target the target for which the records are created + * @param contents the contents of the created records + * @return a list of Value objects created based on the target and contents + */ @SafeVarargs public final List create(String target, T... contents) { final long[] valueMutPtrs = contents2longs(contents); @@ -156,6 +251,18 @@ public final List create(String target, T... contents) { return Arrays.stream(valuePtrs).mapToObj(Value::new).collect(Collectors.toList()); } + /** + * Creates records in the database with the given table and the provided contents as the values. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param the type of objects to be created + * @param type the class of the type to be created + * @param target the target string used in the creation process + * @param contents the contents to be used to create the objects + * @return a list of objects of the specified type + */ @SafeVarargs public final List create(Class type, String target, T... contents) { try (final Stream s = create(target, contents).stream()) { @@ -163,6 +270,17 @@ public final List create(Class type, String target, T... contents) { } } + /** + * Insert records in the database with the given table and the provided contents as the values. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param the type of the contents + * @param target the target for which the records are inserted + * @param contents the contents of the inserted records + * @return a list of Value objects inserted based on the target and contents + */ @SafeVarargs public final List insert(String target, T... contents) { final long[] valueMutPtrs = contents2longs(contents); @@ -170,6 +288,18 @@ public final List insert(String target, T... contents) { return Arrays.stream(valuePtrs).mapToObj(Value::new).collect(Collectors.toList()); } + /** + * Insert records in the database with the given table and the provided contents as the values. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param the type of objects to be inserted + * @param type the class of the type to be inserted + * @param target the target string used in the insertion process + * @param contents the contents to be used to insert the objects + * @return a list of objects of the specified type + */ @SafeVarargs public final List insert(Class type, String target, T... contents) { try (final Stream s = insert(target, contents).stream()) { @@ -177,16 +307,50 @@ public final List insert(Class type, String target, T... contents) { } } + /** + * Inserts a relation to the specified table using the provided content. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param target the table where the relation is to be inserted + * @param content the content to insert as the relation + * @param a type that extends InsertRelation + * @return a Value object representing the inserted relation + */ public Value insertRelation(String target, T content) { final ValueMut valueMut = ValueBuilder.convert(content); final long valuePtr = insertRelationTargetValue(getPtr(), target, valueMut.getPtr()); return new Value(valuePtr); } + /** + * Inserts a relation of the specified type and table with the provided content. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param the type of the relation that extends InsertRelation + * @param type the class object of the type T + * @param target the target identifier for the relation + * @param content the content to be inserted in the relation + * @return the inserted relation of type T + */ public T insertRelation(Class type, String target, T content) { return insertRelation(target, content).get(type); } + /** + * Inserts relations into the specified table with the provided contents. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param target the table into which the relations will be inserted + * @param contents the contents of the relations to be inserted + * @param the type of the insert relation + * @return a list of values representing the result of the insert operation + */ @SafeVarargs public final List insertRelations(String target, T... contents) { final long[] valueMutPtrs = contents2longs(contents); @@ -194,6 +358,18 @@ public final List insertRelations(String targe return Arrays.stream(valuePtrs).mapToObj(Value::new).collect(Collectors.toList()); } + /** + * Inserts multiple relations of a specified type into the target. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param the type of InsertRelation + * @param type the class type of the InsertRelation + * @param target the table in which the relations are to be inserted + * @param contents the array of InsertRelation objects to be inserted + * @return a list of inserted relations of the specified type + */ @SafeVarargs public final List insertRelations(Class type, String target, T... contents) { try (final Stream s = insertRelations(target, contents).stream()) { @@ -201,113 +377,400 @@ public final List insertRelations(Class type, S } } + /** + * Establishes a relation between two records identified by `from` and `to` within a specified table. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param from the record identifier from which the relation originates + * @param table the name of the table where the relation will be established + * @param to the record identifier to which the relation points + * @return a new {@code Value} instance representing the relation + */ public Value relate(RecordId from, String table, RecordId to) { final long valuePtr = relate(getPtr(), from.getPtr(), table, to.getPtr()); return new Value(valuePtr); } + /** + * Establishes and retrieves a relation of a specified type between two records. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param The type of the relation extending Relation. + * @param type The class type of the relation. + * @param from The starting record of the relation. + * @param table The name of the table that holds the relation. + * @param to The ending record of the relation. + * @return The established relation of the specified type. + */ public T relate(Class type, RecordId from, String table, RecordId to) { return relate(from, table, to).get(type); } + /** + * Establishes a relationship between two records within a specified table, + * attaching the provided content to this relationship. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the content associated with the relation + * @param from The record ID that the relationship starts from. + * @param table The table in which the relationship is being created. + * @param to The record ID that the relationship points to. + * @param content The content to attach to the relationship. + * @return A Value object representing the newly created relationship. + */ public Value relate(RecordId from, String table, RecordId to, T content) { final ValueMut valueMut = ValueBuilder.convert(content); final long valuePtr = relateContent(getPtr(), from.getPtr(), table, to.getPtr(), valueMut.getPtr()); return new Value(valuePtr); } + /** + * Establishes a relation between two records and retrieves it based on the specified relation type. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the relation + * @param the type of the content associated with the relation + * @param type the class of the relation type + * @param from the record identifier of the source record + * @param table the name of the table where the relation is to be established + * @param to the record identifier of the target record + * @param content the content to be associated with the relation + * @return the established relation of the specified type + */ public R relate(Class type, RecordId from, String table, RecordId to, T content) { return relate(from, table, to, content).get(type); } + /** + * Updates the value of a record with the specified content and update type. + *

+ * For more details, check the SurrealQL documentation. + * + * @param The type of the content to be updated. + * @param thg The RecordId of the thing to be updated. + * @param upType The type of update to be performed. + * @param content The new content to set for the specified record. + * @return A Value object representing the updated value. + */ public Value update(RecordId thg, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); final long valuePtr = updateThingValue(getPtr(), thg.getPtr(), upType.code, valueMut.getPtr()); return new Value(valuePtr); } + /** + * Updates a record of the specified type and returns the updated record. + *

+ * For more details, check the SurrealQL documentation. + * + * @param type the class type of the record to be updated + * @param thg the identifier of the record to be updated + * @param upType the type of update operation to be performed + * @param content the new content to update the record with + * @param the type of the record + * @return the updated record of the specified type + */ public T update(Class type, RecordId thg, UpType upType, T content) { return update(thg, upType, content).get(type); } + /** + * Updates the table with the given content based on the specified update type. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the content to be used for the update + * @param target the table to be updated + * @param upType the type of update operation to be performed + * @param content the content to update the target with + * @return an Iterator of Value objects reflecting the updated state of the target + */ public Iterator update(String target, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); return new ValueIterator(updateTargetValue(getPtr(), target, upType.code, valueMut.getPtr())); } + /** + * Updates the specified tables with the given content. + *

+ * For more details, check the SurrealQL documentation. + * + * @param targets an array of strings representing the table identifiers to be updated + * @param upType the type of update operation to be performed + * @param content the content to update the targets with; the content can be of any type + * @param the type of the content + * @return an Iterator of Value objects representing the updated values + */ public Iterator update(String[] targets, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); return new ValueIterator(updateTargetsValue(getPtr(), targets, upType.code, valueMut.getPtr())); } + /** + * Updates the specified table with the provided content and returns an iterator + * for the updated values. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the content and the type parameter for the iterator + * @param type the class type of the content + * @param target the table to be updated + * @param upType the type of update operation to be performed + * @param content the content to update the target with + * @return an iterator over the updated values + */ public Iterator update(Class type, String target, UpType upType, T content) { return new ValueObjectIterator<>(type, update(target, upType, content)); } + /** + * Updates the specified tables with the given content and returns an iterator + * over the updated elements of the specified type. + *

+ * For more details, check the SurrealQL documentation. + * + * @param type The class type of the elements to be updated. + * @param targets An array of table identifiers to be updated. + * @param upType The type of update operation to be performed. + * @param content The content to update the targets with. + * @param The type of the elements being updated. + * @return An iterator over the updated elements of the specified type. + */ public Iterator update(Class type, String[] targets, UpType upType, T content) { return new ValueObjectIterator<>(type, update(targets, upType, content)); } + /** + * Updates the specified table with the provided content. + *

+ * For more details, check the SurrealQL documentation. + * + * @param The type of the content to be synchronized. + * @param target The table identifier to be updated. + * @param upType The type of update to be performed, represented by an UpType object. + * @param content The content to update the target with. + * @return A thread-safe Iterator of Value objects that reflects the updated state. + */ public Iterator updateSync(String target, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); return new SynchronizedValueIterator(updateTargetValueSync(getPtr(), target, upType.code, valueMut.getPtr())); } + /** + * Updates the tables using the provided content and update type. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the content being updated + * @param targets an array of strings representing the tables to be updated + * @param upType an instance of {@code UpType} indicating the type of update to be performed + * @param content the content to be used for the update, which will be converted to a {@code Value} + * @return a thread-safe iterator over the updated {@code Value} objects + */ public Iterator updateSync(String[] targets, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); return new SynchronizedValueIterator(updateTargetsValueSync(getPtr(), targets, upType.code, valueMut.getPtr())); } + /** + * Updates the table with the provided content. + * The updated resource is then returned as a thread-safe iterator of the specified type. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the content being updated + * @param type the class type of the elements that the returned iterator will contain + * @param target the identifier of the table resource to be updated + * @param upType the type of update operation to be performed + * @param content the data to update the target resource with + * @return a thread-safe iterator of the specified type containing the updated resource + */ public Iterator updateSync(Class type, String target, UpType upType, T content) { return new ValueObjectIterator<>(type, updateSync(target, upType, content)); } + /** + * Updates the provided tables with the provided content and returns an iterator for the updated values. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the content being updated + * @param type the class type of the content + * @param targets an array of target identifiers to be updated + * @param upType the type of update to be performed + * @param content the content to be used for the update + * @return a thread-safe iterator for the updated values + */ public Iterator updateSync(Class type, String[] targets, UpType upType, T content) { return new ValueObjectIterator<>(type, updateSync(targets, upType, content)); } + /** + * Inserts a new record or updates an existing record with the given content. + *

+ * For more details, check the SurrealQL documentation. + * + * @param The type of the content. + * @param thg The record identifier. + * @param upType The update type specifying how to handle the upsert. + * @param content The content to be inserted or updated. + * @return The resulting value after the upsert operation. + */ public Value upsert(RecordId thg, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); final long valuePtr = upsertThingValue(getPtr(), thg.getPtr(), upType.code, valueMut.getPtr()); return new Value(valuePtr); } + /** + * Upserts a record and returns the updated or inserted entity. + *

+ * For more details, check the SurrealQL documentation. + * + * @param The type of the entity to be upserted. + * @param type The class type of the entity. + * @param thg The record identifier. + * @param upType The type of the update. + * @param content The content of the entity to be upserted. + * @return The upserted entity of the specified type. + */ public T upsert(Class type, RecordId thg, UpType upType, T content) { return upsert(thg, upType, content).get(type); } + /** + * Performs an upsert operation on the specified table with the provided content. + * The operation type is determined by the {@code UpType} enumeration. + *

+ * For more details, check the SurrealQL documentation. + * + * @param The type of the content to be upserted. + * @param target The target on which the upsert operation is to be performed. + * @param upType The type of upsert operation to be executed. + * @param content The content to be upserted. + * @return An iterator over the values resulting from the upsert operation. + */ public Iterator upsert(String target, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); return new ValueIterator(upsertTargetValue(getPtr(), target, upType.code, valueMut.getPtr())); } + /** + * Inserts or updates values in the given tables. + *

+ * For more details, check the SurrealQL documentation. + * + * @param targets The array of tables to upsert values. + * @param upType The type specifying the upserting strategy to use. + * @param content The content to be inserted or updated. + * @param The type of the content to upsert. + * @return An iterator over the upserted values. + */ public Iterator upsert(String[] targets, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); return new ValueIterator(upsertTargetsValue(getPtr(), targets, upType.code, valueMut.getPtr())); } + /** + * Inserts or updates a record of the specified type with the given content. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the object to be upserted. + * @param type the Class object representing the type of the object. + * @param target the table identifier where the records should be upserted. + * @param upType the type of upsert operation to perform. + * @param content the content of the object to be upserted. + * @return an iterator of the type {@code T} containing the results of the upsert operation. + */ public Iterator upsert(Class type, String target, UpType upType, T content) { return new ValueObjectIterator<>(type, upsert(target, upType, content)); } + /** + * Updates or inserts the provided content based on the specified tables and update type. + *

+ * For more details, check the SurrealQL documentation. + * + * @param The type of the content to upsert. + * @param type the Class object representing the type of the object. + * @param targets An array of target identifiers for the upsert operation. + * @param upType The type of the upsert operation specifying how to merge the content. + * @param content The content to be upserted. + * @return An iterator over the result of the upsert operation. + */ public Iterator upsert(Class type, String[] targets, UpType upType, T content) { return new ValueObjectIterator<>(type, upsert(targets, upType, content)); } + /** + * Inserts or updates the table with the provided content and + * returns a thread-safe iterator over the resulting values. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param the type of the content to be upserted + * @param target the target identifier where the content will be upserted + * @param upType the type of upsert operation + * @param content the content to be upserted + * @return a thread-safe iterator over the resulting values after the upsert operation + */ public Iterator upsertSync(String target, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); return new SynchronizedValueIterator(upsertTargetValueSync(getPtr(), target, upType.code, valueMut.getPtr())); } + /** + * Performs an upsert (update or insert) operation on the specified tables. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the record to upsert + * @param targets an array of target identifiers to perform the upsert operation on + * @param upType the type of upsert operation to perform + * @param content the content to be upserted + * @return a thread-safe Iterator of the resulting values from the upsert operation + */ public Iterator upsertSync(String[] targets, UpType upType, T content) { final ValueMut valueMut = ValueBuilder.convert(content); return new SynchronizedValueIterator(upsertTargetsValueSync(getPtr(), targets, upType.code, valueMut.getPtr())); } + /** + * Inserts or updates a record and returns an iterator over the result. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the record to upsert + * @param type the class representing the type of the record + * @param target the target location for the upsert operation + * @param upType the type of the upsert operation + * @param content the content of the record to be upserted + * @return a thread-safe iterator over the upserted record + */ public Iterator upsertSync(Class type, String target, UpType upType, T content) { return new ValueObjectIterator<>(type, upsertSync(target, upType, content)); } + /** + * Performs an upsert operation with the specified content on the given tables. + *

+ * For more details, check the SurrealQL documentation. + * + * @param The type of the content being upserted and returned iterator's elements. + * @param type The class type of the content. + * @param targets The array of table identifiers on which to perform the upsert operation. + * @param upType The type of upsert operation to be performed. + * @param content The content to be upserted. + * @return A thread-safe iterator over the upserted content of the specified type. + */ public Iterator upsertSync(Class type, String[] targets, UpType upType, T content) { return new ValueObjectIterator<>(type, upsertSync(targets, upType, content)); } @@ -322,6 +785,14 @@ private final long[] contents2longs(T... contents) { return ptrs; } + /** + * Selects a record by its RecordId and retrieves the corresponding Value. + *

+ * For more details, check the SurrealQL documentation. + * + * @param recordId the unique identifier of the record to be selected + * @return an Optional containing the Value if the record is found, or an empty Optional if not found + */ public Optional select(RecordId recordId) { final long valuePtr = selectThing(getPtr(), recordId.getPtr()); if (valuePtr == 0) { @@ -330,10 +801,29 @@ public Optional select(RecordId recordId) { return Optional.of(new Value(valuePtr)); } + /** + * Selects an instance of the specified type from a record identified by the given RecordId. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of the instance to be selected + * @param type the class type of the instance to be selected + * @param recordId the unique identifier of the record from which to select the instance + * @return an Optional containing the selected instance of the specified type if present, + * otherwise an empty Optional + */ public Optional select(Class type, RecordId recordId) { return select(recordId).map(v -> v.get(type)); } + /** + * Selects values based on the provided RecordIds. + *

+ * For more details, check the SurrealQL documentation. + * + * @param things an array of RecordId objects to be used in the selection. + * @return a list of Value objects corresponding to the selected RecordIds. + */ public List select(RecordId... things) { final long[] thingsPtr = things2longs(things); final long[] valuePtrs = selectThings(getPtr(), thingsPtr); @@ -351,41 +841,115 @@ private long[] things2longs(RecordId... things) { return ptrs; } + /** + * Selects and retrieves a list of objects of the specified type based on the given record IDs. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of objects to be retrieved + * @param type the Class object of the type to be retrieved + * @param things an array of RecordId instances identifying the records to be selected + * @return a list of objects of the specified type corresponding to the given record IDs + */ public List select(Class type, RecordId... things) { try (final Stream s = select(things).stream()) { return s.map(v -> v.get(type)).collect(Collectors.toList()); } } + /** + * Selects and returns an iterator over the values corresponding to the given targets. + *

+ * For more details, check the SurrealQL documentation. + * + * @param targets A string representing the targets to be selected. + * @return An iterator over the values corresponding to the specified targets. + */ public Iterator select(String targets) { return new ValueIterator(selectTargetsValues(getPtr(), targets)); } + /** + * Selects and returns a thread-safe iterator to traverse values associated with the given targets. + *

+ * For more details, check the SurrealQL documentation. + * + * @param targets The specified targets for which values need to be selected. + * @return A thread-safe iterator to traverse the values associated with the specified targets. + */ public Iterator selectSync(String targets) { return new SynchronizedValueIterator(selectTargetsValuesSync(getPtr(), targets)); } + /** + * Selects and retrieves an iterator of specified type for given targets. + *

+ * For more details, check the SurrealQL documentation. + *

+ * + * @param The type of objects to be selected. + * @param type The class type of the objects to be selected. + * @param targets A string specifying the targets to select from. + * @return An iterator of the specified type for the selected targets. + */ public Iterator select(Class type, String targets) { return new ValueObjectIterator<>(type, select(targets)); } + /** + * Selects and returns a thread-safe iterator over a collection of objects of the specified type + * from the given targets. + *

+ * For more details, check the SurrealQL documentation. + * + * @param the type of objects to be iterated over + * @param type the class of the type of objects to be selected + * @param targets the targets from which to select objects + * @return a thread-safe iterator over a collection of objects of the specified type + */ public Iterator selectSync(Class type, String targets) { return new ValueObjectIterator<>(type, selectSync(targets)); } + /** + * Deletes a record identified by the provided RecordId. + *

+ * For more details, check the SurrealQL documentation. + * + * @param recordId the identifier of the record to be deleted + */ public void delete(RecordId recordId) { deleteThing(getPtr(), recordId.getPtr()); } + /** + * Deletes the specified records. + *

+ * For more details, check the SurrealQL documentation. + * + * @param things An array of RecordId objects representing the records to be deleted. + */ public void delete(RecordId... things) { final long[] thingsPtr = things2longs(things); deleteThings(getPtr(), thingsPtr); } + /** + * Deletes the specified target. + *

+ * For more details, check the SurrealQL documentation. + * + * @param target the name of the target to be deleted + */ public void delete(String target) { deleteTarget(getPtr(), target); } + /** + * Closes and releases any resources associated with this instance. + * This method is typically called when the instance is no longer needed. + * The underlying resources are safely cleaned up. + */ @Override public void close() { deleteInstance(); diff --git a/src/main/java/com/surrealdb/SurrealException.java b/src/main/java/com/surrealdb/SurrealException.java index f8aaeee9..774f3c16 100644 --- a/src/main/java/com/surrealdb/SurrealException.java +++ b/src/main/java/com/surrealdb/SurrealException.java @@ -1,5 +1,8 @@ package com.surrealdb; +/** + * The SurrealException class is a custom RuntimeException used to signal exceptional conditions. + */ public class SurrealException extends RuntimeException { SurrealException(String message) { @@ -10,4 +13,4 @@ public class SurrealException extends RuntimeException { super(message, cause); } -} \ No newline at end of file +} diff --git a/src/main/java/com/surrealdb/UpType.java b/src/main/java/com/surrealdb/UpType.java index bc5b913a..7ede2464 100644 --- a/src/main/java/com/surrealdb/UpType.java +++ b/src/main/java/com/surrealdb/UpType.java @@ -1,8 +1,35 @@ package com.surrealdb; +/** + * Enumeration to represent the type of update operations. + *

+ * The UpType enum provides constants to specify the kind of update operation that should be performed. + */ public enum UpType { + + /** + * Represents a content update operation. + * This type of operation replaces the entire existing data with the provided data. + *

+ * For more details, check the SurrealQL documentation. + *

+ */ CONTENT(1), + /** + * Represents a merge update operation. + * This type of operation merges the existing data with the provided data. + *

+ * For more details, check the SurrealQL documentation. + *

+ */ MERGE(2), + /** + * Represents a patch update operation. + * This type of operation applies partial changes to the existing data. + *

+ * For more details, check the SurrealQL documentation. + *

+ */ PATCH(3); final int code; @@ -10,5 +37,5 @@ public enum UpType { UpType(int code) { this.code = code; } - + } diff --git a/src/main/java/com/surrealdb/Value.java b/src/main/java/com/surrealdb/Value.java index e066d011..bd0128dd 100644 --- a/src/main/java/com/surrealdb/Value.java +++ b/src/main/java/com/surrealdb/Value.java @@ -7,6 +7,12 @@ import java.time.ZonedDateTime; import java.util.UUID; +/** + * The Value class represents a general-purpose wrapper for different types of values. + * It provides various methods to + * interact with and retrieve values such as arrays, objects, strings, + * numbers, and more. + */ public class Value extends Native { Value(long ptr) { diff --git a/src/main/java/com/surrealdb/ValueIterator.java b/src/main/java/com/surrealdb/ValueIterator.java index a5413f22..2dd14bc9 100644 --- a/src/main/java/com/surrealdb/ValueIterator.java +++ b/src/main/java/com/surrealdb/ValueIterator.java @@ -3,6 +3,18 @@ import java.util.Iterator; import java.util.Objects; +/** + * The ValueIterator class provides an iterator for the Value type, allowing iteration + * over a collection of Value objects, typically used within the context of array + * structures that extend the functionality provided by the library. + *

+ * This class implements the Iterator interface for the + * Value type, enabling standard iteration mechanisms such as hasNext and next methods. + *

+ * Methods: + * - hasNext(): Checks if there are more elements in the collection to iterate over. + * - next(): Returns the next Value in the iteration. + */ public class ValueIterator extends Native implements Iterator { ValueIterator(long ptr) { diff --git a/src/main/java/com/surrealdb/signin/Database.java b/src/main/java/com/surrealdb/signin/Database.java index cb7a4736..f53d6ace 100644 --- a/src/main/java/com/surrealdb/signin/Database.java +++ b/src/main/java/com/surrealdb/signin/Database.java @@ -1,5 +1,11 @@ package com.surrealdb.signin; +/** + * The Database class represents a specific level of credentials for signing into a SurrealDB database. + * This class extends the Namespace class and adds a specific database reference, further scoping the sign-in process. + *

+ * The credentials include username, password, namespace, and a specific database. + */ public class Database extends Namespace implements Signin { private final String database; diff --git a/src/main/java/com/surrealdb/signin/Namespace.java b/src/main/java/com/surrealdb/signin/Namespace.java index 7f84cd0e..ef567b09 100644 --- a/src/main/java/com/surrealdb/signin/Namespace.java +++ b/src/main/java/com/surrealdb/signin/Namespace.java @@ -1,5 +1,11 @@ package com.surrealdb.signin; +/** + * The Namespace class represents a specific level of credentials for signing into a SurrealDB namespace. + * This class extends the Root class and adds a namespace reference, further scoping the sign-in process. + *

+ * The credentials include username, password, and a namespace. + */ public class Namespace extends Root implements Signin { private final String namespace; diff --git a/src/main/java/com/surrealdb/signin/Root.java b/src/main/java/com/surrealdb/signin/Root.java index 46a497be..404dc0c9 100644 --- a/src/main/java/com/surrealdb/signin/Root.java +++ b/src/main/java/com/surrealdb/signin/Root.java @@ -1,5 +1,9 @@ package com.surrealdb.signin; +/** + * The Root class represents a level of credentials used for signing into the SurrealDB database. + * This class implements the Signin interface, providing the basic username and password authentication. + */ public class Root implements Signin { private final String username; diff --git a/src/main/java/com/surrealdb/signin/Signin.java b/src/main/java/com/surrealdb/signin/Signin.java index 383c9784..355b449d 100644 --- a/src/main/java/com/surrealdb/signin/Signin.java +++ b/src/main/java/com/surrealdb/signin/Signin.java @@ -1,4 +1,11 @@ package com.surrealdb.signin; +/** + * The Signin interface is a marker interface used for classes that encapsulate + * credentials used for logging into the Surreal system. + *

+ * The concrete implementations of this interface (i.e., Root, Namespace, and Database) + * determine the scope and type of the credentials being used for the sign-in process. + */ public interface Signin { } diff --git a/src/main/java/com/surrealdb/signin/Token.java b/src/main/java/com/surrealdb/signin/Token.java index 1334cd9a..698e7c41 100644 --- a/src/main/java/com/surrealdb/signin/Token.java +++ b/src/main/java/com/surrealdb/signin/Token.java @@ -1,5 +1,9 @@ package com.surrealdb.signin; +/** + * Represents a session token. + * This class is used to encapsulate a token string which can be used for authentication purposes. + */ public class Token { private final String token;