X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FClipboard%2FBase.pm;h=47ccc241355c25a6df4de0d1e54c1ef4dd93f89d;hb=d40a8e202ca38008031a0cb882f5c3ae1c58fce8;hp=8b7f92a6449878dbd9449304c590be9f96b84cd3;hpb=c805dfd964cc6b4d24868b1835548024363e1f0f;p=kivitendo-erp.git diff --git a/SL/Clipboard/Base.pm b/SL/Clipboard/Base.pm index 8b7f92a64..47ccc2413 100644 --- 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__ @@ -187,6 +194,12 @@ the newly created object before handing it back to the caller. Returns the actual clipped type (e.g. C). 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. + =item C<_fix_object $object> This function is called by L before the object is passed