diff options
author | Ralph Amissah <ralph@amissah.com> | 2009-07-01 13:48:01 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2009-07-01 13:48:01 -0400 |
commit | 1ebd6e3c0670296903ee079e845fd3661a0bfebd (patch) | |
tree | 453815f4df74aff58709d82cdd8cc610d9790bb3 /lib/sisu/v0/db_create.rb | |
parent | sisu-0.70.5, merge branch upstream into debian/sid; debian/ new year cleaning (diff) | |
parent | changelog & version update (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/db_create.rb')
-rw-r--r-- | lib/sisu/v0/db_create.rb | 527 |
1 files changed, 266 insertions, 261 deletions
diff --git a/lib/sisu/v0/db_create.rb b/lib/sisu/v0/db_create.rb index 9f6ae360..2cdb2c06 100644 --- a/lib/sisu/v0/db_create.rb +++ b/lib/sisu/v0/db_create.rb @@ -22,7 +22,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with @@ -65,7 +65,7 @@ module SiSU_DB_create def initialize(opt,conn,file,sql_type='pg') @opt,@conn,@file,@sql_type=opt,conn,file,sql_type @cX=SiSU_Screen::Ansi.new(@opt.cmd).cX - @comment=Comment.new(@sql_type) + @comment=Comment.new(@conn,@sql_type) @@dl ||=SiSU_Env::Info_env.new.digest.length end def available @@ -167,8 +167,8 @@ module SiSU_DB_create writing_focus_nationality VARCHAR(#{lt_writing_focus_nationality}) NULL, topic_register VARCHAR(#{lt_topic_register}) NULL ); - #{@comment.metadata} - }) + }) + @comment.metadata end def documents # create documents base print %{ @@ -203,8 +203,8 @@ module SiSU_DB_create digest_all CHAR(#{@@dl}), types CHAR(1) NULL ); - #{@comment.documents} - }) + }) + @comment.documents end def endnotes print %{ @@ -225,8 +225,8 @@ module SiSU_DB_create digest_clean CHAR(#{@@dl}), metadata_tid BIGINT REFERENCES metadata ); - #{@comment.endnotes} - }) + }) + @comment.endnotes end def endnotes_asterisk print %{ @@ -247,8 +247,8 @@ module SiSU_DB_create digest_clean CHAR(#{@@dl}), metadata_tid BIGINT REFERENCES metadata ); - #{@comment.endnotes_asterisk} - }) + }) + @comment.endnotes_asterisk end def endnotes_plus print %{ @@ -269,8 +269,8 @@ module SiSU_DB_create digest_clean CHAR(#{@@dl}), metadata_tid BIGINT REFERENCES metadata ); - #{@comment.endnotes_plus} - }) + }) + @comment.endnotes_plus end def urls # create documents file links mapping print %{ @@ -299,276 +299,281 @@ module SiSU_DB_create markup varchar(512), sisupod varchar(512) ); - #{@comment.urls} - }) + }) + @comment.urls end self end end class Comment - def initialize(sql_type='pg') + def initialize(conn,sql_type='pg') + @conn=conn if sql_type =~ /pg/; psql else none end end def psql + def conn_execute_array(sql_arr) + @conn.transaction do |conn| + sql_arr.each do |sql| + conn.execute(sql) + end + end + end + #def conn_execute_array(sql_arr) + # sql_arr.each do |sql| + # @conn.execute(sql) + # end + #end def metadata - %{ - COMMENT ON Table metadata - IS 'contains SiSU documents metadata with metadata'; - COMMENT ON COLUMN metadata.tid - IS 'unique'; - COMMENT ON COLUMN metadata.filename - IS 'document filename'; - COMMENT ON COLUMN metadata.title - IS 'metadata title (dublin core element 1)'; - COMMENT ON COLUMN metadata.subtitle - IS 'document subtitle'; - COMMENT ON COLUMN metadata.creator - IS 'metadata creator (dublin core element 2)'; - COMMENT ON COLUMN metadata.author - IS 'metadata author (dublin core element 2)'; - COMMENT ON COLUMN metadata.illustrator - IS 'metadata illustrator'; - COMMENT ON COLUMN metadata.translator - IS 'metadata translator'; - COMMENT ON COLUMN metadata.subject - IS 'metadata subject (dublin core element 3)'; - COMMENT ON COLUMN metadata.date - IS 'metadata date (dublin core element 7)'; - COMMENT ON COLUMN metadata.date_created - IS 'metadata date created (dublin core)'; - COMMENT ON COLUMN metadata.date_issued - IS 'metadata date of issue (dublin core)'; - COMMENT ON COLUMN metadata.date_available - IS 'metadata date available (dublin core)'; - COMMENT ON COLUMN metadata.date_valid - IS 'metadata date valid (dublin core)'; - COMMENT ON COLUMN metadata.date_modified - IS 'metadata date modified (dublin core)'; - COMMENT ON COLUMN metadata.type - IS 'metadata type (dublin core element 8)'; - COMMENT ON COLUMN metadata.description - IS 'metadata description (dublin core element 4)'; - COMMENT ON COLUMN metadata.publisher - IS 'metadata publisher (dublin core element 5)'; - COMMENT ON COLUMN metadata.contributor - IS 'metadata contributor (dublin core element 6)'; - COMMENT ON COLUMN metadata.prepared_by - IS 'metadata markup prepared by'; - COMMENT ON COLUMN metadata.digitized_by - IS 'metadata digitized by'; - COMMENT ON COLUMN metadata.format - IS 'metadata format (dublin core element 9)'; - COMMENT ON COLUMN metadata.identifier - IS 'metadata identifier (dublin core element 10)'; - COMMENT ON COLUMN metadata.source - IS 'metadata source (dublin core element 11)'; - COMMENT ON COLUMN metadata.language - IS 'metadata language (dublin core element 12)'; - COMMENT ON COLUMN metadata.language_original - IS 'metadata original language'; - COMMENT ON COLUMN metadata.relation - IS 'metadata (dublin core element 13)'; - COMMENT ON COLUMN metadata.coverage - IS 'metadata coverage (dublin core element 14)'; - COMMENT ON COLUMN metadata.rights - IS 'metadata rights / copyright / license (dublin core element 15)'; - COMMENT ON COLUMN metadata.owner - IS 'metadata owner'; - COMMENT ON COLUMN metadata.keywords - IS 'metadata keywords'; - COMMENT ON COLUMN metadata.comment - IS 'metadata comment'; - COMMENT ON COLUMN metadata.abstract - IS 'metadata abstract'; - COMMENT ON COLUMN metadata.loc - IS 'metadata library of congress'; - COMMENT ON COLUMN metadata.dewey - IS 'metadata dewey'; - COMMENT ON COLUMN metadata.isbn - IS 'metadata isbn'; - COMMENT ON COLUMN metadata.pg - IS 'metadata project gutenberg number'; - COMMENT ON COLUMN metadata.prefix_a - IS 'metadata prefix'; - COMMENT ON COLUMN metadata.prefix_b - IS 'metadata prefix'; - COMMENT ON COLUMN metadata.skin - IS 'metadata sisu skin'; - COMMENT ON COLUMN metadata.markup - IS 'metadata markup source'; - COMMENT ON COLUMN metadata.links - IS 'metadata links'; - COMMENT ON COLUMN metadata.information - IS 'metadata information'; - COMMENT ON COLUMN metadata.contact - IS 'metadata contact'; - COMMENT ON COLUMN metadata.suffix - IS 'metadata sisu suffix (output related)'; - COMMENT ON COLUMN metadata.filename - IS 'metadata source filename'; - COMMENT ON COLUMN metadata.types - IS 'document types scroll 1, seg 2, both 3'; - COMMENT ON COLUMN metadata.subj - IS 'subject areas - no way to populate at present as not mapped'; -/* - CREATE FUNCTION fileremoval() RETURNS opaque AS ' - BEGIN - DELETE FROM metadata WHERE tid=#@removetid; - DELETE FROM documents WHERE documents.metadata_tid=#@removetid; - DELETE FROM endnotes WHERE endnotes.metadata_tid=#@removetid; - DELETE FROM endnotes_asterisk WHERE endnotes_asterisk.metadata_tid=#@removetid; - DELETE FROM endnotes_plus WHERE endnotes_plus.metadata_tid=#@removetid; - DELETE FROM urls WHERE urls.metadata_tid=#@removetid; - END; - ' LANGUAGE 'plpgsql'; - CREATE TRIGGER removefile AFTER INSERT - PROCEDURE fileremoval(); -*/ - } + sql_arr=[ + %{COMMENT ON Table metadata + IS 'contains SiSU documents metadata with metadata';}, + %{COMMENT ON COLUMN metadata.tid + IS 'unique';}, + %{COMMENT ON COLUMN metadata.filename + IS 'document filename';}, + %{COMMENT ON COLUMN metadata.title + IS 'metadata title (dublin core element 1)';}, + %{COMMENT ON COLUMN metadata.subtitle + IS 'document subtitle';}, + %{COMMENT ON COLUMN metadata.creator + IS 'metadata creator (dublin core element 2)';}, + %{COMMENT ON COLUMN metadata.author + IS 'metadata author (dublin core element 2)';}, + %{COMMENT ON COLUMN metadata.illustrator + IS 'metadata illustrator';}, + %{COMMENT ON COLUMN metadata.translator + IS 'metadata translator';}, + %{COMMENT ON COLUMN metadata.subject + IS 'metadata subject (dublin core element 3)';}, + %{COMMENT ON COLUMN metadata.date + IS 'metadata date (dublin core element 7)';}, + %{COMMENT ON COLUMN metadata.date_created + IS 'metadata date created (dublin core)';}, + %{COMMENT ON COLUMN metadata.date_issued + IS 'metadata date of issue (dublin core)';}, + %{COMMENT ON COLUMN metadata.date_available + IS 'metadata date available (dublin core)';}, + %{COMMENT ON COLUMN metadata.date_valid + IS 'metadata date valid (dublin core)';}, + %{COMMENT ON COLUMN metadata.date_modified + IS 'metadata date modified (dublin core)';}, + %{COMMENT ON COLUMN metadata.type + IS 'metadata type (dublin core element 8)';}, + %{COMMENT ON COLUMN metadata.description + IS 'metadata description (dublin core element 4)';}, + %{COMMENT ON COLUMN metadata.publisher + IS 'metadata publisher (dublin core element 5)';}, + %{COMMENT ON COLUMN metadata.contributor + IS 'metadata contributor (dublin core element 6)';}, + %{COMMENT ON COLUMN metadata.prepared_by + IS 'metadata markup prepared by';}, + %{COMMENT ON COLUMN metadata.digitized_by + IS 'metadata digitized by';}, + %{COMMENT ON COLUMN metadata.format + IS 'metadata format (dublin core element 9)';}, + %{COMMENT ON COLUMN metadata.identifier + IS 'metadata identifier (dublin core element 10)';}, + %{COMMENT ON COLUMN metadata.source + IS 'metadata source (dublin core element 11)';}, + %{COMMENT ON COLUMN metadata.language + IS 'metadata language (dublin core element 12)';}, + %{COMMENT ON COLUMN metadata.language_original + IS 'metadata original language';}, + %{COMMENT ON COLUMN metadata.relation + IS 'metadata (dublin core element 13)';}, + %{COMMENT ON COLUMN metadata.coverage + IS 'metadata coverage (dublin core element 14)';}, + %{COMMENT ON COLUMN metadata.rights + IS 'metadata rights / copyright / license (dublin core element 15)';}, + %{COMMENT ON COLUMN metadata.owner + IS 'metadata owner';}, + %{COMMENT ON COLUMN metadata.keywords + IS 'metadata keywords';}, + %{COMMENT ON COLUMN metadata.comment + IS 'metadata comment';}, + %{COMMENT ON COLUMN metadata.abstract + IS 'metadata abstract';}, + %{COMMENT ON COLUMN metadata.loc + IS 'metadata library of congress';}, + %{COMMENT ON COLUMN metadata.dewey + IS 'metadata dewey';}, + %{COMMENT ON COLUMN metadata.isbn + IS 'metadata isbn';}, + %{COMMENT ON COLUMN metadata.pg + IS 'metadata project gutenberg number';}, + %{COMMENT ON COLUMN metadata.prefix_a + IS 'metadata prefix';}, + %{COMMENT ON COLUMN metadata.prefix_b + IS 'metadata prefix';}, + %{COMMENT ON COLUMN metadata.skin + IS 'metadata sisu skin';}, + %{COMMENT ON COLUMN metadata.markup + IS 'metadata markup source';}, + %{COMMENT ON COLUMN metadata.links + IS 'metadata links';}, + %{COMMENT ON COLUMN metadata.information + IS 'metadata information';}, + %{COMMENT ON COLUMN metadata.contact + IS 'metadata contact';}, + %{COMMENT ON COLUMN metadata.suffix + IS 'metadata sisu suffix (output related)';}, + %{COMMENT ON COLUMN metadata.filename + IS 'metadata source filename';}, + %{COMMENT ON COLUMN metadata.types + IS 'document types scroll 1, seg 2, both 3';}, + %{COMMENT ON COLUMN metadata.subj + IS 'subject areas - no way to populate at present as not mapped';}, + ] + conn_execute_array(sql_arr) end def documents - %{ - COMMENT ON Table documents - IS 'contains searchable text of SiSU documents'; - COMMENT ON COLUMN documents.lid - IS 'unique'; - COMMENT ON COLUMN documents.metadata_tid - IS 'tie to title in metadata'; - COMMENT ON COLUMN documents.lev - IS 'doc level 1-6 \d\~'; - COMMENT ON COLUMN documents.seg - IS 'segment name from level 4'; - COMMENT ON COLUMN documents.ocn - IS 'object citation number'; - COMMENT ON COLUMN documents.en_a - IS 'first endnote number in text object (eg. NULL or 34) (used with en_z to create range)'; - COMMENT ON COLUMN documents.en_z - IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a to create range)'; - COMMENT ON COLUMN documents.en_a_asterisk - IS 'first endnote number in text object (eg. NULL or 34) (used with en_z_asterisk to create range)'; - COMMENT ON COLUMN documents.en_z_asterisk - IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a_asterisk to create range)'; - COMMENT ON COLUMN documents.en_a_plus - IS 'first endnote number in text object (eg. NULL or 34) (used with en_z_plus to create range)'; - COMMENT ON COLUMN documents.en_z_plus - IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a_plus to create range)'; - COMMENT ON COLUMN documents.types - IS 'document types seg scroll'; - COMMENT ON COLUMN documents.clean - IS 'text object - substantive text: clean, stripped of markup'; - COMMENT ON COLUMN documents.body - IS 'text object - substantive text: light html markup'; - COMMENT ON COLUMN documents.lev1 - IS 'document structure, level 1'; - COMMENT ON COLUMN documents.lev2 - IS 'document structure, level 2'; - COMMENT ON COLUMN documents.lev3 - IS 'document structure, level 3'; - COMMENT ON COLUMN documents.lev4 - IS 'document structure, level 4'; - COMMENT ON COLUMN documents.lev5 - IS 'document structure, level 5'; - COMMENT ON COLUMN documents.lev6 - IS 'document structure, level 6'; - } + sql_arr=[ + %{COMMENT ON Table documents + IS 'contains searchable text of SiSU documents';}, + %{COMMENT ON COLUMN documents.lid + IS 'unique';}, + %{COMMENT ON COLUMN documents.metadata_tid + IS 'tie to title in metadata';}, + %{COMMENT ON COLUMN documents.lev + IS 'doc level 1-6 \d\~';}, + %{COMMENT ON COLUMN documents.seg + IS 'segment name from level 4';}, + %{COMMENT ON COLUMN documents.ocn + IS 'object citation number';}, + %{COMMENT ON COLUMN documents.en_a + IS 'first endnote number in text object (eg. NULL or 34) (used with en_z to create range)';}, + %{COMMENT ON COLUMN documents.en_z + IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a to create range)';}, + %{COMMENT ON COLUMN documents.en_a_asterisk + IS 'first endnote number in text object (eg. NULL or 34) (used with en_z_asterisk to create range)';}, + %{COMMENT ON COLUMN documents.en_z_asterisk + IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a_asterisk to create range)';}, + %{COMMENT ON COLUMN documents.en_a_plus + IS 'first endnote number in text object (eg. NULL or 34) (used with en_z_plus to create range)';}, + %{COMMENT ON COLUMN documents.en_z_plus + IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a_plus to create range)';}, + %{COMMENT ON COLUMN documents.types + IS 'document types seg scroll';}, + %{COMMENT ON COLUMN documents.clean + IS 'text object - substantive text: clean, stripped of markup';}, + %{COMMENT ON COLUMN documents.body + IS 'text object - substantive text: light html markup';}, + %{COMMENT ON COLUMN documents.lev1 + IS 'document structure, level 1';}, + %{COMMENT ON COLUMN documents.lev2 + IS 'document structure, level 2';}, + %{COMMENT ON COLUMN documents.lev3 + IS 'document structure, level 3';}, + %{COMMENT ON COLUMN documents.lev4 + IS 'document structure, level 4';}, + %{COMMENT ON COLUMN documents.lev5 + IS 'document structure, level 5';}, + %{COMMENT ON COLUMN documents.lev6 + IS 'document structure, level 6';} + ] + conn_execute_array(sql_arr) end def endnotes - %{ - COMMENT ON Table endnotes - IS 'contains searchable text of SiSU documents endnotes'; - COMMENT ON COLUMN endnotes.nid - IS 'unique'; - COMMENT ON COLUMN endnotes.document_lid - IS 'ties to text block from which referenced'; - COMMENT ON COLUMN endnotes.nr - IS 'endnote number <!e_(\d+)!>'; - COMMENT ON COLUMN endnotes.clean - IS 'endnote substantive content, stripped of markup'; - COMMENT ON COLUMN endnotes.body - IS 'endnote substantive content'; - COMMENT ON COLUMN endnotes.ocn - IS 'object citation no# <\~(\d+)> from which endnote is referenced'; - COMMENT ON COLUMN documents.metadata_tid - IS 'tie to title in metadata - unique for each document'; - } + sql_arr=[ + %{COMMENT ON Table endnotes + IS 'contains searchable text of SiSU documents endnotes';}, + %{COMMENT ON COLUMN endnotes.nid + IS 'unique';}, + %{COMMENT ON COLUMN endnotes.document_lid + IS 'ties to text block from which referenced';}, + %{COMMENT ON COLUMN endnotes.nr + IS 'endnote number <!e_(\d+)!>';}, + %{COMMENT ON COLUMN endnotes.clean + IS 'endnote substantive content, stripped of markup';}, + %{COMMENT ON COLUMN endnotes.body + IS 'endnote substantive content';}, + %{COMMENT ON COLUMN endnotes.ocn + IS 'object citation no# <\~(\d+)> from which endnote is referenced';}, + %{COMMENT ON COLUMN documents.metadata_tid + IS 'tie to title in metadata - unique for each document';} + ] + conn_execute_array(sql_arr) end def endnotes_asterisk - %{ - COMMENT ON Table endnotes_asterisk - IS 'contains searchable text of SiSU documents endnotes asterisk'; - COMMENT ON COLUMN endnotes_asterisk.nid - IS 'unique'; - COMMENT ON COLUMN endnotes_asterisk.document_lid - IS 'ties to text block from which referenced'; - COMMENT ON COLUMN endnotes_asterisk.nr - IS 'endnote number <!e_(\d+)!>'; - COMMENT ON COLUMN endnotes_asterisk.clean - IS 'endnote substantive content, stripped of markup'; - COMMENT ON COLUMN endnotes_asterisk.body - IS 'endnote substantive content'; - COMMENT ON COLUMN endnotes_asterisk.ocn - IS 'object citation no# <\~(\d+)> from which endnote is referenced'; - COMMENT ON COLUMN documents.metadata_tid - IS 'tie to title in metadata - unique for each document'; - } + sql_arr=[ + %{COMMENT ON Table endnotes_asterisk + IS 'contains searchable text of SiSU documents endnotes asterisk';}, + %{COMMENT ON COLUMN endnotes_asterisk.nid + IS 'unique';}, + %{COMMENT ON COLUMN endnotes_asterisk.document_lid + IS 'ties to text block from which referenced';}, + %{COMMENT ON COLUMN endnotes_asterisk.nr + IS 'endnote number <!e_(\d+)!>';}, + %{COMMENT ON COLUMN endnotes_asterisk.clean + IS 'endnote substantive content, stripped of markup';}, + %{COMMENT ON COLUMN endnotes_asterisk.body + IS 'endnote substantive content';}, + %{COMMENT ON COLUMN endnotes_asterisk.ocn + IS 'object citation no# <\~(\d+)> from which endnote is referenced';}, + %{COMMENT ON COLUMN documents.metadata_tid + IS 'tie to title in metadata - unique for each document';} + ] + conn_execute_array(sql_arr) end def endnotes_plus - %{ - COMMENT ON Table endnotes_plus - IS 'contains searchable text of SiSU documents endnotes'; - COMMENT ON COLUMN endnotes_plus.nid - IS 'unique'; - COMMENT ON COLUMN endnotes_plus.document_lid - IS 'ties to text block from which referenced'; - COMMENT ON COLUMN endnotes_plus.nr - IS 'endnote number <!e_(\d+)!>'; - COMMENT ON COLUMN endnotes_plus.clean - IS 'endnote substantive content, stripped of markup'; - COMMENT ON COLUMN endnotes_plus.body - IS 'endnote substantive content'; - COMMENT ON COLUMN endnotes_plus.ocn - IS 'object citation no# <\~(\d+)> from which endnote is referenced'; - COMMENT ON COLUMN documents.metadata_tid - IS 'tie to title in metadata - unique for each document'; - } + sql_arr=[ + %{COMMENT ON Table endnotes_plus + IS 'contains searchable text of SiSU documents endnotes';}, + %{COMMENT ON COLUMN endnotes_plus.nid + IS 'unique';}, + %{COMMENT ON COLUMN endnotes_plus.document_lid + IS 'ties to text block from which referenced';}, + %{COMMENT ON COLUMN endnotes_plus.nr + IS 'endnote number <!e_(\d+)!>';}, + %{COMMENT ON COLUMN endnotes_plus.clean + IS 'endnote substantive content, stripped of markup';}, + %{COMMENT ON COLUMN endnotes_plus.body + IS 'endnote substantive content';}, + %{COMMENT ON COLUMN endnotes_plus.ocn + IS 'object citation no# <\~(\d+)> from which endnote is referenced';}, + %{COMMENT ON COLUMN documents.metadata_tid + IS 'tie to title in metadata - unique for each document';}, + ] + conn_execute_array(sql_arr) end def urls - %{ - COMMENT ON Table urls - IS 'contains base url links to different SiSU output'; - COMMENT ON COLUMN documents.metadata_tid - IS 'tie to title in metadata - unique for each document, the mapping of rows is one to one'; - COMMENT ON COLUMN urls.plaintext - IS 'plaintext utf-8'; - COMMENT ON COLUMN urls.html_toc - IS 'table of contents for segmented html document'; - COMMENT ON COLUMN urls.html_doc - IS 'html document (scroll)'; - COMMENT ON COLUMN urls.xhtml - IS 'xhtml document (scroll)'; - COMMENT ON COLUMN urls.xml_sax - IS 'xml sax oriented document (scroll)'; - COMMENT ON COLUMN urls.xml_dom - IS 'xml dom oriented document (scroll)'; - COMMENT ON COLUMN urls.odf - IS 'opendocument format text'; - COMMENT ON COLUMN urls.pdf_p - IS 'pdf portrait'; - COMMENT ON COLUMN urls.pdf_l - IS 'pdf landscape'; - COMMENT ON COLUMN urls.concordance - IS 'rudimentary document index linked to html'; - COMMENT ON COLUMN urls.latex_p - IS 'latex portrait'; - COMMENT ON COLUMN urls.latex_l - IS 'latex_landscape'; - COMMENT ON COLUMN urls.markup - IS 'markup'; - COMMENT ON COLUMN urls.sisupod - IS 'SiSU document format .tgz (all SiSU information on document)'; - } + sql_arr=[ + %{COMMENT ON Table urls + IS 'contains base url links to different SiSU output';}, + %{COMMENT ON COLUMN documents.metadata_tid + IS 'tie to title in metadata - unique for each document, the mapping of rows is one to one';}, + %{COMMENT ON COLUMN urls.plaintext + IS 'plaintext utf-8';}, + %{COMMENT ON COLUMN urls.html_toc + IS 'table of contents for segmented html document';}, + %{COMMENT ON COLUMN urls.html_doc + IS 'html document (scroll)';}, + %{COMMENT ON COLUMN urls.xhtml + IS 'xhtml document (scroll)';}, + %{COMMENT ON COLUMN urls.xml_sax + IS 'xml sax oriented document (scroll)';}, + %{COMMENT ON COLUMN urls.xml_dom + IS 'xml dom oriented document (scroll)';}, + %{COMMENT ON COLUMN urls.odf + IS 'opendocument format text';}, + %{COMMENT ON COLUMN urls.pdf_p + IS 'pdf portrait';}, + %{COMMENT ON COLUMN urls.pdf_l + IS 'pdf landscape';}, + %{COMMENT ON COLUMN urls.concordance + IS 'rudimentary document index linked to html';}, + %{COMMENT ON COLUMN urls.latex_p + IS 'latex portrait';}, + %{COMMENT ON COLUMN urls.latex_l + IS 'latex_landscape';}, + %{COMMENT ON COLUMN urls.markup + IS 'markup';}, + %{COMMENT ON COLUMN urls.sisupod + IS 'SiSU document format .tgz (all SiSU information on document)';}, + ] + conn_execute_array(sql_arr) end self end |