projects
/
quanlib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b8c50b
)
Housekeeping: remove commented-out code.
author
Chris Jaekl
<chris@localhost>
Sat, 14 Mar 2020 00:32:47 +0000
(20:32 -0400)
committer
Chris Jaekl
<chris@localhost>
Sat, 14 Mar 2020 00:32:47 +0000
(20:32 -0400)
store.rb
patch
|
blob
|
history
diff --git
a/store.rb
b/store.rb
index 1ce5fd45f417ebb3cad5757b27da1e510d16c099..7494b8d93dc849074091c6a1953622e772a12359 100644
(file)
--- a/
store.rb
+++ b/
store.rb
@@
-33,8
+33,6
@@
class Store
end
def connect
end
def connect
- # @conn = PGconn.connect('localhost', 5432, '', '', 'quanlib', 'quanlib', 'quanlib')
- # @conn = PG.connect(@dbhost, @dbport, '', '', @dbname, @dbuser, @dbpass)
@conn = TimedConn.new(PG.connect(@dbhost, @dbport, '', '', @dbname, @dbuser, @dbpass))
return @conn
end
@conn = TimedConn.new(PG.connect(@dbhost, @dbport, '', '', @dbname, @dbuser, @dbpass))
return @conn
end
@@
-291,15
+289,12
@@
EOS
end
def find_classification(author_grouping, title_grouping)
end
def find_classification(author_grouping, title_grouping)
- #puts 'find_classification("' + author_grouping.inspect + '", "' + title_grouping.inspect + '")...'
sql = "SELECT id FROM Classifications WHERE author_grouping = $1 AND title_grouping = $2;"
@conn.exec_params(sql, [author_grouping, title_grouping]) do |rs|
if rs.ntuples > 0
sql = "SELECT id FROM Classifications WHERE author_grouping = $1 AND title_grouping = $2;"
@conn.exec_params(sql, [author_grouping, title_grouping]) do |rs|
if rs.ntuples > 0
- #puts ' --> ' + rs[0]['id'].inspect
return rs[0]['id']
end
end
return rs[0]['id']
end
end
- #puts ' --> NIL'
return nil
end
return nil
end
@@
-345,12
+340,6
@@
EOS
fullpath = @basePath + '/efs/' + efspath + '/' + efsname
return Cover.new(nil, fullpath, mime_type)
fullpath = @basePath + '/efs/' + efspath + '/' + efsname
return Cover.new(nil, fullpath, mime_type)
-
- #File.open(fullpath, 'rb') do |is|
- # return Cover.new(is, fullpath, mime_type)
- #end
- #
- #return nil
end
def store_cover(book)
end
def store_cover(book)