Changeset

13145:af251471d5ae

util.sqlite3: Fix indentation
author Kim Alvefur <zash@zash.se>
date Sat, 10 Jun 2023 22:00:43 +0200
parents 13144:033ea8b46d6a
children 13146:771eb453e03a
files util/sqlite3.lua
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/util/sqlite3.lua	Sat Jun 10 16:39:48 2023 +0200
+++ b/util/sqlite3.lua	Sat Jun 10 22:00:43 2023 +0200
@@ -202,10 +202,10 @@
 };
 
 local function iterator(table)
-	local i=0;
+	local i = 0;
 	return function()
-		i=i+1;
-		local item=table[i];
+		i = i + 1;
+		local item = table[i];
 		if item ~= nil then
 			return item;
 		end
@@ -268,6 +268,7 @@
 	end
 	return setmetatable({ __affected = affected, __rowcount = rowcount }, result_mt);
 end
+
 engine.insert = engine.execute_update;
 engine.select = engine.execute_query;
 engine.delete = engine.execute_update;
@@ -371,10 +372,11 @@
 	end
 	return success;
 end
+
 function engine:set_encoding() -- to UTF-8
 	return self:transaction(function()
-			for encoding in self:select"PRAGMA encoding;" do
-				if encoding[1] == "UTF-8" then
+		for encoding in self:select "PRAGMA encoding;" do
+			if encoding[1] == "UTF-8" then
 				self.charset = "utf8";
 			end
 		end