Changeset: a9b8f281b640 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a9b8f281b640 Added Files: documentation/source/clients.rst documentation/source/man_mclient.rst documentation/source/man_mserver5.rst documentation/source/man_msqldump.rst documentation/source/manual_pages.rst documentation/source/manual_pages/mclient.rst documentation/source/manual_pages/monetdb.rst documentation/source/manual_pages/msqldump.rst Modified Files: documentation/source/conf.py documentation/source/index.rst Branch: default Log Message:
Add documentation diffs (truncated from 851 to 300 lines): diff --git a/documentation/source/clients.rst b/documentation/source/clients.rst new file mode 100644 --- /dev/null +++ b/documentation/source/clients.rst @@ -0,0 +1,59 @@ +******************* +The MonetDB clients +******************* + +This chapter discusses the various clients that can connect to a MonetDB Server. + +``mclient`` +=========== + + +``msqldump`` +============ + +Miscellaneous +============= + +The ``.monetdb`` file +--------------------- + +Various options to the above clients can be configured by a file. The clients +search for this file in the following locations: + +#. The file specified in the ``DOTMONETDBFILE`` environment variable. +#. The file ``.monetdb`` in the current working directory. +#. The file ``monetdb`` in the ``XDG_CONFIG_HOME/monetdb/`` directory. +#. The file ``.monetdb`` in the user's home directory. + +The options that can be specified in this file are the following: + + ``user`` + The username used to connect to the server. + + ``password`` + The password used to connect to the server. + + ``database`` + The database the client will connect to. + + ``host`` + The hostname where the server is running. + + ``port`` + The port where the server is listening on. + + ``language`` + What language this connection will use. Valid values are ``sql`` and ``mal``. + + ``save_history`` + This option allows the command history to persist across different client + sessions. Valid options are ``true``, ``on``, ``false`` and ``off``. This + option is relevant for interactive clients (only ``mclient`` currently). + + ``format`` + The format of the client output. Valid options are ``csv``, ``tab``, + ``raw``, ``sql``, ``xml``, ``trash``, ``rowcount``. + + ``width`` + The width in characters of each row in the paginated output that the client + produces. diff --git a/documentation/source/conf.py b/documentation/source/conf.py --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -50,3 +50,5 @@ html_theme = 'alabaster' # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] + +smartquotes=False diff --git a/documentation/source/index.rst b/documentation/source/index.rst --- a/documentation/source/index.rst +++ b/documentation/source/index.rst @@ -11,6 +11,8 @@ Welcome to MonetDB's documentation! :caption: Contents: input + clients + manual_pages Indices and tables diff --git a/documentation/source/man_mclient.rst b/documentation/source/man_mclient.rst new file mode 100644 --- /dev/null +++ b/documentation/source/man_mclient.rst @@ -0,0 +1,5 @@ +******************* +mclient manual page +******************* + +.. include:: manual_pages/mclient.rst diff --git a/documentation/source/man_mserver5.rst b/documentation/source/man_mserver5.rst new file mode 100644 --- /dev/null +++ b/documentation/source/man_mserver5.rst @@ -0,0 +1,5 @@ +******************** +mserver5 manual page +******************** + +.. include:: manual_pages/mserver5.rst diff --git a/documentation/source/man_msqldump.rst b/documentation/source/man_msqldump.rst new file mode 100644 --- /dev/null +++ b/documentation/source/man_msqldump.rst @@ -0,0 +1,5 @@ +******************** +msqldump manual page +******************** + +.. include:: manual_pages/msqldump.rst diff --git a/documentation/source/manual_pages.rst b/documentation/source/manual_pages.rst new file mode 100644 --- /dev/null +++ b/documentation/source/manual_pages.rst @@ -0,0 +1,10 @@ +************ +Manual pages +************ + +.. toctree:: + :maxdepth: 0 + + man_mclient + man_msqldump + man_mserver5 diff --git a/documentation/source/manual_pages/mclient.rst b/documentation/source/manual_pages/mclient.rst new file mode 100644 --- /dev/null +++ b/documentation/source/manual_pages/mclient.rst @@ -0,0 +1,333 @@ +NAME +==== + +mclient --- the MonetDB command-line tool + +SYNOPSIS +======== + +| **mclient** [ *options* ] [ *file or database* [ *file* ... ] ] +| **mclient** **--help** + +DESCRIPTION +=========== + +MonetDB is a database management system that is developed from a +main-memory perspective with use of a fully decomposed storage model, +automatic index management, extensibility of data types and search +accelerators, and an SQL front end. + +*Mclient* is the command-line interface to the MonetDB server. + +If the **--statement=**\ *query* (**-s** *query*) option is given, the +query is executed. If any files are listed after the options, queries +are read from the files and executed. The special filename **-** refers +to standard input. Note that if there is both a **--statement** option +and filename arguments, the query given with **--statement** is executed +first. If no **--statement** option is given and no files are specified +on the command line, *mclient* reads queries from standard input. + +When reading from standard input, if standard input is a terminal or if +the **--interactive** (**-i**) option is given, *mclient* interprets +lines starting with **\\** (backslash) specially. See the section +BACKSLASH COMMANDS below. + +Before *mclient* starts parsing command line options, it reads a +*.monetdb* file. If the environment variable **DOTMONETDBFILE** is set, +it reads the file pointed to by that variable instead. When unset, +*mclient* searches for a *.monetdb* file in the current working +directory, and if that doesn't exist, in the current user's home +directory. This file can contain defaults for the flags **user**, +**password**, **language**, **database**, **save_history**, **format**, +and **width**. For example, an entry in a *.monetdb* file that sets the +default language for *mclient* to mal looks like this: **language=mal**. +To disable reading the *.monetdb* file, set the variable +**DOTMONETDBFILE** to the empty string in the environment. + +OPTIONS +======= + +General Options +--------------- + +**--help** (**-?**) + Print usage information and exit. + +**--version** (**-v**) + Print version information and exit. + +**--encoding=**\ *encoding* (**-E** *encoding*) + Specify the character encoding of the input. The option applies to + both the standard input of *mclient* and to the argument of the + **--statement** (**-s**) option but not to the contents of files + specified on the command line (except for **-** which refers to + standard input) or files specified using the **\\<** command (those + must be encoded using UTF-8). The default encoding is taken from the + locale. + +**--language=**\ *language* (**-l** *language*) + Specify the query language. The following languages are recognized: + **mal** and **sql**. A unique prefix suffices. When the + **--language** option is omitted, the default of **sql** is assumed. + +**--database=**\ *database* (**-d** *database*) + Specify the name or URI of the database to connect to. The **-d** can + be omitted if an equally named file does not exist in the current + directory. As such, the first non-option argument will be interpreted + as database to connect to if the argument does not exist as file. + Valid URIs are as returned by \`monetdb discover`, see + *monetdb*\ (1), and look like + **mapi:monetdb://**\ *hostname*\ **:**\ *port*\ **/**\ *database*. + +**--host=**\ *hostname* (**-h** *hostname*) + Specify the name of the host on which the server runs (default: + **localhost**). When the argument starts with a forward slash (/), + host is assumed to be the directory where the UNIX sockets are stored + for platforms where these are supported. + +**--port=**\ *portnr* (**-p** *portnr*) + Specify the portnumber of the server (default: **50000**). + +**--interactive** (**-i**) + When reading from standard input, interpret lines starting with + **\\** (backslash) specially. See the section BACKSLASH COMMANDS + below. + +**--timer=**\ *timermode* (**-t** *timermode*) + | The *timer* command controls the format of the time reported for + queries. The default mode is **none** which turns off timing + reporting. The timer mode **clock** reports the client-side + wall-clock time ("**clk**") in a human-friendly format. The timer + mode **performance** reports client-side wall-clock time + ("**clk**") as well as detailed server-side timings, all in + milliseconds (ms): the time to parse the SQL query, optimize the + logical relational plan and create the initial physical (MAL) plan + ("**sql**"); the time to optimize the physical (MAL) plan + ("**opt**"); the time to execute the physical (MAL) plan + ("**run**"). All timings are reported on stderr. + | **Note** that the client-measured wall-clock time is reported per + query **only** when options **--interactive** or **--echo** are + used, because only then does mclient send individual lines + (statements) of the SQL script to the server. Otherwise, when + mclient sends the SQL script in large(r) batch(es), only the total + wall-clock time per batch is measured and reported. The + server-measured detailed performance timings are always measured + and reported per query. + +**--user=**\ *user* (**-u** *user*) + Specify the user to connect as. If this flag is absent, the client + will ask for a user name, unless a default was found in .monetdb + file. + +**--format=**\ *format* (**-f** *format*) + Specify the output format. The possible values are **sql**, + **expanded**, **x**, **csv**, **tab**, **raw**, **xml**, and + **trash**. **csv** is comma-separated values, **tab** is + tab-separated values, **raw** is no special formatting (data is + dumped the way the server sends it to the client), **sql** is a + pretty format which is meant for human consumption where columns are + clearly shown, **expanded** and **x** are synonyms and are another + pretty format meant for human consumption where column values are + printed in full and below each other, **xml** is a valid (in the XML + sense) document, and **trash** does not render any output, enabling + performance measurements free of any output rendering/serialization + costs. In addition to plain **csv**, two other forms are possible. + **csv=**\ *c* uses *c* as column separator; **csv+**\ *c* uses *c* as + column separator and produces a single header line in addition to the + data. + +**--echo** (**-e**) + Echo the query. Note that using this option slows down processing. + +**--history** (**-H**) + Load and save the command line history (default off). + +**--log=**\ *logfile* (**-L** *logfile*) + Save client/server interaction in the specified file. + +**--statement=**\ *stmt* (**-s** *stmt*) + Execute the specified query. The query is run before any queries from + files specified on the command line are run. + +**--timezone** (**-z**) + Do not tell the client's timezone to the server. + +**--Xdebug** (**-X**) + Trace network interaction between *mclient* and the server. + +**--pager=**\ *cmd* (**-\|** *cmd*) + Send query output through the specified *cmd*. One *cmd* is started + for each query. Note that the **\|** will have to be quoted or else + the shell will interpret it. + +SQL Options +----------- + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list