Simple start on UPDATE clause backcompat
[dbsrgits/SQL-Abstract-2.0-ish.git] / t / compat / ast / 02update.t
CommitLineData
73e799a6 1use strict;
2use warnings;
3
4use FindBin;
5use lib "$FindBin::Bin/../../lib";
6use Test::SQL::Abstract::Util qw/
7 mk_name
8 mk_value
9 mk_expr
10 field_op_value
11 :dumper_sort
12/;
13
14use SQL::Abstract::Compat;
15
16use Test::More tests => 2;
17use Test::Differences;
18
19ok(my $visitor = SQL::Abstract::Compat->new);
20
21
22my $foo_id = { -type => 'identifier', elements => [qw/foo/] };
23my $bar_id = { -type => 'identifier', elements => [qw/bar/] };
24
25my $foo_eq_1 = field_op_value($foo_id, '==', 1);
26my $bar_eq_str = field_op_value($bar_id, '==', 'some str');
27
28local $TODO = 'Work out what this should be';
29eq_or_diff
30 $visitor->update_ast('test', { foo => 1 }),
31 { -type => 'update',
32 tablespec => mk_name('test'),
33
34 },
35 "simple update";
36
37
38