Chage {-type => 'name', args => [] } to {-type => 'identifier', elements => [] }
[dbsrgits/SQL-Abstract-2.0-ish.git] / t / 003_quote.t
CommitLineData
8eda2119 1use strict;
2use warnings;
3
8b398780 4use Test::More tests => 5;
8eda2119 5use Test::Exception;
6
7use_ok('SQL::Abstract') or BAIL_OUT( "$@" );
8
9my $sqla = SQL::Abstract->create(1);
10
11lives_ok {
12 $sqla->quote_chars('[]');
13} "coercion of quote_chars from Str works";
8b398780 14
15
627dcb62 16is $sqla->dispatch( { -type => 'identifier', elements => [qw/me id/] }),
8b398780 17 "[me].[id]",
18 "me.id";
19
20
627dcb62 21is $sqla->dispatch( { -type => 'identifier', elements => [qw/me */] }),
8b398780 22 "[me].*",
23 "me.*";
24
25
627dcb62 26is $sqla->dispatch( { -type => 'identifier', elements => [qw/*/] }),
8b398780 27 "*",
28 "*";