projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SessionFile: vim syntaxhighlighting fix
[kivitendo-erp.git]
/
SL
/
Clipboard
/
Base.pm
diff --git
a/SL/Clipboard/Base.pm
b/SL/Clipboard/Base.pm
index
8b7f92a
..
fc0a16a
100644
(file)
--- a/
SL/Clipboard/Base.pm
+++ b/
SL/Clipboard/Base.pm
@@
-69,6
+69,13
@@
sub _fix_tree {
}
}
}
}
+sub _binary_column_names {
+ my ($self, $class) = @_;
+ return map { $_->name }
+ grep { ref($_) =~ m/Pg::Bytea$/i }
+ @{ $class->meta->columns };
+}
+
1;
__END__
1;
__END__
@@
-173,13
+180,13
@@
L</dump>.
=item C<to_object>
=item C<to_object>
-Converts the dumped representation back to a
n
Rose::DB::Object
+Converts the dumped representation back to a Rose::DB::Object
instance. Several columns of the newly created object are cleared by
C<to_object> itself: the primary key columns (if any) and the columns
C<itime> and C<mtime> (if the object has such columns).
This function should not be overwritten by sub-classes. Instead,
instance. Several columns of the newly created object are cleared by
C<to_object> itself: the primary key columns (if any) and the columns
C<itime> and C<mtime> (if the object has such columns).
This function should not be overwritten by sub-classes. Instead,
-functions can overwrite C<_fix_object> which can be used for sanitzing
+functions can overwrite C<_fix_object> which can be used for sanit
i
zing
the newly created object before handing it back to the caller.
=item C<type>
the newly created object before handing it back to the caller.
=item C<type>
@@
-187,6
+194,12
@@
the newly created object before handing it back to the caller.
Returns the actual clipped type (e.g. C<RequirementSpecItem>). This is
derived from the actual class name of C<$self>.
Returns the actual clipped type (e.g. C<RequirementSpecItem>). This is
derived from the actual class name of C<$self>.
+=item C<_binary_column_names $class>
+
+Returns an array of column names that have a binary type. Useful for
+sub-classes which need to encode binary content in Base64 during
+C<dump>.
+
=item C<_fix_object $object>
This function is called by L</to_object> before the object is passed
=item C<_fix_object $object>
This function is called by L</to_object> before the object is passed