1SQL::Translator::ProducUesre:r:SCQoLnSterrivbeurt(e3d)PSeQrLl::DTorcaunmselnattaotri:o:nProducer::SQLServer(3)
2
3
4

NAME

6       SQL::Translator::Producer::SQLServer - MS SQLServer producer for
7       SQL::Translator
8

SYNOPSIS

10         use SQL::Translator;
11
12         my $t = SQL::Translator->new( parser => '...', producer => 'SQLServer' );
13         $t->translate;
14

DESCRIPTION

16       This is currently a thin wrapper around the nextgen
17       SQL::Translator::Generator::DDL::SQLServer DDL maker.
18

Extra Attributes

20       field.list
21           List of values for an enum field.
22

TODO

24        * !! Write some tests !!
25        * Reserved words list needs updating to SQLServer.
26        * Triggers, Procedures and Views DO NOT WORK
27
28
29           # Text of view is already a 'create view' statement so no need to
30           # be fancy
31           foreach ( $schema->get_views ) {
32               my $name = $_->name();
33               $output .= "\n\n";
34               $output .= "--\n-- View: $name\n--\n\n" unless $no_comments;
35               my $text = $_->sql();
36               $text =~ s/\r//g;
37               $output .= "$text\nGO\n";
38           }
39
40           # Text of procedure already has the 'create procedure' stuff
41           # so there is no need to do anything fancy. However, we should
42           # think about doing fancy stuff with granting permissions and
43           # so on.
44           foreach ( $schema->get_procedures ) {
45               my $name = $_->name();
46               $output .= "\n\n";
47               $output .= "--\n-- Procedure: $name\n--\n\n" unless $no_comments;
48               my $text = $_->sql();
49             $text =~ s/\r//g;
50               $output .= "$text\nGO\n";
51           }
52

SEE ALSO

54       SQL::Translator
55

AUTHORS

57       See the included AUTHORS file:
58       <http://search.cpan.org/dist/SQL-Translator/AUTHORS>
59
61       Copyright (c) 2012 the SQL::Translator "AUTHORS" as listed above.
62

LICENSE

64       This code is free software and may be distributed under the same terms
65       as Perl itself.
66
67
68
69perl v5.28.0                      2014-0S6Q-L3:0:Translator::Producer::SQLServer(3)
Impressum