ffquintella-sqlcli

This modules acts as a sql client for diferent databases able to run sql commands.


License
BSD-3-Clause
Install
puppet module install ffquintella-sqlcli --version 1.1.6

Documentation

sqlcli

This module acts as a SQL client to allow the execution of comands on differente databases

Table of Contents

  1. Description
  2. Setup - The basics of getting started with sqlcli
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

This module acts as a SQL client to allow the execution of comands on differente databases

Setup

What sqlcli affects

This module will install usql (https://github.com/xo/usql) to use it as it's base.

It will also install golang as it is needed.

Beginning with sqlcli

To use the module yum must firts include de base class to be shure the instalation is done then you can use the defined types avaliable.

include sqlcli

Usage

There defined types are described bellow:

Execute This type executes a command

sqlcli::command { 'select * from foo': 
  database_connection => { 
          'db_type' => 'mssql',
          'db_user' => 'tuser',
          'db_pwd'  => '123',
          'db_hostname' => 'superdb',
          'db_port' => 1433,
          'db_schema' => 'schm1',
  },
  run_once = true,
}
sqlcli::script { '/tmp/script.sql': 
  database_connection => { 
          'db_type' => 'mssql',
          'db_user' => 'tuser',
          'db_pwd'  => '123',
          'db_hostname' => 'superdb',
          'db_port' => 1433,
          'db_schema' => 'schm1',
  },
  run_once = true,
}

Reference

All the parameters are described in doc/REFERENCES.md

Limitations

TBD

Development

We try to keep our modules as tested as possible and follow the lint sugestion. So before submitting any pull request, please run the unit tests and validation