[Nitro] Patch for Og 0.17.0

Ghislain Mary nospam at lunacymaze.org
Fri Jun 3 15:40:54 EDT 2005


George Moschovitis a écrit :
> Since you are working with the sqlite store, here is another problem. In 
> lib/og/store/sqlite.rb, try to uncomment this line:
> 
> 	def close
> # FIXME: problems when closing due to unfinalised statements.
> #		@conn.close
> 		super
> 	end
> 
> And run the tests, any idea how to fix this?

Here's a patch to fix this one. This is due to an unfinalized statement.


diff -ru og-0.18.1/lib/og/store/sql.rb 
og-0.18.1-modified/lib/og/store/sql.rb
--- og-0.18.1/lib/og/store/sql.rb       Tue May 24 14:00:29 2005
+++ og-0.18.1-modified/lib/og/store/sql.rb      Fri Jun  3 21:36:25 2005
@@ -575,7 +575,10 @@
         # Deserialize one object from the ResultSet.

         def read_one(res, klass, join_relations = nil)
-               return nil if res.blank?
+               if res.blank?
+                  res.close
+                  return nil
+                end

                 if join_relations
                         join_relations = 
[join_relations].flatten.collect do |n|

diff -ru og-0.18.1/lib/og/store/sqlite.rb 
og-0.18.1-modified/lib/og/store/sqlite.rb
--- og-0.18.1/lib/og/store/sqlite.rb    Fri May 20 13:52:50 2005
+++ og-0.18.1-modified/lib/og/store/sqlite.rb   Fri Jun  3 21:38:16 2005
@@ -57,8 +58,7 @@
         end

         def close
-# FIXME: problems when closing due to unfinalised statements.
-#              @conn.close
+               @conn.close
                 super
         end


Ghislain



More information about the Nitro-general mailing list