7a0886e7691fd0ea524e0df1bce85608a944439d
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / Driver / Pg / dbi.pm
1 {
2         #---------------------------------------------------------------------
3         package money::billable_transaction;
4         
5         money::billable_transaction->table( 'money.billable_xact' );
6         money::billable_transaction->sequence( 'money.billable_xact_id_seq' );
7
8         #---------------------------------------------------------------------
9         package money::billing;
10         
11         money::billing->table( 'money.billing' );
12         money::billing->sequence( 'money.billing_id_seq' );
13
14         #---------------------------------------------------------------------
15         package money::payment;
16         
17         money::payment->table( 'money.payment_view' );
18
19         #---------------------------------------------------------------------
20         package money::cash_payment;
21         
22         money::cash_payment->table( 'money.cash_payment' );
23         money::cash_payment->sequence( 'money.payment_id_seq' );
24
25         #---------------------------------------------------------------------
26         package money::check_payment;
27         
28         money::check_payment->table( 'money.check_payment' );
29         money::check_payment->sequence( 'money.payment_id_seq' );
30
31         #---------------------------------------------------------------------
32         package money::credit_payment;
33         
34         money::credit_payment->table( 'money.credit_payment' );
35         money::credit_payment->sequence( 'money.payment_id_seq' );
36
37         #---------------------------------------------------------------------
38         package money::credit_card_payment;
39         
40         money::credit_card_payment->table( 'money.credit_card_payment' );
41         money::credit_card_payment->sequence( 'money.payment_id_seq' );
42
43         #---------------------------------------------------------------------
44         package money::work_payment;
45         
46         money::work_payment->table( 'money.work_payment' );
47         money::work_payment->sequence( 'money.payment_id_seq' );
48
49         #---------------------------------------------------------------------
50         package money::forgive_payment;
51         
52         money::forgive_payment->table( 'money.forgive_payment' );
53         money::forgive_payment->sequence( 'money.payment_id_seq' );
54
55         #---------------------------------------------------------------------
56         package money::open_billable_transaction_summary;
57         
58         money::open_billable_transaction_summary->table( 'money.open_billable_xact_summary' );
59
60         #---------------------------------------------------------------------
61         package money::billable_transaction_summary;
62         
63         money::billable_transaction_summary->table( 'money.billable_xact_summary' );
64
65         #---------------------------------------------------------------------
66         package money::open_user_summary;
67         
68         money::open_user_summary->table( 'money.open_usr_summary' );
69
70         #---------------------------------------------------------------------
71         package money::user_summary;
72         
73         money::user_summary->table( 'money.usr_summary' );
74
75         #---------------------------------------------------------------------
76         package money::open_user_circulation_summary;
77         
78         money::open_user_circulation_summary->table( 'money.open_usr_circulation_summary' );
79
80         #---------------------------------------------------------------------
81         package money::user_circulation_summary;
82         
83         money::user_circulation_summary->table( 'money.usr_circulation_summary' );
84
85         #---------------------------------------------------------------------
86         package action::circulation;
87         
88         action::circulation->table( 'action.circulation' );
89         action::circulation->sequence( 'money.billable_xact_id_seq' );
90
91         #---------------------------------------------------------------------
92         package action::open_circulation;
93         
94         action::open_circulation->table( 'action.open_circulation' );
95
96         #---------------------------------------------------------------------
97         package action::survey;
98         
99         action::survey->table( 'action.survey' );
100         action::survey->sequence( 'action.survey_id_seq' );
101         
102         #---------------------------------------------------------------------
103         package action::survey_question;
104         
105         action::survey_question->table( 'action.survey_question' );
106         action::survey_question->sequence( 'action.survey_question_id_seq' );
107         
108         #---------------------------------------------------------------------
109         package action::survey_answer;
110         
111         action::survey_answer->table( 'action.survey_answer' );
112         action::survey_answer->sequence( 'action.survey_answer_id_seq' );
113         
114         #---------------------------------------------------------------------
115         package action::survey_response;
116         
117         action::survey_response->table( 'action.survey_response' );
118         action::survey_response->sequence( 'action.survey_response_id_seq' );
119         
120         #---------------------------------------------------------------------
121         package config::copy_status;
122         
123         config::copy_status->table( 'config.copy_status' );
124         config::copy_status->sequence( 'config.copy_status_id_seq' );
125
126         #---------------------------------------------------------------------
127         package config::rules::circ_duration;
128         
129         config::rules::circ_duration->table( 'config.rule_circ_duration' );
130         config::rules::circ_duration->sequence( 'config.rule_circ_duration_id_seq' );
131         
132         #---------------------------------------------------------------------
133         package config::rules::age_hold_protect;
134         
135         config::rules::age_hold_protect->table( 'config.rule_age_hold_protect' );
136         config::rules::age_hold_protect->sequence( 'config.rule_age_hold_protect_id_seq' );
137         
138         #---------------------------------------------------------------------
139         package config::rules::max_fine;
140         
141         config::rules::max_fine->table( 'config.rule_max_fine' );
142         config::rules::max_fine->sequence( 'config.rule_max_fine_id_seq' );
143         
144         #---------------------------------------------------------------------
145         package config::rules::recuring_fine;
146         
147         config::rules::recuring_fine->table( 'config.rule_recuring_fine' );
148         config::rules::recuring_fine->sequence( 'config.rule_recuring_fine_id_seq' );
149         
150         #---------------------------------------------------------------------
151         package config::net_access_level;
152         
153         config::net_access_level->table( 'config.net_access_level' );
154         config::net_access_level->sequence( 'config.net_access_level_id_seq' );
155         
156         #---------------------------------------------------------------------
157         package config::standing;
158         
159         config::standing->table( 'config.standing' );
160         config::standing->sequence( 'config.standing_id_seq' );
161         
162         #---------------------------------------------------------------------
163         package config::metabib_field;
164         
165         config::metabib_field->table( 'config.metabib_field' );
166         config::metabib_field->sequence( 'config.metabib_field_id_seq' );
167         
168         #---------------------------------------------------------------------
169         package config::bib_source;
170         
171         config::bib_source->table( 'config.bib_source' );
172         config::bib_source->sequence( 'config.bib_source_id_seq' );
173         
174         #---------------------------------------------------------------------
175         package config::identification_type;
176         
177         config::identification_type->table( 'config.identification_type' );
178         config::identification_type->sequence( 'config.identification_type_id_seq' );
179         
180         #---------------------------------------------------------------------
181         package asset::call_number_note;
182         
183         asset::call_number_note->table( 'asset.call_number_note' );
184         asset::call_number_note->sequence( 'asset.call_number_note_id_seq' );
185         
186         #---------------------------------------------------------------------
187         package asset::copy_note;
188         
189         asset::copy_note->table( 'asset.copy_note' );
190         asset::copy_note->sequence( 'asset.copy_note_id_seq' );
191
192         #---------------------------------------------------------------------
193         package asset::call_number;
194         
195         asset::call_number->table( 'asset.call_number' );
196         asset::call_number->sequence( 'asset.call_number_id_seq' );
197         
198         #---------------------------------------------------------------------
199         package asset::copy_location;
200         
201         asset::copy_location->table( 'asset.copy_location' );
202         asset::copy_location->sequence( 'asset.copy_location_id_seq' );
203
204         #---------------------------------------------------------------------
205         package asset::copy;
206         
207         asset::copy->table( 'asset.copy' );
208         asset::copy->sequence( 'asset.copy_id_seq' );
209
210         #---------------------------------------------------------------------
211         package asset::stat_cat;
212         
213         asset::stat_cat->table( 'asset.stat_cat' );
214         asset::stat_cat->sequence( 'asset.stat_cat_id_seq' );
215         
216         #---------------------------------------------------------------------
217         package asset::stat_cat_entry;
218         
219         asset::stat_cat_entry->table( 'asset.stat_cat_entry' );
220         asset::stat_cat_entry->sequence( 'asset.stat_cat_entry_id_seq' );
221         
222         #---------------------------------------------------------------------
223         package asset::stat_cat_entry_copy_map;
224         
225         asset::stat_cat_entry_copy_map->table( 'asset.stat_cat_entry_copy_map' );
226         asset::stat_cat_entry_copy_map->sequence( 'asset.stat_cat_entry_copy_map_id_seq' );
227         
228         #---------------------------------------------------------------------
229         package authority::record_entry;
230         
231         authority::record_entry->table( 'authority.record_entry' );
232         authority::record_entry->sequence( 'authority.record_entry_id_seq' );
233
234         #---------------------------------------------------------------------
235         package biblio::record_entry;
236         
237         biblio::record_entry->table( 'biblio.record_entry' );
238         biblio::record_entry->sequence( 'biblio.record_entry_id_seq' );
239
240         #---------------------------------------------------------------------
241         #package biblio::record_marc;
242         #
243         #biblio::record_marc->table( 'biblio.record_marc' );
244         #biblio::record_marc->sequence( 'biblio.record_marc_id_seq' );
245         #
246         #---------------------------------------------------------------------
247         package authority::record_note;
248         
249         authority::record_note->table( 'authority.record_note' );
250         authority::record_note->sequence( 'authority.record_note_id_seq' );
251
252         #---------------------------------------------------------------------
253         package biblio::record_note;
254         
255         biblio::record_note->table( 'biblio.record_note' );
256         biblio::record_note->sequence( 'biblio.record_note_id_seq' );
257         
258         #---------------------------------------------------------------------
259         package actor::user;
260         
261         actor::user->table( 'actor.usr' );
262         actor::user->sequence( 'actor.usr_id_seq' );
263
264         #---------------------------------------------------------------------
265         package actor::org_unit_setting;
266         
267         actor::org_unit_setting->table( 'actor.org_unit_setting' );
268         actor::org_unit_setting->sequence( 'actor.org_unit_setting_id_seq' );
269
270         #---------------------------------------------------------------------
271         package actor::user_setting;
272         
273         actor::user_setting->table( 'actor.usr_setting' );
274         actor::user_setting->sequence( 'actor.usr_setting_id_seq' );
275
276         #---------------------------------------------------------------------
277         package actor::user_address;
278         
279         actor::user_address->table( 'actor.usr_address' );
280         actor::user_address->sequence( 'actor.usr_address_id_seq' );
281
282         #---------------------------------------------------------------------
283         package actor::org_address;
284         
285         actor::org_address->table( 'actor.org_address' );
286         actor::org_address->sequence( 'actor.org_address_id_seq' );
287         
288         #---------------------------------------------------------------------
289         package actor::profile;
290         
291         actor::profile->table( 'actor.profile' );
292         actor::profile->sequence( 'actor.profile_id_seq' );
293         
294         #---------------------------------------------------------------------
295         package actor::org_unit_type;
296         
297         actor::org_unit_type->table( 'actor.org_unit_type' );
298         actor::org_unit_type->sequence( 'actor.org_unit_type_id_seq' );
299
300         #---------------------------------------------------------------------
301         package actor::org_unit;
302         
303         actor::org_unit->table( 'actor.org_unit' );
304         actor::org_unit->sequence( 'actor.org_unit_id_seq' );
305
306         #---------------------------------------------------------------------
307         package actor::stat_cat;
308         
309         actor::stat_cat->table( 'actor.stat_cat' );
310         actor::stat_cat->sequence( 'actor.stat_cat_id_seq' );
311         
312         #---------------------------------------------------------------------
313         package actor::stat_cat_entry;
314         
315         actor::stat_cat_entry->table( 'actor.stat_cat_entry' );
316         actor::stat_cat_entry->sequence( 'actor.stat_cat_entry_id_seq' );
317         
318         #---------------------------------------------------------------------
319         package actor::stat_cat_entry_user_map;
320         
321         actor::stat_cat_entry_user_map->table( 'actor.stat_cat_entry_usr_map' );
322         actor::stat_cat_entry_user_map->sequence( 'actor.stat_cat_entry_usr_map_id_seq' );
323         
324         #---------------------------------------------------------------------
325         package actor::card;
326         
327         actor::card->table( 'actor.card' );
328         actor::card->sequence( 'actor.card_id_seq' );
329
330         #---------------------------------------------------------------------
331
332         #-------------------------------------------------------------------------------
333         package metabib::metarecord;
334
335         metabib::metarecord->table( 'metabib.metarecord' );
336         metabib::metarecord->sequence( 'metabib.metarecord_id_seq' );
337
338         OpenILS::Application::Storage->register_method(
339                 api_name        => 'open-ils.storage.direct.metabib.metarecord.batch.create',
340                 method          => 'copy_create',
341                 api_level       => 1,
342                 'package'       => 'OpenILS::Application::Storage',
343                 cdbi            => 'metabib::metarecord',
344         );
345
346
347         #-------------------------------------------------------------------------------
348
349         #-------------------------------------------------------------------------------
350         package metabib::title_field_entry;
351
352         metabib::title_field_entry->table( 'metabib.title_field_entry' );
353         metabib::title_field_entry->sequence( 'metabib.title_field_entry_id_seq' );
354         metabib::title_field_entry->columns( 'FTS' => 'index_vector' );
355
356 #       metabib::title_field_entry->add_trigger(
357 #               before_create => \&OpenILS::Application::Storage::Driver::Pg::tsearch2_trigger
358 #       );
359 #       metabib::title_field_entry->add_trigger(
360 #               before_update => \&OpenILS::Application::Storage::Driver::Pg::tsearch2_trigger
361 #       );
362
363         OpenILS::Application::Storage->register_method(
364                 api_name        => 'open-ils.storage.direct.metabib.title_field_entry.batch.create',
365                 method          => 'copy_create',
366                 api_level       => 1,
367                 'package'       => 'OpenILS::Application::Storage',
368                 cdbi            => 'metabib::title_field_entry',
369         );
370
371         #-------------------------------------------------------------------------------
372
373         #-------------------------------------------------------------------------------
374         package metabib::author_field_entry;
375
376         metabib::author_field_entry->table( 'metabib.author_field_entry' );
377         metabib::author_field_entry->sequence( 'metabib.author_field_entry_id_seq' );
378         metabib::author_field_entry->columns( 'FTS' => 'index_vector' );
379
380         OpenILS::Application::Storage->register_method(
381                 api_name        => 'open-ils.storage.direct.metabib.author_field_entry.batch.create',
382                 method          => 'copy_create',
383                 api_level       => 1,
384                 'package'       => 'OpenILS::Application::Storage',
385                 cdbi            => 'metabib::author_field_entry',
386         );
387
388         #-------------------------------------------------------------------------------
389
390         #-------------------------------------------------------------------------------
391         package metabib::subject_field_entry;
392
393         metabib::subject_field_entry->table( 'metabib.subject_field_entry' );
394         metabib::subject_field_entry->sequence( 'metabib.subject_field_entry_id_seq' );
395         metabib::subject_field_entry->columns( 'FTS' => 'index_vector' );
396
397         OpenILS::Application::Storage->register_method(
398                 api_name        => 'open-ils.storage.direct.metabib.subject_field_entry.batch.create',
399                 method          => 'copy_create',
400                 api_level       => 1,
401                 'package'       => 'OpenILS::Application::Storage',
402                 cdbi            => 'metabib::subject_field_entry',
403         );
404
405         #-------------------------------------------------------------------------------
406
407         #-------------------------------------------------------------------------------
408         package metabib::keyword_field_entry;
409
410         metabib::keyword_field_entry->table( 'metabib.keyword_field_entry' );
411         metabib::keyword_field_entry->sequence( 'metabib.keyword_field_entry_id_seq' );
412         metabib::keyword_field_entry->columns( 'FTS' => 'index_vector' );
413
414         OpenILS::Application::Storage->register_method(
415                 api_name        => 'open-ils.storage.direct.metabib.keyword_field_entry.batch.create',
416                 method          => 'copy_create',
417                 api_level       => 1,
418                 'package'       => 'OpenILS::Application::Storage',
419                 cdbi            => 'metabib::keyword_field_entry',
420         );
421
422         #-------------------------------------------------------------------------------
423         package metabib::series_field_entry;
424
425         metabib::series_field_entry->table( 'metabib.series_field_entry' );
426         metabib::series_field_entry->sequence( 'metabib.series_field_entry_id_seq' );
427         metabib::series_field_entry->columns( 'FTS' => 'index_vector' );
428
429         OpenILS::Application::Storage->register_method(
430                 api_name        => 'open-ils.storage.direct.metabib.series_field_entry.batch.create',
431                 method          => 'copy_create',
432                 api_level       => 1,
433                 'package'       => 'OpenILS::Application::Storage',
434                 cdbi            => 'metabib::series_field_entry',
435         );
436
437         #-------------------------------------------------------------------------------
438
439         #-------------------------------------------------------------------------------
440         #package metabib::title_field_entry_source_map;
441
442         #metabib::title_field_entry_source_map->table( 'metabib.title_field_entry_source_map' );
443
444         #-------------------------------------------------------------------------------
445
446         #-------------------------------------------------------------------------------
447         #package metabib::author_field_entry_source_map;
448
449         #metabib::author_field_entry_source_map->table( 'metabib.author_field_entry_source_map' );
450
451         #-------------------------------------------------------------------------------
452
453         #-------------------------------------------------------------------------------
454         #package metabib::subject_field_entry_source_map;
455
456         #metabib::subject_field_entry_source_map->table( 'metabib.subject_field_entry_source_map' );
457
458         #-------------------------------------------------------------------------------
459
460         #-------------------------------------------------------------------------------
461         #package metabib::keyword_field_entry_source_map;
462
463         #metabib::keyword_field_entry_source_map->table( 'metabib.keyword_field_entry_source_map' );
464
465         #-------------------------------------------------------------------------------
466
467         #-------------------------------------------------------------------------------
468         package metabib::metarecord_source_map;
469
470         metabib::metarecord_source_map->table( 'metabib.metarecord_source_map' );
471         OpenILS::Application::Storage->register_method(
472                 api_name        => 'open-ils.storage.direct.metabib.metarecord_source_map.batch.create',
473                 method          => 'copy_create',
474                 api_level       => 1,
475                 'package'       => 'OpenILS::Application::Storage',
476                 cdbi            => 'metabib::metarecord_source_map',
477         );
478
479
480         #-------------------------------------------------------------------------------
481         package authority::record_descriptor;
482
483         authority::record_descriptor->table( 'authority.rec_descriptor' );
484         authority::record_descriptor->sequence( 'authority.rec_descriptor_id_seq' );
485
486         OpenILS::Application::Storage->register_method(
487                 api_name        => 'open-ils.storage.direct.authority.record_descriptor.batch.create',
488                 method          => 'copy_create',
489                 api_level       => 1,
490                 'package'       => 'OpenILS::Application::Storage',
491                 cdbi            => 'authority::record_descriptor',
492         );
493
494         #-------------------------------------------------------------------------------
495         package metabib::record_descriptor;
496
497         metabib::record_descriptor->table( 'metabib.rec_descriptor' );
498         metabib::record_descriptor->sequence( 'metabib.rec_descriptor_id_seq' );
499
500         OpenILS::Application::Storage->register_method(
501                 api_name        => 'open-ils.storage.direct.metabib.record_descriptor.batch.create',
502                 method          => 'copy_create',
503                 api_level       => 1,
504                 'package'       => 'OpenILS::Application::Storage',
505                 cdbi            => 'metabib::record_descriptor',
506         );
507
508         #-------------------------------------------------------------------------------
509
510
511         #-------------------------------------------------------------------------------
512         package authority::full_rec;
513
514         authority::full_rec->table( 'authority.full_rec' );
515         authority::full_rec->sequence( 'authority.full_rec_id_seq' );
516         authority::full_rec->columns( 'FTS' => 'index_vector' );
517
518         OpenILS::Application::Storage->register_method(
519                 api_name        => 'open-ils.storage.direct.authority.full_rec.batch.create',
520                 method          => 'copy_create',
521                 api_level       => 1,
522                 'package'       => 'OpenILS::Application::Storage',
523                 cdbi            => 'authority::full_rec',
524         );
525
526
527         #-------------------------------------------------------------------------------
528         package metabib::full_rec;
529
530         metabib::full_rec->table( 'metabib.full_rec' );
531         metabib::full_rec->sequence( 'metabib.full_rec_id_seq' );
532         metabib::full_rec->columns( 'FTS' => 'index_vector' );
533
534         OpenILS::Application::Storage->register_method(
535                 api_name        => 'open-ils.storage.direct.metabib.full_rec.batch.create',
536                 method          => 'copy_create',
537                 api_level       => 1,
538                 'package'       => 'OpenILS::Application::Storage',
539                 cdbi            => 'metabib::full_rec',
540         );
541
542
543         #-------------------------------------------------------------------------------
544
545         package permission::perm_list;
546
547         permission::perm_list->sequence( 'permission.perm_list_id_seq' );
548         permission::perm_list->table('permission.perm_list');
549
550         #-------------------------------------------------------------------------------
551
552         package permission::grp_tree;
553
554         permission::grp_tree->sequence( 'permission.grp_tree_id_seq' );
555         permission::grp_tree->table('permission.grp_tree');
556
557         #-------------------------------------------------------------------------------
558
559         package permission::usr_grp_map;
560
561         permission::usr_grp_map->sequence( 'permission.usr_grp_map_id_seq' );
562         permission::usr_grp_map->table('permission.usr_grp_map');
563
564         #-------------------------------------------------------------------------------
565
566         package permission::usr_perm_map;
567
568         permission::usr_perm_map->sequence( 'permission.usr_perm_map_id_seq' );
569         permission::usr_perm_map->table('permission.usr_perm_map');
570
571         #-------------------------------------------------------------------------------
572
573         package permission::grp_perm_map;
574
575         permission::grp_perm_map->sequence( 'permission.grp_perm_map_id_seq' );
576         permission::grp_perm_map->table('permission.grp_perm_map');
577
578         #-------------------------------------------------------------------------------
579
580         package action::hold_request;
581
582         action::hold_request->sequence( 'action.hold_request_id_seq' );
583         action::hold_request->table('action.hold_request');
584
585         #-------------------------------------------------------------------------------
586
587         package action::hold_notification;
588
589         action::hold_notification->sequence( 'action.hold_notification_id_seq' );
590         action::hold_notification->table('action.hold_notification');
591
592         #-------------------------------------------------------------------------------
593
594         package action::hold_copy_map;
595
596         action::hold_copy_map->sequence( 'action.hold_copy_map_id_seq' );
597         action::hold_copy_map->table('action.hold_copy_map');
598
599         #-------------------------------------------------------------------------------
600
601         package action::hold_transit_copy;
602
603         action::hold_transit_copy->sequence( 'action.transit_copy_id_seq' );
604         action::hold_transit_copy->table('action.hold_transit_copy');
605
606         #-------------------------------------------------------------------------------
607
608         package action::transit_copy;
609
610         action::transit_copy->sequence( 'action.transit_copy_id_seq' );
611         action::transit_copy->table('action.transit_copy');
612
613         #-------------------------------------------------------------------------------
614
615         package action::unfulfilled_hold_list;
616
617         action::unfulfilled_hold_list->sequence( 'action.unfulfilled_hold_list_id_seq' );
618         action::unfulfilled_hold_list->table('action.unfulfilled_hold_list');
619
620         #-------------------------------------------------------------------------------
621
622
623 }
624
625 1;