taerae_core 0.1.0
taerae_core: ^0.1.0 copied to clipboard
Local-first embedded graph database core for Dart with WAL+snapshot durability and GraphRAG extension points.
example/taerae_core_example.dart
import 'package:taerae_core/taerae_core.dart';
void main() {
final TaeraeGraph graph = TaeraeGraph()
..upsertNode(
'alice',
labels: const <String>['Person'],
properties: const <String, Object?>{'name': 'Alice'},
)
..upsertNode(
'bob',
labels: const <String>['Person'],
properties: const <String, Object?>{'name': 'Bob'},
)
..upsertNode('seoul', labels: const <String>['City'])
..upsertEdge('e1', 'alice', 'bob', type: 'KNOWS')
..upsertEdge('e2', 'alice', 'seoul', type: 'LIVES_IN');
final List<String>? path = graph.shortestPathBfs('alice', 'seoul');
print('Path alice -> seoul: $path');
}