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