surrealdb_wasm

Flutter SurrealDB WebAssembly (WASM) package

https://github.com/rag-wtf/surrealdb_wasm

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

flutter package surrealdb surrealdb-driver wasm
Last synced: 6 months ago · JSON representation ·

Repository

Flutter SurrealDB WebAssembly (WASM) package

Basic Info
Statistics
  • Stars: 7
  • Watchers: 2
  • Forks: 0
  • Open Issues: 5
  • Releases: 14
Topics
flutter package surrealdb surrealdb-driver wasm
Created over 2 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

surrealdb_wasm

pub package browser tests style: very good analysis License: MIT

The Flutter SurrealDB WebAssembly (WASM) package is a powerful integration for Flutter, built upon the foundation of surrealdb.wasm, the WebAssembly engine for the SurrealDB JavaScript SDK. Consequently, the surrealdb_js package will provide an unified API for the WebAssembly engine.

🔍 Demo

Try out surreal_wasm applications in your browser:

💻 Installation

❗ In order to start using surrealdb_wasm you must have the Flutter SDK installed on your machine.

Install via flutter pub add:

sh flutter pub add surrealdb_wasm

Alternatively, add surrealdb_wasm to your pubspec.yaml:

yaml dependencies: surrealdb_wasm:

Install it:

sh flutter pub get

Lastly, add the following code before the </head> tag in the web/index.html file: ```html ```

✨ Features

Please refer to the surrealdb_js package for a comprehensive list of features.

🏃 Examples

Basic

```dart import 'package:surrealdbjs/surrealdbjs.dart'; import 'package:surrealdbwasm/surrealdbwasm.dart';

final db = SurrealWasm.getInstance();

await db.connect('indxdb://surreal'); await db.use(namespace: 'test', database: 'test');

final created = db.create('person', { 'title': 'CTO', 'name': { 'first': 'Tom', 'last': 'Jerry', }, 'marketing': true, }, );

final id = created['id'].toString(); final merged = await db.merge( id, { 'marketing': false, }, );

final tom = await db.select(id);

final deleted = await db.delete(id); ```

For more code examples, kindly refer to the integration test and the example project.

Transaction Support

dart final result = await db.transaction((txn) async { txn.query('DEFINE TABLE test SCHEMAFULL;'); txn.query(r'DEFINE FIELD id ON test VALUE <record>($value) ASSERT $value != NONE;'); txn.query('DEFINE FIELD name ON test TYPE string;'); txn.query( r'CREATE test SET name = $name;', bindings: {'name': 'John'}, ); if (somethingWrong) { txn.cancel(); } });

For more code examples, kindly refer to the integration test of transaction.

🧑‍💼 Contributing

Contributions are welcome! Please check out the unimplemented features or issues on the repository, and feel free to open a pull request. For more information, please see the contribution guide.

📔 License

This project is licensed under the terms of the MIT license.

🗒️ Citation

If you utilize this package, please consider citing it with:

@misc{surrealdb_wasm, author = {Lim Chee Kin}, title = {surrealdb_wasm: Flutter SurrealDB WebAssembly(WASM) package}, year = {2023}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/limcheekin/surrealdb_wasm}}, }

Owner

  • Name: rag.wtf
  • Login: rag-wtf
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: "Lim"
    given-names: "Chee Kin"
title: "surrealdb_wasm"
date-released: 2023-10-22
url: "https://github.com/limcheekin/surrealdb_wasm"

GitHub Events

Total
  • Pull request event: 1
  • Create event: 1
Last Year
  • Pull request event: 1
  • Create event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 5
Past Year
  • Issues: 0
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 5
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (5)
Top Labels
Issue Labels
Pull Request Labels
dependencies (5) github_actions (4) dart (1)

Dependencies

.github/workflows/browser-tests.yaml actions
  • actions/checkout v4 composite
  • subosito/flutter-action v2 composite
.github/workflows/build-wasm-js.yaml actions
  • actions/checkout v4 composite
  • actions/setup-node v4 composite
.github/workflows/deploy.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.3 composite
  • actions/checkout v4 composite
  • subosito/flutter-action v2 composite
.github/workflows/main.yaml actions
example/android/app/build.gradle maven
example/android/build.gradle maven
package-lock.json npm
  • @jridgewell/gen-mapping 0.3.3 development
  • @jridgewell/resolve-uri 3.1.1 development
  • @jridgewell/set-array 1.1.2 development
  • @jridgewell/source-map 0.3.5 development
  • @jridgewell/sourcemap-codec 1.4.15 development
  • @jridgewell/trace-mapping 0.3.19 development
  • acorn 8.10.0 development
  • buffer-from 1.1.2 development
  • commander 2.20.3 development
  • concat 1.0.3 development
  • source-map 0.6.1 development
  • source-map-support 0.5.21 development
  • terser 5.21.0 development
  • wasm-flate 0.1.12-alpha
package.json npm
  • concat ^1.0.3 development
  • terser ^5.24.0 development
  • wasm-flate ^0.1.12-alpha development
example/pubspec.yaml pub
  • flutter_lints ^2.0.0 development
  • flutter_test --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess sdk: flutter development
  • flutter --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess sdk: flutter
  • flutter_console_widget ^0.0.3
  • surrealdb_wasm --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess path: "../"
pubspec.yaml pub
  • flutter_test --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess sdk: flutter development
  • integration_test --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess sdk: flutter development
  • mocktail ^1.0.0 development
  • very_good_analysis ^5.1.0 development
  • flutter --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess sdk: flutter
  • js ^0.6.7
.github/workflows/publish.yaml actions
  • actions/checkout v4 composite
  • ncipollo/release-action v1 composite
  • subosito/flutter-action v2 composite