3rd-party surrealdb.com client for Dart

Overview

Experimental Dart support for SurrealDB. This package is a port of surreal.js.

Features

  • connect(url) - Connects to a local or remote database endpoint
  • wait() - Waits for the connection to the database to succeed
  • close() - Closes the persistent connection to the database
  • use(ns, db) - Switch to a specific namespace and database
  • signup(vars) - Signs this connection up to a specific authentication scope
  • signin(vars) - Signs this connection in to a specific authentication scope
  • invalidate() - Invalidates the authentication for the current connection
  • authenticate(token) - Authenticates the current connection with a JWT token
  • let(key, val) - Assigns a value as a parameter for this connection
  • query(sql, vars) - Runs a set of SurrealQL statements against the database
  • select(thing) - Selects all records in a table, or a specific record
  • create(thing, data) - Creates a record in the database
  • update(thing, data) - Updates all records in a table, or a specific record
  • change(thing, data) - Modifies all records in a table, or a specific record
  • modify(thing, data) - Applies JSON Patch changes to all records in a table, or a specific record
  • delete(thing) - Deletes all records, or a specific record

Getting started

For installation instructions and SurrealQL introduction visit SurrealDB docs.

Usage

  // Tell the client where to find your Surreal instance on the network.
  final client = SurrealClient(url: '...');
  
  // Sign in and specify which namespace and database client should be referring to.
  await client.signIn({'user': 'root', 'pass': 'root'});
  await client.use('test', 'test');

  // Create and read an article.
  await client.create('article', {'title': 'SurrealDB for Dart'});
  print(await client.select('article'));
  
  // Close the connection.
  client.close();

Additional information

This is a 3rd-party integration which happens to also be an experimental one. Keep that in mind when considering this package as a foundation of your project.

Contributions are welcome.

Planned improvements:

  • Add web support
  • Add types to outputs
  • Provide streams for client events
You might also like...

Socketio dart server and client - Full Socket.io implementation using Dart Lang

Socketio dart server and client - Full Socket.io implementation using Dart Lang

Getting Started Step 1: Run dart_server.dart Step 2: Android Emulator has proble

Jan 23, 2022

Dart client library to interact with Supabase Storage

storage-dart Dart client library to interact with Supabase Storage. Contributing Fork the repo on GitHub Clone the project to your own machine Commit

Aug 21, 2022

Pure Dart Client for Nakama Server 🌟🥰🤩

Nakama Flutter Client 🤩 🎮 🌍 🛰 Nakama is an open-source scalable game server. This is a Flutter client for Nakama written in pure dart and supports

Sep 25, 2022

A streaming client for the Komga self-hosted comics/manga/BD server targeting Android/iOS written in Dart/Flutter

A streaming client for the Komga self-hosted comics/manga/BD server targeting Android/iOS written in Dart/Flutter

Klutter A streaming client for the Komga self-hosted comics/manga/BD server targeting Android/iOS written in Dart/Flutter Background This is a project

Sep 17, 2022

Dart client for Typesense

Typesense Dart client library for accessing the HTTP API of Typesense search engine. Note: This package is still under development. Version 0.2.0 will

Sep 21, 2022

A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

dio_http A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading, Timeout

Dec 19, 2021

Dart API Client which wraps the QvaPay API

qvapay_api_client Dart API Client which wraps the QvaPay API The client needs Dio to perform the requests, you must inject an instance in the construc

Feb 9, 2022

a project-m36 websocket client written by flutter/dart

project_m36_websocket_client A Flutter web websocket client for Project-M36. It's also an attempt to bring algebraic datatypes into the Dart land. Pro

Jan 8, 2022

A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

Language: English | 中文简体 dio A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File

Sep 21, 2022
Owner
Marcin Wróblewski
Marcin Wróblewski
[email protected] - A third party Weibo client for Android with Material You theming (iOS version later). 💪 Powered by Flutter 💪

[email protected] - A third party Weibo client for Android with Material You theming (iOS version later). ?? Powered by Flutter ??

妇校长 6 Sep 19, 2022
We created Flappy Bird, a straightforward game based on flutter animation, from scratch using only Dart & Flutter and no third-party games or animation components.

Flappy-Bird Description A ridiculous game created by Flutter, all you have to do is touch the screen to make the bird leap as long as you avoid the ba

hab 7 Sep 26, 2022
Multi-language support in Flutter without using any third-party library

flutter_localization_app A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get

Gulshan Yadav 1 Oct 30, 2021
A Flutter App That Find Party Event

EventZ ?? ?? Description: Discover events & upcoming events in your city and near you. Get personalized event recommendations! Find events your friend

李瑞孟 4 Jun 30, 2022
A third party Android application for the Pi-Hole® dashboard.

FlutterHole FlutterHole is a free third party Android application for interacting with your Pi-Hole® server. Features Quick enable/disable: Toggle you

Thomas 371 Sep 21, 2022
A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package. Built after react apollo

Flutter GraphQL Table of Contents Flutter GraphQL Table of Contents About this project Installation Usage GraphQL Provider [Graphql Link and Headers]

Snowball Digital 43 Jul 22, 2021
A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.

GraphQL Flutter ?? Bulletin See the v3 -> v4 Migration Guide if you're still on v3. Maintenance status: Low. Follow #762 for updates on the planned ar

Zino & Co. 3k Sep 29, 2022
Vrchat mobile client - VRChat Unofficial Mobile Client For Flutter

VRChatMC VRChatの非公式なAPIを利用したVRChatのモバイルクライアント Flutterで作成されたシンプルなUIが特徴的です iosビルドは

ふぁ 8 Sep 4, 2022
Mysql.dart - MySQL client for Dart written in Dart

Native MySQL client written in Dart for Dart See example directory for examples

null 41 Sep 22, 2022
A Dart client for the NATS messaging system. Design to use with Dart and Flutter.

Dart-NATS A Dart client for the NATS messaging system. Design to use with Dart and flutter. Flutter Web Support by WebSocket client.connect(Uri.parse(

Chart Chongcharoen 26 Aug 26, 2022