Tabli - Upsert (Update/Insert) a Connection

Undraw Windows

About

upsert is an action of the connection module that update a connection or create it if it doesn't exist yet in the connection vault.

Example

Modifying the connection URL

tabli connection upsert --url "jdbc:sqlite://%TMP%/mySqliteDb.db" mySqliteDB
The connection (mySqliteDB) didn't exist and was created
The connection (mySqliteDB) was updated.

tabli connection upsert --url "jdbc:sqlite://%TMP%/db.db" mySqliteDB
The connection (mySqliteDB) exist already.
The connection (mySqliteDB) was updated.

  • With the info action, we can see that the URL has changed
tabli connection info mySqliteDB
Information about the connection (mySqliteDB)
Attribute                Value                                                      Description                                                            
----------------------   --------------------------------------------------------   --------------------------------------------------------------------   
DatabaseMajorVersion     3                                                          The major version number of the database                               
DatabaseMinorVersion     30                                                         The minor version number of the database                               
DatabaseProductName      SQLite                                                     The name of the database                                               
DatabaseProductVersion   3.30.1                                                     The version of the database                                            
DriverName               SQLite JDBC                                                The driver name                                                        
DriverVersion            3.30.1                                                     The driver version                                                     
JdbcMajorVersion         2                                                          The major version number of JDBC                                       
JdbcMinorVersion         1                                                          The minor version number of JDBC                                       
MaxConcurrentThread      1                                                          The maximum number of threads that can be created against the system   
MaxNameInPath            1                                                          The maximum number of names in a path                                  
Name                     mySqliteDB                                                 The name of the connection                                             
SupportBatchUpdates      true                                                       If the system supports batch SQL updates                               
SupportNamedParameters   true                                                       If the system supports named parameters in the SQL statement           
TabBooleanDataType       Binary                                                     Boolean data type used to store boolean values                         
TabDateDataType          SqlLiteral                                                 Date data type used to store date values                               
TabTimeDataType          SqlLiteral                                                 Time format data type to store time values                             
TabTimestampDataType     SqlLiteral                                                 Timestamp data type used to store timestamp values                     
Url                      jdbc:sqlite://C:\Users\GERARD~1\AppData\Local\Temp/db.db   The url of the connection

Syntax

tabli connection  upsert --help
Tabli connection upsert
=======================

Update or insert a connection



Example
-------

 1 - To upsert the information of the connection called `db`


    tabli connection upsert --url jdbc:sqlite//%TMP%/db.db db




Syntax
------


    tabli connection upsert [options|flags] <name>


where:


  Arguments:

    <name>                                                  the connection name


  Options:

    -d,--driver <value>                                     The jdbc driver (for a jdbc connection)

    -p,--password <value>                                   The user password

    --url <value>                                           The connection url (if the connection doesn't exist, this options is mandatory)

    -u,--user <value>                                       The login (ie user)


  Global Options:

    -cf,--conf <path>                                       The path to a configuration file

    -cv,--connection-vault <path>                           The path where the connection vault is located

    -h,--help                                               Print this help

    -l,--log-level <error|warning|tip|info|fine>            Set the log level

    -ns,--not-strict                                        A minor error will not stop the process.

    -odu,--output-data-uri <outputDataUri>                  defines the output data uri for the feedback data (default: console)

    -oo,--output-operation <dataOperation>                  defines the data operations (replace, truncate) on an existing output resource before transfer.

    -oop,--output-transfer-operation <transferOperation>    defines the output transfer operation (insert, update, merge, copy). Default to `copy` for a file system and `insert` for a database.

    -pp,--passphrase <passphrase>                           A passphrase (master password) to decrypt the encrypted values

Task Runner