From 363ba15be43bfb30635336b3c8b315693cca463d Mon Sep 17 00:00:00 2001 From: "Mahlon E. Smith" Date: Tue, 4 Nov 2025 18:18:03 -0800 Subject: [PATCH] Fix file extensions in USAGE, update IMDB experiment/example. --- USAGE.md | 8 ++++---- experiments/imdb/imdb_find_actor_path.nim | 10 +++++----- experiments/imdb/imdb_import.nim | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/USAGE.md b/USAGE.md index d4dffe5..46014b9 100644 --- a/USAGE.md +++ b/USAGE.md @@ -82,13 +82,13 @@ var db = newLbugDatabase() ``` ```nim -# "db" is persistent, stored in the file "data.kz". -var db = newLbugDatabase("data.kz") +# "db" is persistent, stored in the file "data.db". +var db = newLbugDatabase("data.db") ``` The database path is retained, and can be recalled via `db.path`. ```nim -db.path #=> "data.kz" +db.path #=> "data.db" ``` ### Database Configuration @@ -110,7 +110,7 @@ object as the second argument to `newLbugDatabase()`: ```nim # Open a readonly handle. -var db = newLbugDatabase( "data.kz", lbugConfig( read_only=true ) ) +var db = newLbugDatabase( "data.db", lbugConfig( read_only=true ) ) ``` ### The Connection diff --git a/experiments/imdb/imdb_find_actor_path.nim b/experiments/imdb/imdb_find_actor_path.nim index da1c13f..9ea8ea1 100644 --- a/experiments/imdb/imdb_find_actor_path.nim +++ b/experiments/imdb/imdb_find_actor_path.nim @@ -17,9 +17,9 @@ import std/os, std/sequtils, std/strformat -import kuzu +import lbug -const DB = "imdb.kz" +const DB = "imdb.db" const DOT = "imdb-results.dot" if not DB.fileExists: @@ -31,13 +31,13 @@ if paramCount() < 2: echo "I require 2 actor names, in quotes." quit 1 -var stmt: KuzuPreparedStatement -var res: KuzuQueryResult +var stmt: LbugPreparedStatement +var res: LbugQueryResult var fromActor = paramStr(1) var toActor = paramStr(2) -var db = newKuzuDatabase( DB, kuzuConfig(read_only=true) ) +var db = newLbugDatabase( DB, lbugConfig(read_only=true) ) var conn = db.connect echo "Database opened: ", db.path diff --git a/experiments/imdb/imdb_import.nim b/experiments/imdb/imdb_import.nim index 77ccb51..533d68d 100644 --- a/experiments/imdb/imdb_import.nim +++ b/experiments/imdb/imdb_import.nim @@ -1,7 +1,7 @@ # vim: set et sta sw=4 ts=4 : # # Fetches movie and actor data from IMDB and converts it -# to CSV, then imports into a Kuzu graph database. +# to CSV, then imports into a Ladybug graph database. # # Only cares about actors in movies! Things like writers, # directors, and TV shows are intentionally omitted. @@ -18,9 +18,9 @@ import std/strformat, std/strutils, zip/gzipfiles, - kuzu + lbug -const DB = "imdb.kz" +const DB = "imdb.db" const SOURCE = "https://datasets.imdbws.com" const FILES = @[ "name.basics", "title.basics", "title.principals" ] @@ -126,11 +126,11 @@ known_file.close() # -# Ok, now import into a fresh kuzu database. +# Ok, now import into a fresh ladybug database. # if not DB.dirExists: - var db = newKuzuDatabase( DB ) + var db = newLbugDatabase( DB ) var conn = db.connect() var duration = 0