4d518345a8973e7d25232b41100dcff1f04a3649
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / Driver / Pg / dbi.pm
1 {
2         #---------------------------------------------------------------------
3         package money::billing;
4         
5         money::billing->table( 'money.billing' );
6         money::billing->sequence( 'money.billing_id_seq' );
7
8         #---------------------------------------------------------------------
9         package action::circulation;
10         
11         action::circulation->table( 'action.circulation' );
12         action::circulation->sequence( 'money.billable_xact_id_seq' );
13
14         #---------------------------------------------------------------------
15         package action::survey;
16         
17         action::survey->table( 'action.survey' );
18         action::survey->sequence( 'action.survey_id_seq' );
19         
20         #---------------------------------------------------------------------
21         package action::survey_question;
22         
23         action::survey_question->table( 'action.survey_question' );
24         action::survey_question->sequence( 'action.survey_question_id_seq' );
25         
26         #---------------------------------------------------------------------
27         package action::survey_answer;
28         
29         action::survey_answer->table( 'action.survey_answer' );
30         action::survey_answer->sequence( 'action.survey_answer_id_seq' );
31         
32         #---------------------------------------------------------------------
33         package action::survey_response;
34         
35         action::survey_response->table( 'action.survey_response' );
36         action::survey_response->sequence( 'action.survey_response_id_seq' );
37         
38         #---------------------------------------------------------------------
39         package config::copy_status;
40         
41         config::copy_status->table( 'config.copy_status' );
42         config::copy_status->sequence( 'config.copy_status_id_seq' );
43
44         #---------------------------------------------------------------------
45         package config::rules::circ_duration;
46         
47         config::rules::circ_duration->table( 'config.rule_circ_duration' );
48         config::rules::circ_duration->sequence( 'config.rule_circ_duration_id_seq' );
49         
50         #---------------------------------------------------------------------
51         package config::rules::age_hold_protect;
52         
53         config::rules::age_hold_protect->table( 'config.rule_age_hold_protect' );
54         config::rules::age_hold_protect->sequence( 'config.rule_age_hold_protect_id_seq' );
55         
56         #---------------------------------------------------------------------
57         package config::rules::max_fine;
58         
59         config::rules::max_fine->table( 'config.rule_max_fine' );
60         config::rules::max_fine->sequence( 'config.rule_max_fine_id_seq' );
61         
62         #---------------------------------------------------------------------
63         package config::rules::recuring_fine;
64         
65         config::rules::recuring_fine->table( 'config.rule_recuring_fine' );
66         config::rules::recuring_fine->sequence( 'config.rule_recuring_fine_id_seq' );
67         
68         #---------------------------------------------------------------------
69         package config::net_access_level;
70         
71         config::net_access_level->table( 'config.net_access_level' );
72         config::net_access_level->sequence( 'config.net_access_level_id_seq' );
73         
74         #---------------------------------------------------------------------
75         package config::standing;
76         
77         config::standing->table( 'config.standing' );
78         config::standing->sequence( 'config.standing_id_seq' );
79         
80         #---------------------------------------------------------------------
81         package config::metabib_field;
82         
83         config::metabib_field->table( 'config.metabib_field' );
84         config::metabib_field->sequence( 'config.metabib_field_id_seq' );
85         
86         #---------------------------------------------------------------------
87         package config::bib_source;
88         
89         config::bib_source->table( 'config.bib_source' );
90         config::bib_source->sequence( 'config.bib_source_id_seq' );
91         
92         #---------------------------------------------------------------------
93         package config::identification_type;
94         
95         config::identification_type->table( 'config.identification_type' );
96         config::identification_type->sequence( 'config.identification_type_id_seq' );
97         
98         #---------------------------------------------------------------------
99         package asset::call_number_note;
100         
101         asset::call_number_note->table( 'asset.call_number_note' );
102         asset::call_number_note->sequence( 'asset.call_number_note_id_seq' );
103         
104         #---------------------------------------------------------------------
105         package asset::copy_note;
106         
107         asset::copy_note->table( 'asset.copy_note' );
108         asset::copy_note->sequence( 'asset.copy_note_id_seq' );
109
110         #---------------------------------------------------------------------
111         package asset::call_number;
112         
113         asset::call_number->table( 'asset.call_number' );
114         asset::call_number->sequence( 'asset.call_number_id_seq' );
115         
116         #---------------------------------------------------------------------
117         package asset::copy_location;
118         
119         asset::copy_location->table( 'asset.copy_location' );
120         asset::copy_location->sequence( 'asset.copy_location_id_seq' );
121
122         #---------------------------------------------------------------------
123         package asset::copy;
124         
125         asset::copy->table( 'asset.copy' );
126         asset::copy->sequence( 'asset.copy_id_seq' );
127
128         #---------------------------------------------------------------------
129         package asset::stat_cat;
130         
131         asset::stat_cat->table( 'asset.stat_cat' );
132         asset::stat_cat->sequence( 'asset.stat_cat_id_seq' );
133         
134         #---------------------------------------------------------------------
135         package asset::stat_cat_entry;
136         
137         asset::stat_cat_entry->table( 'asset.stat_cat_entry' );
138         asset::stat_cat_entry->sequence( 'asset.stat_cat_entry_id_seq' );
139         
140         #---------------------------------------------------------------------
141         package asset::stat_cat_entry_copy_map;
142         
143         asset::stat_cat_entry_copy_map->table( 'asset.stat_cat_entry_copy_map' );
144         asset::stat_cat_entry_copy_map->sequence( 'asset.stat_cat_entry_copy_map_id_seq' );
145         
146         #---------------------------------------------------------------------
147         package biblio::record_entry;
148         
149         biblio::record_entry->table( 'biblio.record_entry' );
150         biblio::record_entry->sequence( 'biblio.record_entry_id_seq' );
151
152         #---------------------------------------------------------------------
153         #package biblio::record_marc;
154         #
155         #biblio::record_marc->table( 'biblio.record_marc' );
156         #biblio::record_marc->sequence( 'biblio.record_marc_id_seq' );
157         #
158         #---------------------------------------------------------------------
159         package biblio::record_note;
160         
161         biblio::record_note->table( 'biblio.record_note' );
162         biblio::record_note->sequence( 'biblio.record_note_id_seq' );
163         
164         #---------------------------------------------------------------------
165         package actor::user;
166         
167         actor::user->table( 'actor.usr' );
168         actor::user->sequence( 'actor.usr_id_seq' );
169
170         #---------------------------------------------------------------------
171         package actor::user_address;
172         
173         actor::user_address->table( 'actor.usr_address' );
174         actor::user_address->sequence( 'actor.usr_address_id_seq' );
175
176         #---------------------------------------------------------------------
177         package actor::org_address;
178         
179         actor::org_address->table( 'actor.org_address' );
180         actor::org_address->sequence( 'actor.org_address_id_seq' );
181         
182         #---------------------------------------------------------------------
183         package actor::profile;
184         
185         actor::profile->table( 'actor.profile' );
186         actor::profile->sequence( 'actor.profile_id_seq' );
187         
188         #---------------------------------------------------------------------
189         package actor::org_unit_type;
190         
191         actor::org_unit_type->table( 'actor.org_unit_type' );
192         actor::org_unit_type->sequence( 'actor.org_unit_type_id_seq' );
193
194         #---------------------------------------------------------------------
195         package actor::org_unit;
196         
197         actor::org_unit->table( 'actor.org_unit' );
198         actor::org_unit->sequence( 'actor.org_unit_id_seq' );
199
200         #---------------------------------------------------------------------
201         package actor::stat_cat;
202         
203         actor::stat_cat->table( 'actor.stat_cat' );
204         actor::stat_cat->sequence( 'actor.stat_cat_id_seq' );
205         
206         #---------------------------------------------------------------------
207         package actor::stat_cat_entry;
208         
209         actor::stat_cat_entry->table( 'actor.stat_cat_entry' );
210         actor::stat_cat_entry->sequence( 'actor.stat_cat_entry_id_seq' );
211         
212         #---------------------------------------------------------------------
213         package actor::stat_cat_entry_user_map;
214         
215         actor::stat_cat_entry_user_map->table( 'actor.stat_cat_entry_usr_map' );
216         actor::stat_cat_entry_user_map->sequence( 'actor.stat_cat_entry_usr_map_id_seq' );
217         
218         #---------------------------------------------------------------------
219         package actor::card;
220         
221         actor::card->table( 'actor.card' );
222         actor::card->sequence( 'actor.card_id_seq' );
223
224         #---------------------------------------------------------------------
225
226         #-------------------------------------------------------------------------------
227         package metabib::metarecord;
228
229         metabib::metarecord->table( 'metabib.metarecord' );
230         metabib::metarecord->sequence( 'metabib.metarecord_id_seq' );
231
232         OpenILS::Application::Storage->register_method(
233                 api_name        => 'open-ils.storage.direct.metabib.metarecord.batch.create',
234                 method          => 'copy_create',
235                 api_level       => 1,
236                 'package'       => 'OpenILS::Application::Storage',
237                 cdbi            => 'metabib::metarecord',
238         );
239
240
241         #-------------------------------------------------------------------------------
242
243         #-------------------------------------------------------------------------------
244         package metabib::title_field_entry;
245
246         metabib::title_field_entry->table( 'metabib.title_field_entry' );
247         metabib::title_field_entry->sequence( 'metabib.title_field_entry_id_seq' );
248         metabib::title_field_entry->columns( 'FTS' => 'index_vector' );
249
250 #       metabib::title_field_entry->add_trigger(
251 #               before_create => \&OpenILS::Application::Storage::Driver::Pg::tsearch2_trigger
252 #       );
253 #       metabib::title_field_entry->add_trigger(
254 #               before_update => \&OpenILS::Application::Storage::Driver::Pg::tsearch2_trigger
255 #       );
256
257         OpenILS::Application::Storage->register_method(
258                 api_name        => 'open-ils.storage.direct.metabib.title_field_entry.batch.create',
259                 method          => 'copy_create',
260                 api_level       => 1,
261                 'package'       => 'OpenILS::Application::Storage',
262                 cdbi            => 'metabib::title_field_entry',
263         );
264
265         #-------------------------------------------------------------------------------
266
267         #-------------------------------------------------------------------------------
268         package metabib::author_field_entry;
269
270         metabib::author_field_entry->table( 'metabib.author_field_entry' );
271         metabib::author_field_entry->sequence( 'metabib.author_field_entry_id_seq' );
272         metabib::author_field_entry->columns( 'FTS' => 'index_vector' );
273
274         OpenILS::Application::Storage->register_method(
275                 api_name        => 'open-ils.storage.direct.metabib.author_field_entry.batch.create',
276                 method          => 'copy_create',
277                 api_level       => 1,
278                 'package'       => 'OpenILS::Application::Storage',
279                 cdbi            => 'metabib::author_field_entry',
280         );
281
282         #-------------------------------------------------------------------------------
283
284         #-------------------------------------------------------------------------------
285         package metabib::subject_field_entry;
286
287         metabib::subject_field_entry->table( 'metabib.subject_field_entry' );
288         metabib::subject_field_entry->sequence( 'metabib.subject_field_entry_id_seq' );
289         metabib::subject_field_entry->columns( 'FTS' => 'index_vector' );
290
291         OpenILS::Application::Storage->register_method(
292                 api_name        => 'open-ils.storage.direct.metabib.subject_field_entry.batch.create',
293                 method          => 'copy_create',
294                 api_level       => 1,
295                 'package'       => 'OpenILS::Application::Storage',
296                 cdbi            => 'metabib::subject_field_entry',
297         );
298
299         #-------------------------------------------------------------------------------
300
301         #-------------------------------------------------------------------------------
302         package metabib::keyword_field_entry;
303
304         metabib::keyword_field_entry->table( 'metabib.keyword_field_entry' );
305         metabib::keyword_field_entry->sequence( 'metabib.keyword_field_entry_id_seq' );
306         metabib::keyword_field_entry->columns( 'FTS' => 'index_vector' );
307
308         OpenILS::Application::Storage->register_method(
309                 api_name        => 'open-ils.storage.direct.metabib.keyword_field_entry.batch.create',
310                 method          => 'copy_create',
311                 api_level       => 1,
312                 'package'       => 'OpenILS::Application::Storage',
313                 cdbi            => 'metabib::keyword_field_entry',
314         );
315
316         #-------------------------------------------------------------------------------
317         package metabib::series_field_entry;
318
319         metabib::series_field_entry->table( 'metabib.series_field_entry' );
320         metabib::series_field_entry->sequence( 'metabib.series_field_entry_id_seq' );
321         metabib::series_field_entry->columns( 'FTS' => 'index_vector' );
322
323         OpenILS::Application::Storage->register_method(
324                 api_name        => 'open-ils.storage.direct.metabib.series_field_entry.batch.create',
325                 method          => 'copy_create',
326                 api_level       => 1,
327                 'package'       => 'OpenILS::Application::Storage',
328                 cdbi            => 'metabib::series_field_entry',
329         );
330
331         #-------------------------------------------------------------------------------
332
333         #-------------------------------------------------------------------------------
334         #package metabib::title_field_entry_source_map;
335
336         #metabib::title_field_entry_source_map->table( 'metabib.title_field_entry_source_map' );
337
338         #-------------------------------------------------------------------------------
339
340         #-------------------------------------------------------------------------------
341         #package metabib::author_field_entry_source_map;
342
343         #metabib::author_field_entry_source_map->table( 'metabib.author_field_entry_source_map' );
344
345         #-------------------------------------------------------------------------------
346
347         #-------------------------------------------------------------------------------
348         #package metabib::subject_field_entry_source_map;
349
350         #metabib::subject_field_entry_source_map->table( 'metabib.subject_field_entry_source_map' );
351
352         #-------------------------------------------------------------------------------
353
354         #-------------------------------------------------------------------------------
355         #package metabib::keyword_field_entry_source_map;
356
357         #metabib::keyword_field_entry_source_map->table( 'metabib.keyword_field_entry_source_map' );
358
359         #-------------------------------------------------------------------------------
360
361         #-------------------------------------------------------------------------------
362         package metabib::metarecord_source_map;
363
364         metabib::metarecord_source_map->table( 'metabib.metarecord_source_map' );
365         OpenILS::Application::Storage->register_method(
366                 api_name        => 'open-ils.storage.direct.metabib.metarecord_source_map.batch.create',
367                 method          => 'copy_create',
368                 api_level       => 1,
369                 'package'       => 'OpenILS::Application::Storage',
370                 cdbi            => 'metabib::metarecord_source_map',
371         );
372
373
374         #-------------------------------------------------------------------------------
375         package metabib::record_descriptor;
376
377         metabib::record_descriptor->table( 'metabib.rec_descriptor' );
378         metabib::record_descriptor->sequence( 'metabib.rec_descriptor_id_seq' );
379
380         OpenILS::Application::Storage->register_method(
381                 api_name        => 'open-ils.storage.direct.metabib.record_descriptor.batch.create',
382                 method          => 'copy_create',
383                 api_level       => 1,
384                 'package'       => 'OpenILS::Application::Storage',
385                 cdbi            => 'metabib::record_descriptor',
386         );
387
388         #-------------------------------------------------------------------------------
389
390
391         #-------------------------------------------------------------------------------
392         package metabib::full_rec;
393
394         metabib::full_rec->table( 'metabib.full_rec' );
395         metabib::full_rec->sequence( 'metabib.full_rec_id_seq' );
396         metabib::full_rec->columns( 'FTS' => 'index_vector' );
397
398         OpenILS::Application::Storage->register_method(
399                 api_name        => 'open-ils.storage.direct.metabib.full_rec.batch.create',
400                 method          => 'copy_create',
401                 api_level       => 1,
402                 'package'       => 'OpenILS::Application::Storage',
403                 cdbi            => 'metabib::full_rec',
404         );
405
406
407         #-------------------------------------------------------------------------------
408
409         package permission::perm_list;
410
411         permission::perm_list->sequence( 'permission.perm_list_id_seq' );
412         permission::perm_list->table('permission.perm_list');
413
414         #-------------------------------------------------------------------------------
415
416         package permission::grp_tree;
417
418         permission::grp_tree->sequence( 'permission.grp_tree_id_seq' );
419         permission::grp_tree->table('permission.grp_tree');
420
421         #-------------------------------------------------------------------------------
422
423         package permission::usr_grp_map;
424
425         permission::usr_grp_map->sequence( 'permission.usr_grp_map_id_seq' );
426         permission::usr_grp_map->table('permission.usr_grp_map');
427
428         #-------------------------------------------------------------------------------
429
430         package permission::usr_perm_map;
431
432         permission::usr_perm_map->sequence( 'permission.usr_perm_map_id_seq' );
433         permission::usr_perm_map->table('permission.usr_perm_map');
434
435         #-------------------------------------------------------------------------------
436
437         package permission::grp_perm_map;
438
439         permission::grp_perm_map->sequence( 'permission.grp_perm_map_id_seq' );
440         permission::grp_perm_map->table('permission.grp_perm_map');
441
442         #-------------------------------------------------------------------------------
443
444         package action::hold_request;
445
446         action::hold_request->sequence( 'action.hold_request_id_seq' );
447         action::hold_request->table('action.hold_request');
448
449         #-------------------------------------------------------------------------------
450
451         package action::hold_notification;
452
453         action::hold_notification->sequence( 'action.hold_notification_id_seq' );
454         action::hold_notification->table('action.hold_notification');
455
456         #-------------------------------------------------------------------------------
457
458         package action::hold_copy_map;
459
460         action::hold_copy_map->sequence( 'action.hold_copy_map_id_seq' );
461         action::hold_copy_map->table('action.hold_copy_map');
462
463         #-------------------------------------------------------------------------------
464
465         package action::hold_transit_copy;
466
467         action::hold_transit_copy->sequence( 'action.hold_transit_copy_id_seq' );
468         action::hold_transit_copy->table('action.hold_transit_copy');
469
470         #-------------------------------------------------------------------------------
471
472
473 }
474
475 1;