]> git.phdru.name Git - sqlconvert.git/blob - docs/index.rst
242918a82b9662afe66a49842caaa5a6d2d06e45
[sqlconvert.git] / docs / index.rst
1 .. mysql2sql documentation master file, created by
2    sphinx-quickstart on Fri Jul 22 19:32:24 2016.
3    You can adapt this file completely to your liking, but it should at least
4    contain the root `toctree` directive.
5
6 Welcome to mysql2sql's documentation!
7 =====================================
8
9 This is mysql2sql, a mysql to sql converter. It is primary intended to
10 convert mysqldump (especially with extended INSERT syntax) to standard
11 SQL to load at least to PostgreSQL or SQLite.
12
13 It uses `sqlparse <https://github.com/andialbrecht/sqlparse>`_ to parse
14 SQL.
15
16 The program is in its initial phase and currently cannot do much.
17
18 .. highlight:: none
19
20 Command line
21 ------------
22
23 mysql2sql
24 ~~~~~~~~~
25
26 Usage::
27
28     mysql2sql [-e encoding] [-E output_encoding] [infile] [[-o] outfile]
29
30 Options::
31
32     -e ENCODING, --encoding ENCODING
33                            input/output encoding, default is utf-8
34     -E OUTPUT_ENCODING, --output-encoding OUTPUT_ENCODING
35                            separate output encoding, default is the same as
36                            `-e` except for console; for console output charset
37                            from the current locale is used
38     -P, --no-pbar          Inhibit progress bar
39     infile                 Input file, stdin if absent or '-'
40     -o, --outfile outfile  Output file, stdout if absent or '-'
41
42 If stderr is connected to the console the program displays a text mode progress
43 bar. Option `-P/--no-pbar` inhibits it.
44
45 Option `-o` is useful when infile is absent (input is redirected), for
46 example::
47
48     mysql2sql -o outfile.sql < infile.sql
49     cat infile.sql | mysql2sql -o outfile.sql
50
51 But of course it simply can be::
52
53     mysql2sql - outfile.sql < infile.sql
54     cat infile.sql | mysql2sql - outfile.sql
55
56
57 Indices and tables
58 ==================
59
60 * :ref:`genindex`
61 * `<api/modules.html>`_
62 * :ref:`search`
63
64
65 Credits
66 =======
67
68 Created by Oleg Broytman <phd@phdru.name>.
69
70 Copyright (C) 2016 PhiloSoft Design.
71
72
73 License
74 =======
75
76 GPL.