SQLT(1)
π SQLT(1) β sqlt: convert SQL schema using SQL::Translator π
You're reading the SQLT(1) page from User Contributed Perl Documentation, bestie. It's giving βPerl manual, but make it cute.β π«Ά
π NAME π
sqlt β convert SQL schema using SQL::Translator.
β¨ SYNOPSIS β¨
Need help? Run:
sqlt -h|--help
Wanna see every parser and producer? Run:
sqlt -l|--list
To translate a schema, run:
sqlt -f|--from|--parser MySQL
-t|--to|--producer Oracle
[options]
file [file2 ...]
π General Options π
-d,--debugβ prints debug info.-v,--validateβ validates the schema.--versionβ shows the version ofSQL::Translator.--traceβ prints parser trace info.--show-warningsβ prints warnings toSTDERR.
π General Parser Options π
--skipβ comma-separated list of tables to skip (only implemented in some parsers).--ignore_optsβ comma-separated list of table options to ignore.
π DBI Parser Options π
--dsnβ DSN for connecting to the database (see also--use-same-authbelow).--db-userβ database user.--db-passwordβ database password.
π xSV Parser Options π
--fsβ the field separator.--rsβ the record separator.--no-trimβ don't trim whitespace on fields.--no-scanβ don't scan fields for data types and sizes.
π MySQL Parser Options π
--mysql-parser-versionβ target MySQL parser version for dealing with/*!comments; default =30000.
π MySQL Producer Options π
--mysql-versionβ MySQL server version.
π General Producer Options π
--producer-db-userβ database user for producer.--producer-db-passβ database password for producer.--producer-dsnβ DSN for producer.--use-same-authβ use these DSN, user, password for producer output.
π DB Producer Options π
--add-drop-tableβ add'DROP TABLE'statements before creates.--quote-table-namesβ quote all table names in statements.--quote-field-namesβ quote all field names in statements.--no-commentsβ don't include comments in SQL output.
π PostgreSQL Producer Options π
--postgres-versionβ PostgreSQL server version.
π Diagram Producer Options π
--imap-fileβ filename to put image map data.--imap-urlβ URL to use for image map.
π Dumper Producer Options π
--skipβ comma-separated list of tables to skip.--skiplikeβ regex for tables to skip.--add-truncateβ add"TRUNCATE TABLE"statements for each table.
π HTML/POD Producer Options π
--prettyβ useCGI::Prettyfor the output.--titleβ title of schema.
π TTSchema Producer Options π
--templateβ the path to the template.--tt-var var=valueβ pass extra variables to the template.--tt-conf option=valueβ pass extra config options toTemplate.
π XML-SQLFairy Producer Options π
--add-prefixβ use an explicit namespace prefix of'sqlf:'.--prefix=<p>β use the namespace prefix given as argument.--no-newlinesβ write the XML as a single line.--indent=<n>β use<n>characters of whitespace to indent the XML.
π ClassDBI Producer Options π
--packageβ base package name forClass::DBImodules.
π¦ DESCRIPTION π¦
This script is part of the SQL Fairy project. It will try to convert any source file it has a grammar for into any format it has a producer for. Slay β¨
If you're using--show-warnings, be sure to redirectSTDERRto a separate file, okay? No chaos in the main output, bestie.
In bash, you could do this:
$ sql_translator.pl -f MySQL -t PostgreSQL --show-warnings \
file.sql 1>out 2>err
You can specify a parser or producer located in any module that Perl knows about, which lets you easily substitute your own. Iconic behavior, honestly π
πΈ AUTHOR πΈ
Ken Youens-Clark <kclark@cpan.org>, darren chamberlain <darren@cpan.org>.
π SEE ALSO π
SQL::Translator, <http://sqlfairy.sourceforge.net>.
And that's the footer tea, bestie: perl v5.42.0, 2024-12-12 ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-SQL-Translator 1.660.0-bp160.1.11 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms