From 189dd90fcb902881f4c3ce7f0cd4dfb92dc532ba Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Sep 2026 16:31:38 +0300 Subject: [PATCH] 086 MemoryDbHepler 0.03 precision fix --- Application.cfc | 2 +- MemoryDbHelper.cfc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Application.cfc b/Application.cfc index fb8074d..dac1cde 100644 --- a/Application.cfc +++ b/Application.cfc @@ -87,7 +87,7 @@ - + diff --git a/MemoryDbHelper.cfc b/MemoryDbHelper.cfc index 3c95c3a..e5a9676 100644 --- a/MemoryDbHelper.cfc +++ b/MemoryDbHelper.cfc @@ -1,4 +1,5 @@ component { + /*0.03 precision fix*/ /*0.02 timestamp support*/ /** * HSQL 1.8 @@ -33,6 +34,7 @@ component { CREATE TEMPORARY TABLE #arguments.name#(#arrayToList(colDefs, ', ')#) ON COMMIT PRESERVE ROWS"; queryExecute(createSql, {}, { datasource: arguments.dsn }); //} + //writedump(meta); writedump(createSql);abort; // 2. Цикл вставки var insertSql = "INSERT INTO #arguments.name# (#cols#) VALUES (#repeatString("?,", listLen(cols)-1)#?)"; @@ -65,10 +67,11 @@ component { private string function mapType(required string luceeType) { switch (arguments.luceeType) { case "VARCHAR": case "CHAR": case "LONGVARCHAR": return "LONGVARCHAR"; - case "INTEGER": case "BIGINT": case "SMALLINT": case "TINYINT": return "INT"; + case "INTEGER": case "SMALLINT": case "TINYINT": return "INT"; + case "BIGINT": return "BIGINT"; case "DOUBLE": case "FLOAT": case "REAL": return "DOUBLE"; case "BOOLEAN": case "BIT": return "BIT"; - case "DECIMAL": case "NUMERIC": return "DECIMAL(20,6)"; + case "DECIMAL": case "NUMERIC": return "DECIMAL"; case "TIMESTAMP": case "DATE": case "TIME": return "TIMESTAMP"; default: return "LONGVARCHAR"; // И тут тоже }