]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/dbi.pm
added "poll" flag to surveys; split up driver so we can use the CDBI stuff
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / Driver / Pg / dbi.pm
1 {
2         #---------------------------------------------------------------------
3         package action::survey;
4         
5         action::survey->table( 'action.survey' );
6         action::survey->sequence( 'action.survey_id_seq' );
7         
8         #---------------------------------------------------------------------
9         package action::survey_question;
10         
11         action::survey_question->table( 'action.survey_question' );
12         action::survey_question->sequence( 'action.survey_question_id_seq' );
13         
14         #---------------------------------------------------------------------
15         package action::survey_answer;
16         
17         action::survey_answer->table( 'action.survey_answer' );
18         action::survey_answer->sequence( 'action.survey_answer_id_seq' );
19         
20         #---------------------------------------------------------------------
21         package action::survey_response;
22         
23         action::survey_response->table( 'action.survey_response' );
24         action::survey_response->sequence( 'action.survey_response_id_seq' );
25         
26         #---------------------------------------------------------------------
27         package config::copy_status;
28         
29         config::standing->table( 'config.copy_status' );
30         config::standing->sequence( 'config.copy_status_id_seq' );
31         
32         #---------------------------------------------------------------------
33         package config::net_access_level;
34         
35         config::standing->table( 'config.net_access_level' );
36         config::standing->sequence( 'config.net_access_level_id_seq' );
37         
38         #---------------------------------------------------------------------
39         package config::standing;
40         
41         config::standing->table( 'config.standing' );
42         config::standing->sequence( 'config.standing_id_seq' );
43         
44         #---------------------------------------------------------------------
45         package config::metabib_field;
46         
47         config::metabib_field->table( 'config.metabib_field' );
48         config::metabib_field->sequence( 'config.metabib_field_id_seq' );
49         
50         #---------------------------------------------------------------------
51         package config::bib_source;
52         
53         config::bib_source->table( 'config.bib_source' );
54         config::bib_source->sequence( 'config.bib_source_id_seq' );
55         
56         #---------------------------------------------------------------------
57         package config::identification_type;
58         
59         config::identification_type->table( 'config.identification_type' );
60         config::identification_type->sequence( 'config.identification_type_id_seq' );
61         
62         #---------------------------------------------------------------------
63         package asset::call_number_note;
64         
65         asset::call_number->table( 'asset.call_number_note' );
66         asset::call_number->sequence( 'asset.call_number_note_id_seq' );
67         
68         #---------------------------------------------------------------------
69         package asset::copy_note;
70         
71         asset::copy->table( 'asset.copy_note' );
72         asset::copy->sequence( 'asset.copy_note_id_seq' );
73
74         #---------------------------------------------------------------------
75         package asset::call_number;
76         
77         asset::call_number->table( 'asset.call_number' );
78         asset::call_number->sequence( 'asset.call_number_id_seq' );
79         
80         #---------------------------------------------------------------------
81         package asset::copy_location;
82         
83         asset::copy->table( 'asset.copy_location' );
84         asset::copy->sequence( 'asset.copy_location_id_seq' );
85
86         #---------------------------------------------------------------------
87         package asset::copy;
88         
89         asset::copy->table( 'asset.copy' );
90         asset::copy->sequence( 'asset.copy_id_seq' );
91
92         #---------------------------------------------------------------------
93         package asset::stat_cat;
94         
95         asset::stat_cat->table( 'asset.stat_cat' );
96         asset::stat_cat->sequence( 'asset.stat_cat_id_seq' );
97         
98         #---------------------------------------------------------------------
99         package asset::stat_cat_entry;
100         
101         asset::stat_cat_entry->table( 'asset.stat_cat_entry' );
102         asset::stat_cat_entry->sequence( 'asset.stat_cat_entry_id_seq' );
103         
104         #---------------------------------------------------------------------
105         package asset::stat_cat_entry_copy_map;
106         
107         asset::stat_cat_entry_copy_map->table( 'asset.stat_cat_entry_copy_map' );
108         asset::stat_cat_entry_copy_map->sequence( 'asset.stat_cat_entry_copy_map_id_seq' );
109         
110         #---------------------------------------------------------------------
111         package biblio::record_entry;
112         
113         biblio::record_entry->table( 'biblio.record_entry' );
114         biblio::record_entry->sequence( 'biblio.record_entry_id_seq' );
115
116         #---------------------------------------------------------------------
117         #package biblio::record_marc;
118         #
119         #biblio::record_marc->table( 'biblio.record_marc' );
120         #biblio::record_marc->sequence( 'biblio.record_marc_id_seq' );
121         #
122         #---------------------------------------------------------------------
123         package biblio::record_note;
124         
125         biblio::record_note->table( 'biblio.record_note' );
126         biblio::record_note->sequence( 'biblio.record_note_id_seq' );
127         
128         #---------------------------------------------------------------------
129         package actor::user;
130         
131         actor::user->table( 'actor.usr' );
132         actor::user->sequence( 'actor.usr_id_seq' );
133
134         #---------------------------------------------------------------------
135         package actor::user_address;
136         
137         actor::user_address->table( 'actor.usr_address' );
138         actor::user_address->sequence( 'actor.usr_address_id_seq' );
139
140         #---------------------------------------------------------------------
141         package actor::org_address;
142         
143         actor::org_address->table( 'actor.org_address' );
144         actor::org_address->sequence( 'actor.org_address_id_seq' );
145         
146         #---------------------------------------------------------------------
147         package actor::profile;
148         
149         actor::profile->table( 'actor.profile' );
150         actor::profile->sequence( 'actor.profile_id_seq' );
151         
152         #---------------------------------------------------------------------
153         package actor::org_unit_type;
154         
155         actor::org_unit_type->table( 'actor.org_unit_type' );
156         actor::org_unit_type->sequence( 'actor.org_unit_type_id_seq' );
157
158         #---------------------------------------------------------------------
159         package actor::org_unit;
160         
161         actor::org_unit->table( 'actor.org_unit' );
162         actor::org_unit->sequence( 'actor.org_unit_id_seq' );
163
164         #---------------------------------------------------------------------
165         package actor::stat_cat;
166         
167         actor::stat_cat->table( 'actor.stat_cat' );
168         actor::stat_cat->sequence( 'actor.stat_cat_id_seq' );
169         
170         #---------------------------------------------------------------------
171         package actor::stat_cat_entry;
172         
173         actor::stat_cat_entry->table( 'actor.stat_cat_entry' );
174         actor::stat_cat_entry->sequence( 'actor.stat_cat_entry_id_seq' );
175         
176         #---------------------------------------------------------------------
177         package actor::stat_cat_entry_user_map;
178         
179         actor::stat_cat_entry_user_map->table( 'actor.stat_cat_entry_copy_map' );
180         actor::stat_cat_entry_user_map->sequence( 'actor.stat_cat_entry_usr_map_id_seq' );
181         
182         #---------------------------------------------------------------------
183         package actor::card;
184         
185         actor::card->table( 'actor.card' );
186         actor::card->sequence( 'actor.card_id_seq' );
187
188         #---------------------------------------------------------------------
189
190         #-------------------------------------------------------------------------------
191         package metabib::metarecord;
192
193         metabib::metarecord->table( 'metabib.metarecord' );
194         metabib::metarecord->sequence( 'metabib.metarecord_id_seq' );
195
196         OpenILS::Application::Storage->register_method(
197                 api_name        => 'open-ils.storage.direct.metabib.metarecord.batch.create',
198                 method          => 'copy_create',
199                 api_level       => 1,
200                 'package'       => 'OpenILS::Application::Storage',
201                 cdbi            => 'metabib::metarecord',
202         );
203
204
205         #-------------------------------------------------------------------------------
206
207         #-------------------------------------------------------------------------------
208         package metabib::title_field_entry;
209
210         metabib::title_field_entry->table( 'metabib.title_field_entry' );
211         metabib::title_field_entry->sequence( 'metabib.title_field_entry_id_seq' );
212         metabib::title_field_entry->columns( 'FTS' => 'index_vector' );
213
214 #       metabib::title_field_entry->add_trigger(
215 #               before_create => \&OpenILS::Application::Storage::Driver::Pg::tsearch2_trigger
216 #       );
217 #       metabib::title_field_entry->add_trigger(
218 #               before_update => \&OpenILS::Application::Storage::Driver::Pg::tsearch2_trigger
219 #       );
220
221         OpenILS::Application::Storage->register_method(
222                 api_name        => 'open-ils.storage.direct.metabib.title_field_entry.batch.create',
223                 method          => 'copy_create',
224                 api_level       => 1,
225                 'package'       => 'OpenILS::Application::Storage',
226                 cdbi            => 'metabib::title_field_entry',
227         );
228
229         #-------------------------------------------------------------------------------
230
231         #-------------------------------------------------------------------------------
232         package metabib::author_field_entry;
233
234         metabib::author_field_entry->table( 'metabib.author_field_entry' );
235         metabib::author_field_entry->sequence( 'metabib.author_field_entry_id_seq' );
236         metabib::author_field_entry->columns( 'FTS' => 'index_vector' );
237
238         OpenILS::Application::Storage->register_method(
239                 api_name        => 'open-ils.storage.direct.metabib.author_field_entry.batch.create',
240                 method          => 'copy_create',
241                 api_level       => 1,
242                 'package'       => 'OpenILS::Application::Storage',
243                 cdbi            => 'metabib::author_field_entry',
244         );
245
246         #-------------------------------------------------------------------------------
247
248         #-------------------------------------------------------------------------------
249         package metabib::subject_field_entry;
250
251         metabib::subject_field_entry->table( 'metabib.subject_field_entry' );
252         metabib::subject_field_entry->sequence( 'metabib.subject_field_entry_id_seq' );
253         metabib::subject_field_entry->columns( 'FTS' => 'index_vector' );
254
255         OpenILS::Application::Storage->register_method(
256                 api_name        => 'open-ils.storage.direct.metabib.subject_field_entry.batch.create',
257                 method          => 'copy_create',
258                 api_level       => 1,
259                 'package'       => 'OpenILS::Application::Storage',
260                 cdbi            => 'metabib::subject_field_entry',
261         );
262
263         #-------------------------------------------------------------------------------
264
265         #-------------------------------------------------------------------------------
266         package metabib::keyword_field_entry;
267
268         metabib::keyword_field_entry->table( 'metabib.keyword_field_entry' );
269         metabib::keyword_field_entry->sequence( 'metabib.keyword_field_entry_id_seq' );
270         metabib::keyword_field_entry->columns( 'FTS' => 'index_vector' );
271
272         OpenILS::Application::Storage->register_method(
273                 api_name        => 'open-ils.storage.direct.metabib.keyword_field_entry.batch.create',
274                 method          => 'copy_create',
275                 api_level       => 1,
276                 'package'       => 'OpenILS::Application::Storage',
277                 cdbi            => 'metabib::keyword_field_entry',
278         );
279
280         #-------------------------------------------------------------------------------
281
282         #-------------------------------------------------------------------------------
283         #package metabib::title_field_entry_source_map;
284
285         #metabib::title_field_entry_source_map->table( 'metabib.title_field_entry_source_map' );
286
287         #-------------------------------------------------------------------------------
288
289         #-------------------------------------------------------------------------------
290         #package metabib::author_field_entry_source_map;
291
292         #metabib::author_field_entry_source_map->table( 'metabib.author_field_entry_source_map' );
293
294         #-------------------------------------------------------------------------------
295
296         #-------------------------------------------------------------------------------
297         #package metabib::subject_field_entry_source_map;
298
299         #metabib::subject_field_entry_source_map->table( 'metabib.subject_field_entry_source_map' );
300
301         #-------------------------------------------------------------------------------
302
303         #-------------------------------------------------------------------------------
304         #package metabib::keyword_field_entry_source_map;
305
306         #metabib::keyword_field_entry_source_map->table( 'metabib.keyword_field_entry_source_map' );
307
308         #-------------------------------------------------------------------------------
309
310         #-------------------------------------------------------------------------------
311         package metabib::metarecord_source_map;
312
313         metabib::metarecord_source_map->table( 'metabib.metarecord_source_map' );
314         OpenILS::Application::Storage->register_method(
315                 api_name        => 'open-ils.storage.direct.metabib.metarecord_source_map.batch.create',
316                 method          => 'copy_create',
317                 api_level       => 1,
318                 'package'       => 'OpenILS::Application::Storage',
319                 cdbi            => 'metabib::metarecord_source_map',
320         );
321
322
323         #-------------------------------------------------------------------------------
324         package metabib::record_descriptor;
325
326         metabib::record_descriptor->table( 'metabib.rec_descriptor' );
327         metabib::record_descriptor->sequence( 'metabib.rec_descriptor_id_seq' );
328
329         OpenILS::Application::Storage->register_method(
330                 api_name        => 'open-ils.storage.direct.metabib.record_descriptor.batch.create',
331                 method          => 'copy_create',
332                 api_level       => 1,
333                 'package'       => 'OpenILS::Application::Storage',
334                 cdbi            => 'metabib::record_descriptor',
335         );
336
337         #-------------------------------------------------------------------------------
338
339
340         #-------------------------------------------------------------------------------
341         package metabib::full_rec;
342
343         metabib::full_rec->table( 'metabib.full_rec' );
344         metabib::full_rec->sequence( 'metabib.full_rec_id_seq' );
345         metabib::full_rec->columns( 'FTS' => 'index_vector' );
346
347         OpenILS::Application::Storage->register_method(
348                 api_name        => 'open-ils.storage.direct.metabib.full_rec.batch.create',
349                 method          => 'copy_create',
350                 api_level       => 1,
351                 'package'       => 'OpenILS::Application::Storage',
352                 cdbi            => 'metabib::full_rec',
353         );
354
355
356         #-------------------------------------------------------------------------------
357 }
358
359 1;