title avoiding spurious response

U

Une Bévue

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 ?
 
U

Une Bévue

Une Bévue said:
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 ?

sorry i forgot to mention the root subject ))
 
J

Jeremy Hinegardner

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
 
U

Une Bévue

Jeremy Hinegardner said:
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" ???
 
J

Jeremy Hinegardner

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" ???

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
 
U

Une Bévue

Jeremy Hinegardner said:
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 !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,197
Latest member
Sean29G025

Latest Threads

Top