Skip to content

Commit 7dbe22d

Browse files
committed
SQLite: Adding a UDF concat_ws().
It is supported by MySQL, PostgreSQL and Oracle (also MS SQL 2017) while SQLite does not.
1 parent 7cf895e commit 7dbe22d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib/Sympa/DatabaseDriver/SQLite.pm

+8
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ sub connect {
6464
$self->__dbh->func(5000, 'busy_timeout');
6565
}
6666

67+
# Compatibility with other drivers.
68+
# concat_ws(): Since 6.2.XX.
69+
$self->__dbh->func('concat_ws', -1, sub {
70+
my $sep = shift;
71+
return undef unless defined $sep;
72+
return join $sep, grep {defined} @_;
73+
}, 'create_function');
74+
6775
return 1;
6876
}
6977

0 commit comments

Comments
 (0)