This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit afe1a20f27912ad4fc95ada433b69c27c2cb13ef
Author: Massimo Manghi <[email protected]>
AuthorDate: Thu Nov 20 17:41:45 2025 +0100

    the Sqlite3 formatter class must be named Sqlite3 likewise
---
 rivet/packages/dio/formatters.tcl | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/rivet/packages/dio/formatters.tcl 
b/rivet/packages/dio/formatters.tcl
index 871b328..cc69ea2 100644
--- a/rivet/packages/dio/formatters.tcl
+++ b/rivet/packages/dio/formatters.tcl
@@ -62,6 +62,7 @@ namespace eval ::DIO::formatters {
                 if {[catch {
                     set field_value [$this $field_type $field_name $val 
$convert_to]
                 } e einfo]} {
+                    puts "<pre>Error: $e, $einfo</pre>"
                     set field_value "'[quote $val]'"
                 }
 
@@ -138,7 +139,7 @@ namespace eval ::DIO::formatters {
 
     }
 
-    ::itcl::class Sqlite {
+    ::itcl::class Sqlite3 {
         inherit RootFormatter
 
         #
@@ -162,7 +163,6 @@ namespace eval ::DIO::formatters {
         }
 
         public method NOW {field_name val convert_to} {
-            switch $convert_to {
 
             # we try to be coherent with the original purpose of this method 
whose
             # goal is to provide a uniform way to handle timestamps. 
@@ -171,6 +171,7 @@ namespace eval ::DIO::formatters {
             # can be done and session expirations are computed consistently.
             # (Bug #53703)
 
+            switch $convert_to {
                 SECS {
                     if {[::string compare $val "now"] == 0} {
 #                       set secs    [clock seconds]
@@ -205,26 +206,26 @@ namespace eval ::DIO::formatters {
             set my_val [clock format $secs -format {%Y-%m-%d}]
             return "'$my_val'"
         }
+
         public method DATETIME {field_name val convert_to} {
             set secs [clock scan $val]
             set my_val [clock format $secs -format {%Y-%m-%d %T}]
             return "'$my_val'"
         }
+
         public method NOW {field_name val convert_to} {
-            switch $convert_to {
 
-                # we try to be coherent with the original purpose of this 
method whose
-                # goal is to provide a uniform way to handle timestamps. 
-                # E.g.: Package session expects this case to return a 
timestamp in seconds
-                # so that differences with timestamps returned by [clock 
seconds]
-                # can be done and session expirations are computed 
consistently.
-                # (Bug #53703)
+            # we try to be coherent with the original purpose of this method 
whose
+            # goal is to provide a uniform way to handle timestamps. 
+            # E.g.: Package session expects this case to return a timestamp in 
seconds
+            # so that differences with timestamps returned by [clock seconds]
+            # can be done and session expirations are computed consistently.
+            # (Bug #53703)
+
+            switch $convert_to {
 
                 SECS {
                     if {[::string compare $val "now"] == 0} {
-#                       set secs    [clock seconds]
-#                       set my_val  [clock format $secs -format {%Y%m%d%H%M%S}]
-#                       return  $my_val
                         return [clock seconds]
                     } else {
                         return  "extract(epoch from $field_name)"
@@ -287,4 +288,4 @@ namespace eval ::DIO::formatters {
 
 }; ## namespace eval DIO
 
-package provide dio::formatters 1.0
+package provide dio::formatters 1.1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to