diff src/lib/Db.luan @ 15:0edde02b908c

edit in place
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 05 Jul 2022 23:27:54 -0600
parents de0cbf515ef5
children 7ce54f6d93f2
line wrap: on
line diff
--- a/src/lib/Db.luan	Mon Jul 04 17:04:14 2022 -0600
+++ b/src/lib/Db.luan	Tue Jul 05 23:27:54 2022 -0600
@@ -1,8 +1,11 @@
 local Luan = require "luan:Luan.luan"
 local error = Luan.error
+local new_error = Luan.new_error or error()
 local Lucene = require "luan:lucene/Lucene.luan"
 local Io = require "luan:Io.luan"
 local uri = Io.uri or error()
+local Logging = require "luan:logging/Logging.luan"
+local logger = Logging.logger "Db"
 
 
 local dir = uri("site:/private/local/lucene")
@@ -16,4 +19,8 @@
 Db.indexed_fields.post_is_root = Lucene.type.string
 Db.indexed_fields.post_root_id = Lucene.type.long
 
+function Db.not_in_transaction()
+	logger.error(new_error("not in transaction"))
+end
+
 return Db