aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/db_columns.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/db_columns.rb')
-rw-r--r--lib/sisu/v2/db_columns.rb26
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/sisu/v2/db_columns.rb b/lib/sisu/v2/db_columns.rb
index 0c2eb367..ba861f4d 100644
--- a/lib/sisu/v2/db_columns.rb
+++ b/lib/sisu/v2/db_columns.rb
@@ -1425,7 +1425,7 @@ module SiSU_DB_columns
end
def column_comment
%{COMMENT ON COLUMN metadata_and_text.#{name}
- IS 'metadata classify document library of congress (if available)';}
+ IS 'metadata classify document Library of Congress';}
end
def tuple
t=if defined? @md.classify.loc \
@@ -1447,7 +1447,7 @@ module SiSU_DB_columns
end
def column_comment
%{COMMENT ON COLUMN metadata_and_text.#{name}
- IS 'metadata classify document dewey (if available)';}
+ IS 'metadata classify document Dewey';}
end
def tuple
t=if defined? @md.classify.dewey \
@@ -1460,6 +1460,28 @@ module SiSU_DB_columns
end
self
end
+ def classify_oclc
+ def name
+ 'classify_oclc'
+ end
+ def create_column
+ "#{name} VARCHAR(#{Db[:col_classify_library]}) NULL,"
+ end
+ def column_comment
+ %{COMMENT ON COLUMN metadata_and_text.#{name}
+ IS 'metadata classify document Online Computer Library Center number';}
+ end
+ def tuple
+ t=if defined? @md.classify.oclc \
+ and @md.classify.oclc=~/\S+/
+ txt=@md.classify.oclc
+ special_character_escape(txt)
+ ["#{name}, ","'#{txt}', "]
+ else ['','']
+ end
+ end
+ self
+ end
def classify_pg
def name
'classify_pg'