hrana 0.4.0 copy "hrana: ^0.4.0" to clipboard
hrana: ^0.4.0 copied to clipboard

Dart client for hrana, a protocol for accessing libsql database servers.

example/hrana_example.dart

import 'package:hrana/hrana.dart';

void main() async {
  // To run this example, try
  // docker run -p 8080:8080 -ti -e SQLD_NODE=primary ghcr.io/tursodatabase/libsql-server:latest
  final database = await Database.connect(
    Uri.parse('ws://localhost:8080/'),
    jwtToken: null,
  );
  print('connected!');

  print(await database
      .withSession((session) async => await session.select('SELECT 1;')));

  await database.close();
}
2
likes
160
pub points
28%
popularity

Publisher

verified publishersimonbinder.eu

Dart client for hrana, a protocol for accessing libsql database servers.

Repository (GitHub)
View/report issues

Topics

#database #turso #libsql #sqld #hrana

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

clock, fixnum, http, meta, pool, protobuf, sqlite3, stream_channel, web_socket_channel

More

Packages that depend on hrana