• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/CPANInternal-140/Class-DBI-v3.0.17/lib/Class/

Lines Matching +refs:double +refs:column

320 # with the normalized column name.
377 my ($class, $column) = @_;
380 return $class->accessor_name($column)
382 return $column->accessor;
386 my ($class, $column) = @_;
389 return $class->mutator_name($column)
391 return $column->mutator;
438 || $class->_croak("$k is not a column of $class");
687 $self->_croak("Need hash-ref to edit copied column values")
766 my ($self, $column) = @_;
767 return $self->find_column($column)->placeholder;
833 # the column (and associated) columns from the database, using the _flesh()
874 while (my ($column, $value) = each %$column_values) {
875 my $col = $self->find_column($column) or die "No such column: $column\n";
878 # $self->SUPER::set($column, $value);
880 eval { $self->call_trigger("after_set_$column") }; # eg inflate
882 $self->_attribute_delete($column);
883 return $self->_croak("after_set_$column trigger error: $@", err => $@);
900 # Given a hash ref of column names and proposed new values,
907 # Given a hash ref of column names and proposed new values
914 foreach my $column (keys %$column_values) {
916 $self->call_trigger("before_set_$column", $column_values->{$column},
919 push @errors, $column => $@ if $@;
961 or return $class->_croak("constraint_column needs a valid column");
986 my $column = $class->find_column(+shift)
987 or return $class->_croak("Constraint $name needs a valid column");
993 $column->is_constrained(1);
995 "before_set_$column" => sub {
997 $code->($value, $self, $column, $column_values)
999 "$class $column fails '$name' constraint with '$value'",
1000 method => "before_set_$column",
1003 column => $column,
1531 a single column primary key. For tables with multi-column primary keys
1558 If the table has a single primary key column and that column value
1570 For tables with multi-column primary keys you need to supply all
1629 database. For tables with a single column primary key a single
1722 The construct() method creates a new empty object, loads in the column
1734 sets any supplied column values and calls insert() to make a new
1737 For tables with a single column primary key, copy() can be called
1742 For tables with a multi-column primary key, copy() must be called with
1778 before_set_$column (also used by add_constraint)
1779 after_set_$column (also used for inflation and by has_a)
1791 when C<before_set_$column> is fired during L<"insert">, in which case
1801 __PACKAGE__->add_constraint('name', column => \&check_sub);
1824 on a column. The constraint on a column is triggered whenever an object
1825 is created and whenever the value in that column is being changed.
1832 - The name of the column
1834 - A hash ref of all new column values being assigned
1842 The exception thrown has its data set to a hashref of the column being
1845 Note 1: Constraints are implemented using before_set_$column triggers.
1851 checked for column names included in the parameters to insert().
1860 Simple anonymous constraints can also be added to a column using the
1876 a reference to a hash containing the column names and the new values
1880 Currently Class::DBI does not offer any per-column mechanism here.
1893 reference to a hash containing the column names and the new values which
1900 The default method calls the before_set_$column trigger for each column
1903 is a reference to a hash which holds the column name and error text for
1964 accessor methods for every column in your subclass. It also overrides
1967 store a list of values in a column, set() takes a hash of column =>
1979 column values. The extra accessor methods automatically generated for
1980 each column of your table are simple wrappers that call these get()
1985 C<before_set_$column> trigger is invoked by validate_column_values(),
1988 The C<after_set_$column> trigger is invoked after the new value has
1991 It is possible for an object to not have all its column data in memory
1992 (due to lazy inflation). If the get() method is called for such a column
2001 column either declaratively or programmatically.
2003 If, for example, you have a column with a name that clashes with a
2016 which will convert a column name to a method name.
2019 'customer' to each column in the 'customer' table, so that you had the
2025 my ($class, $column) = @_;
2026 $column =~ s/^customer//;
2027 return $column;
2035 my ($class, $column) = @_;
2036 return "set_" . $column->accessor;
2136 # discard the md5_hash column if any field starting with 'foo'
2142 Take care to not delete a primary key column unless you know what
2158 Currently this simply discards the column values from the object.
2170 after_set_$column trigger)
2182 a table with a multi-column primary key.
2198 where the keys are normalized column names (returned by find_column()),
2241 column, and a false value otherwise.
2263 You can also specify the column(s) to be used for stringification via
2264 the special 'Stringify' column group. So, for example, if you're using
2315 Music::CD->has_a(column => 'Foreign::Class');
2321 key. If a column is declared as storing the primary key of another
2322 table, then calling the method for that column does not return the id,
2325 It is also possible to use has_a to inflate the column value to a non
2339 called on that class with the column value. Any other object will be
2349 *NOTE* You should not attempt to make your primary key column inflate
2397 the has_many() declaration stating which column of the foreign class
2473 to add a 'liner_notes' column to your main CD table even though there
2515 multi-column Primary Key. First of all set up the Role class:
2588 you need to be careful to double any "wildcard" % signs in your queries).
2698 the best approach is to declare 'cds' to be a TEMP column. (See
2724 This can also take placeholders and/or do column interpolation if required:
2754 =item - maximum_value_of($column)
2756 =item - minimum_value_of($column)
2787 have a single column primary key you can do this all in one shot with
2788 one single column declaration:
2810 If 'All' is given but not 'Primary' it will assume the first column in
2818 The 'Primary' column is always part of the 'Essential' group.
2822 only be used for tables that have a single primary key column.
2830 you can declare them as part of a column group of 'TEMP'.
2834 Class->find_column($column);
2835 $obj->find_column($column);
2838 method will return you the object for the given column, if it exists.
2839 This is most useful either in a boolean context to discover if the column
2840 exists, or to 'normalize' a user-entered column name to an actual Column.
3000 Altering your primary key column currently causes Bad Things to happen.
3015 are some issues with multi-case column/table names. Beyond that lies