Filename | /home/vagrant/kohaclone/Koha/Schema/Result/ImportBatch.pm |
Statements | Executed 13 statements in 677µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 26µs | 30µs | BEGIN@1.2172 | Class::C3::Componentised::
1 | 1 | 1 | 11µs | 76µs | BEGIN@16 | Koha::Schema::Result::ImportBatch::
1 | 1 | 1 | 11µs | 21µs | BEGIN@13 | Koha::Schema::Result::ImportBatch::
1 | 1 | 1 | 8µs | 17µs | BEGIN@14 | Koha::Schema::Result::ImportBatch::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 74µs | 2 | 34µs | # spent 30µs (26+4) within Class::C3::Componentised::BEGIN@1.2172 which was called:
# once (26µs+4µs) by Class::C3::Componentised::ensure_class_loaded at line 1 # spent 30µs making 1 call to Class::C3::Componentised::BEGIN@1.2172
# spent 4µs making 1 call to utf8::import |
2 | package Koha::Schema::Result::ImportBatch; | ||||
3 | |||||
4 | # Created by DBIx::Class::Schema::Loader | ||||
5 | # DO NOT MODIFY THE FIRST PART OF THIS FILE | ||||
6 | |||||
7 | =head1 NAME | ||||
8 | |||||
9 | Koha::Schema::Result::ImportBatch | ||||
10 | |||||
11 | =cut | ||||
12 | |||||
13 | 2 | 42µs | 2 | 32µs | # spent 21µs (11+11) within Koha::Schema::Result::ImportBatch::BEGIN@13 which was called:
# once (11µs+11µs) by Class::C3::Componentised::ensure_class_loaded at line 13 # spent 21µs making 1 call to Koha::Schema::Result::ImportBatch::BEGIN@13
# spent 11µs making 1 call to strict::import |
14 | 2 | 46µs | 2 | 26µs | # spent 17µs (8+8) within Koha::Schema::Result::ImportBatch::BEGIN@14 which was called:
# once (8µs+8µs) by Class::C3::Componentised::ensure_class_loaded at line 14 # spent 17µs making 1 call to Koha::Schema::Result::ImportBatch::BEGIN@14
# spent 8µs making 1 call to warnings::import |
15 | |||||
16 | 2 | 388µs | 2 | 142µs | # spent 76µs (11+66) within Koha::Schema::Result::ImportBatch::BEGIN@16 which was called:
# once (11µs+66µs) by Class::C3::Componentised::ensure_class_loaded at line 16 # spent 76µs making 1 call to Koha::Schema::Result::ImportBatch::BEGIN@16
# spent 66µs making 1 call to base::import |
17 | |||||
18 | =head1 TABLE: C<import_batches> | ||||
19 | |||||
20 | =cut | ||||
21 | |||||
22 | 1 | 20µs | 1 | 306µs | __PACKAGE__->table("import_batches"); # spent 306µs making 1 call to DBIx::Class::ResultSourceProxy::Table::table |
23 | |||||
24 | =head1 ACCESSORS | ||||
25 | |||||
26 | =head2 import_batch_id | ||||
27 | |||||
28 | data_type: 'integer' | ||||
29 | is_auto_increment: 1 | ||||
30 | is_nullable: 0 | ||||
31 | |||||
32 | =head2 matcher_id | ||||
33 | |||||
34 | data_type: 'integer' | ||||
35 | is_nullable: 1 | ||||
36 | |||||
37 | =head2 template_id | ||||
38 | |||||
39 | data_type: 'integer' | ||||
40 | is_nullable: 1 | ||||
41 | |||||
42 | =head2 branchcode | ||||
43 | |||||
44 | data_type: 'varchar' | ||||
45 | is_nullable: 1 | ||||
46 | size: 10 | ||||
47 | |||||
48 | =head2 num_records | ||||
49 | |||||
50 | data_type: 'integer' | ||||
51 | default_value: 0 | ||||
52 | is_nullable: 0 | ||||
53 | |||||
54 | =head2 num_items | ||||
55 | |||||
56 | data_type: 'integer' | ||||
57 | default_value: 0 | ||||
58 | is_nullable: 0 | ||||
59 | |||||
60 | =head2 upload_timestamp | ||||
61 | |||||
62 | data_type: 'timestamp' | ||||
63 | datetime_undef_if_invalid: 1 | ||||
64 | default_value: current_timestamp | ||||
65 | is_nullable: 0 | ||||
66 | |||||
67 | =head2 overlay_action | ||||
68 | |||||
69 | data_type: 'enum' | ||||
70 | default_value: 'create_new' | ||||
71 | extra: {list => ["replace","create_new","use_template","ignore"]} | ||||
72 | is_nullable: 0 | ||||
73 | |||||
74 | =head2 nomatch_action | ||||
75 | |||||
76 | data_type: 'enum' | ||||
77 | default_value: 'create_new' | ||||
78 | extra: {list => ["create_new","ignore"]} | ||||
79 | is_nullable: 0 | ||||
80 | |||||
81 | =head2 item_action | ||||
82 | |||||
83 | data_type: 'enum' | ||||
84 | default_value: 'always_add' | ||||
85 | extra: {list => ["always_add","add_only_for_matches","add_only_for_new","ignore","replace"]} | ||||
86 | is_nullable: 0 | ||||
87 | |||||
88 | =head2 import_status | ||||
89 | |||||
90 | data_type: 'enum' | ||||
91 | default_value: 'staging' | ||||
92 | extra: {list => ["staging","staged","importing","imported","reverting","reverted","cleaned"]} | ||||
93 | is_nullable: 0 | ||||
94 | |||||
95 | =head2 batch_type | ||||
96 | |||||
97 | data_type: 'enum' | ||||
98 | default_value: 'batch' | ||||
99 | extra: {list => ["batch","z3950","webservice"]} | ||||
100 | is_nullable: 0 | ||||
101 | |||||
102 | =head2 record_type | ||||
103 | |||||
104 | data_type: 'enum' | ||||
105 | default_value: 'biblio' | ||||
106 | extra: {list => ["biblio","auth","holdings"]} | ||||
107 | is_nullable: 0 | ||||
108 | |||||
109 | =head2 file_name | ||||
110 | |||||
111 | data_type: 'varchar' | ||||
112 | is_nullable: 1 | ||||
113 | size: 100 | ||||
114 | |||||
115 | =head2 comments | ||||
116 | |||||
117 | data_type: 'mediumtext' | ||||
118 | is_nullable: 1 | ||||
119 | |||||
120 | =cut | ||||
121 | |||||
122 | 1 | 44µs | 1 | 5.47ms | __PACKAGE__->add_columns( # spent 5.47ms making 1 call to DBIx::Class::ResultSourceProxy::add_columns |
123 | "import_batch_id", | ||||
124 | { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, | ||||
125 | "matcher_id", | ||||
126 | { data_type => "integer", is_nullable => 1 }, | ||||
127 | "template_id", | ||||
128 | { data_type => "integer", is_nullable => 1 }, | ||||
129 | "branchcode", | ||||
130 | { data_type => "varchar", is_nullable => 1, size => 10 }, | ||||
131 | "num_records", | ||||
132 | { data_type => "integer", default_value => 0, is_nullable => 0 }, | ||||
133 | "num_items", | ||||
134 | { data_type => "integer", default_value => 0, is_nullable => 0 }, | ||||
135 | "upload_timestamp", | ||||
136 | { | ||||
137 | data_type => "timestamp", | ||||
138 | datetime_undef_if_invalid => 1, | ||||
139 | default_value => \"current_timestamp", | ||||
140 | is_nullable => 0, | ||||
141 | }, | ||||
142 | "overlay_action", | ||||
143 | { | ||||
144 | data_type => "enum", | ||||
145 | default_value => "create_new", | ||||
146 | extra => { list => ["replace", "create_new", "use_template", "ignore"] }, | ||||
147 | is_nullable => 0, | ||||
148 | }, | ||||
149 | "nomatch_action", | ||||
150 | { | ||||
151 | data_type => "enum", | ||||
152 | default_value => "create_new", | ||||
153 | extra => { list => ["create_new", "ignore"] }, | ||||
154 | is_nullable => 0, | ||||
155 | }, | ||||
156 | "item_action", | ||||
157 | { | ||||
158 | data_type => "enum", | ||||
159 | default_value => "always_add", | ||||
160 | extra => { | ||||
161 | list => [ | ||||
162 | "always_add", | ||||
163 | "add_only_for_matches", | ||||
164 | "add_only_for_new", | ||||
165 | "ignore", | ||||
166 | "replace", | ||||
167 | ], | ||||
168 | }, | ||||
169 | is_nullable => 0, | ||||
170 | }, | ||||
171 | "import_status", | ||||
172 | { | ||||
173 | data_type => "enum", | ||||
174 | default_value => "staging", | ||||
175 | extra => { | ||||
176 | list => [ | ||||
177 | "staging", | ||||
178 | "staged", | ||||
179 | "importing", | ||||
180 | "imported", | ||||
181 | "reverting", | ||||
182 | "reverted", | ||||
183 | "cleaned", | ||||
184 | ], | ||||
185 | }, | ||||
186 | is_nullable => 0, | ||||
187 | }, | ||||
188 | "batch_type", | ||||
189 | { | ||||
190 | data_type => "enum", | ||||
191 | default_value => "batch", | ||||
192 | extra => { list => ["batch", "z3950", "webservice"] }, | ||||
193 | is_nullable => 0, | ||||
194 | }, | ||||
195 | "record_type", | ||||
196 | { | ||||
197 | data_type => "enum", | ||||
198 | default_value => "biblio", | ||||
199 | extra => { list => ["biblio", "auth", "holdings"] }, | ||||
200 | is_nullable => 0, | ||||
201 | }, | ||||
202 | "file_name", | ||||
203 | { data_type => "varchar", is_nullable => 1, size => 100 }, | ||||
204 | "comments", | ||||
205 | { data_type => "mediumtext", is_nullable => 1 }, | ||||
206 | ); | ||||
207 | |||||
208 | =head1 PRIMARY KEY | ||||
209 | |||||
210 | =over 4 | ||||
211 | |||||
212 | =item * L</import_batch_id> | ||||
213 | |||||
214 | =back | ||||
215 | |||||
216 | =cut | ||||
217 | |||||
218 | 1 | 31µs | 1 | 114µs | __PACKAGE__->set_primary_key("import_batch_id"); # spent 114µs making 1 call to DBIx::Class::ResultSourceProxy::set_primary_key |
219 | |||||
220 | =head1 RELATIONS | ||||
221 | |||||
222 | =head2 import_records | ||||
223 | |||||
224 | Type: has_many | ||||
225 | |||||
226 | Related object: L<Koha::Schema::Result::ImportRecord> | ||||
227 | |||||
228 | =cut | ||||
229 | |||||
230 | 1 | 10µs | 1 | 360µs | __PACKAGE__->has_many( # spent 360µs making 1 call to DBIx::Class::Relationship::HasMany::has_many |
231 | "import_records", | ||||
232 | "Koha::Schema::Result::ImportRecord", | ||||
233 | { "foreign.import_batch_id" => "self.import_batch_id" }, | ||||
234 | { cascade_copy => 0, cascade_delete => 0 }, | ||||
235 | ); | ||||
236 | |||||
237 | |||||
238 | # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-30 03:46:54 | ||||
239 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4UfJtTeAzzsuBycjsn2foQ | ||||
240 | |||||
241 | |||||
242 | # You can replace this text with custom content, and it will be preserved on regeneration | ||||
243 | 1 | 22µs | 1; |