SQL::Translator::Producer::SQLServer(3pm)

SQL::Translator::Producer::SQLServer3pm

Ms sqlserver producer for sql::translator

Usage

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

Overview

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

Extra Attributes

field.list

List of values for an enum field.

Todo

 * !! Write some tests !!
 * Reserved words list needs updating to SQLServer.
 * Triggers, Procedures and Views DO NOT WORK
    # Text of view is already a 'create view' statement so no need to
    # be fancy
    foreach ( $schema->get_views ) {
        my $name = $_->name();
        $output .= "\n\n";
        $output .= "--\n-- View: $name\n--\n\n" unless $no_comments;
        my $text = $_->sql();
        $text =~ s/\r//g;
        $output .= "$text\nGO\n";
    }
    # Text of procedure already has the 'create procedure' stuff
    # so there is no need to do anything fancy. However, we should
    # think about doing fancy stuff with granting permissions and
    # so on.
    foreach ( $schema->get_procedures ) {
        my $name = $_->name();
        $output .= "\n\n";
        $output .= "--\n-- Procedure: $name\n--\n\n" unless $no_comments;
        my $text = $_->sql();
      $text =~ s/\r//g;
        $output .= "$text\nGO\n";
    }

Releases

10 releases since Debian 4.0 (Etch); the text changed 9 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10
  8. 11
  9. 12
  10. 13

Authors

See the included AUTHORS file: <http://search.cpan.org/dist/SQL-Translator/AUTHORS>

License

This code is free software and may be distributed under the same terms as Perl itself.

From libsql-translator-perl 1.66-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.