3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
20 package Xref::Schema::Result::Xref;
32 use base
'DBIx::Class::Core';
38 __PACKAGE__->table(
"xref");
45 extra: {
unsigned => 1}
58 extra: {
unsigned => 1}
75 extra: {
unsigned => 1}
81 extra: {
unsigned => 1}
88 extra: {list => [
"NONE",
"PROJECTION",
"MISC",
"DEPENDENT",
"DIRECT",
"SEQUENCE_MATCH",
"INFERRED_PAIR",
"PROBE",
"UNMAPPED",
"COORDINATE_OVERLAP",
"CHECKSUM"]}
94 default_value: (empty string)
101 extra: {list => [
"MAPPED",
"NO_DUMP_ANOTHER_PRIORITY",
"UNMAPPED_NO_MAPPING",
"UNMAPPED_NO_MASTER",
"UNMAPPED_MASTER_FAILED",
"UNMAPPED_NO_STABLE_ID",
"UNMAPPED_INTERPRO"]}
106 __PACKAGE__->add_columns(
109 data_type =>
"integer",
110 extra => {
unsigned => 1 },
111 is_auto_increment => 1,
115 { data_type =>
"varchar", is_nullable => 0, size => 255 },
117 { data_type =>
"integer", extra => {
unsigned => 1 }, is_nullable => 1 },
119 { data_type =>
"varchar", is_nullable => 1, size => 255 },
121 { data_type =>
"text", is_nullable => 1 },
123 { data_type =>
"integer", extra => {
unsigned => 1 }, is_nullable => 0 },
125 { data_type =>
"integer", extra => {
unsigned => 1 }, is_nullable => 0 },
129 default_value =>
"NONE",
141 "COORDINATE_OVERLAP",
148 { data_type =>
"varchar", default_value =>
"", is_nullable => 0, size => 255 },
155 "NO_DUMP_ANOTHER_PRIORITY",
156 "UNMAPPED_NO_MAPPING",
157 "UNMAPPED_NO_MASTER",
158 "UNMAPPED_MASTER_FAILED",
159 "UNMAPPED_NO_STABLE_ID",
177 __PACKAGE__->set_primary_key(
"xref_id");
179 =head1 UNIQUE CONSTRAINTS
181 =head2 C<acession_idx>
189 =item * L</source_id>
191 =item * L</species_id>
197 __PACKAGE__->add_unique_constraint(
199 [
"accession",
"label",
"source_id",
"species_id"],
202 __PACKAGE__->might_have(
'object_xref',
'Xref::Schema::Result::ObjectXref',
'xref_id'); # Not
true until after the mapping is completed
203 __PACKAGE__->has_one(
'source',
'Xref::Schema::Result::Source',
'source_id');
204 __PACKAGE__->has_many(
'synonym',
'Xref::Schema::Result::Synonym',
'xref_id' );