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