for each db.execute row, i get a spurious respense like :
sql = SELECT DISTINCT * FROM moz_bookmarks WHERE title LIKE ‘%\U%’;
block_given? = true
bind_vars.empty? = true
db = #SQLite3::Database:0x4e5b9c, db.type_translation() = false, stmt
= #SQLite3::Statement:0x4db1c4
check( 101 ) -> message:
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/results
et.rb:69:in `commence’
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/results
et.rb:62:in `initialize’
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/stateme
nt.rb:164:in `new’
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/stateme
nt.rb:164:in `execute’
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/databas
e.rb:238:in `execute2’
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/databas
e.rb:189:in `prepare’
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/databas
e.rb:237:in `execute2’
/Users/yt/work/Ruby/SQL/MySQL/bookmarks_from_sqlite/moz_bookmarks_update
_backslash_U.rb:16@eof = true, found = false, (@eof || found) = true
even if there is no error.
how to avoid that ?
Une Bévue [email protected] wrote:
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/results
even if there is no error.
how to avoid that ?
sorry i forgot to mention the root subject ))
On Sat, Jul 05, 2008 at 06:31:40PM +0900, Une B?vue wrote:
et.rb:69:in `commence’
/opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/databas
even if there is no error.
how to avoid that ?
sorry i forgot to mention the root subject ))
try this from the sqlite3 command line and see what you get:
select id, typeof( title ), typeof( guid ) from moz_bookmarks;
That will tell you the internal sqlite storage type of the field you are
requesting. I’m assuming the problem is with one of those fields, so
try
typeof() on any field that you want to test out.
enjoy,
-jeremy
Jeremy H. [email protected] wrote:
try this from the sqlite3 command line and see what you get:
select id, typeof( title ), typeof( guid ) from moz_bookmarks;
That will tell you the internal sqlite storage type of the field you are
requesting. I’m assuming the problem is with one of those fields, so try
typeof() on any field that you want to test out.
id INTEGER PRIMARY KEY → integer
type INTEGER → integer
fk INTEGER → integer | null
parent INTEGER → integer
position INTEGER → integer
title LONGVARCHAR → text | null
keyword_id INTEGER → integer | null
folder_type TEXT → text | null
dateAdded INTEGER → integer
lastModified INTEGER → integer
I would suspect “LONGVARCHAR” ???
On Sun, Jul 06, 2008 at 02:56:43PM +0900, Une B?vue wrote:
id INTEGER PRIMARY KEY -> integer
I would suspect “LONGVARCHAR” ???
Possibly, but I wouldn’t be for sure. In the other thread it looks like
you
have worked around it, so I guess that will work for you.
enjoy,
-jeremy
Jeremy H. [email protected] wrote:
Possibly, but I wouldn’t be for sure. In the other thread it looks like you
have worked around it, so I guess that will work for you.
using amalgalite, yes no prob with spurious response.
but, afaik, amalgalite uses it’s own sqlite3 embeded (thru
amalgamation).
then afterall, i suspected myself
i’ve re-installed sqlite3-ruby by gem :
~/gems%> sudo gem install --remote sqlite3-ruby –
–with-sqlite3-include=/opt/local/include
–with-sqlite3-lib=/opt/local/lib
Password:
Building native extensions. This could take a while…
Successfully installed sqlite3-ruby-1.2.2
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.2…
Installing RDoc documentation for sqlite3-ruby-1.2.2…
~/gems%>
no more spurious messages…
sorry for the noise !