I have the following code:
database = Sequel.connect('sqlite://lrdb.db')
puts database.inspect
t = database[:Adobe_images] # <= See if I can get to the table using
core functionality. Yes!!!
puts t.first
class Image < Sequel::Model(:Adobe_images) # <= See if I can get to
the table using model
end
Image.filter{:fileHeight > 1000}.each do |add| # <= Failure.
Sequel::DatabaseError: SQLite3::SQLException: no such table:
Adobe_images
puts add.inspect
end
going against a SQLite database with the schema at the bottom of this
email. I've commented the above code to show what's happening. I'm not
sure I understand why I can use the table using core functionality and
yet can't (seemingly do pretty much the same thing using
Sequel::Model.
What am I missing?
Thanks!
# CREATE TABLE Adobe_images (
# id_local INTEGER PRIMARY KEY,
# id_global UNIQUE NOT NULL,
# aspectRatioCache NOT NULL DEFAULT -1,
# captureTime NOT NULL DEFAULT -63113817600,
# changeEpoch INTEGER,
# colorLabels NOT NULL DEFAULT '',
# copyCreationTime NOT NULL DEFAULT -63113817600,
# copyName,
# developSettingsIDCache,
# fileFormat NOT NULL DEFAULT 'unset',
# fileHeight,
# fileWidth,
# hasMissingSidecars INTEGER,
# hidden INTEGER NOT NULL DEFAULT 0,
# importedTime,
# masterImage INTEGER,
# orientation,
# originalCaptureTime NOT NULL DEFAULT -63113817600,
# originalRootEntity INTEGER,
# panningDistanceH,
# panningDistanceV,
# photoBinNominators INTEGER,
# pick NOT NULL DEFAULT 0,
# printSharpening,
# propertiesCache,
# pyramidIDCache,
# rating,
# rootFile INTEGER,
# sidecarStatus,
# stackIsCollapsed INTEGER NOT NULL DEFAULT 0,
# stackParent INTEGER DEFAULT 0,
# stackParent____aspectRatioCache,
# stackParent____captureTime,
# stackParent____colorLabels,
# stackParent____fileFormat,
# stackParent____pick,
# stackParent____rating,
# stackParent____touchCount,
# stackParent____touchTime,
# stackParent_extension,
# stackParent_fileName,
# stackParent_positionInFolder,
# stackPosition NOT NULL DEFAULT 0,
# touchCount NOT NULL DEFAULT 0,
# touchTime NOT NULL DEFAULT 0
# );
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.