some useful wrappers for loading bre's
authorJason Etheridge <jason@esilibrary.com>
Fri, 7 Apr 2017 14:53:13 +0000 (10:53 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 7 Apr 2017 14:53:13 +0000 (10:53 -0400)
sql/templates/bib_fast_template.sql [new file with mode: 0644]
sql/templates/bib_slow_template.sql [new file with mode: 0644]

diff --git a/sql/templates/bib_fast_template.sql b/sql/templates/bib_fast_template.sql
new file mode 100644 (file)
index 0000000..1b56773
--- /dev/null
@@ -0,0 +1,3 @@
+SET CLIENT_ENCODING TO 'UNICODE';
+
+\COPY biblio.record_entry (active,create_date,creator,deleted,edit_date,editor,fingerprint,id,last_xact_id,marc,quality,source,tcn_source,tcn_value,owner,share_depth) FROM 'XXX'
diff --git a/sql/templates/bib_slow_template.sql b/sql/templates/bib_slow_template.sql
new file mode 100644 (file)
index 0000000..6d29f5b
--- /dev/null
@@ -0,0 +1,21 @@
+SET CLIENT_ENCODING TO 'UNICODE';
+
+BEGIN;
+
+UPDATE
+        config.internal_flag
+SET
+        enabled = 't'
+WHERE
+        name IN ('ingest.assume_inserts_only','ingest.disable_located_uri','ingest.metarecord_mapping.skip_on_insert');
+
+\COPY biblio.record_entry (active,create_date,creator,deleted,edit_date,editor,fingerprint,id,last_xact_id,marc,quality,source,tcn_source,tcn_value,owner,share_depth) FROM 'XXX'
+
+UPDATE
+        config.internal_flag
+SET
+        enabled = 'f'
+WHERE
+        name IN ('ingest.assume_inserts_only','ingest.disable_located_uri','ingest.metarecord_mapping.skip_on_insert');
+
+COMMIT;