Skip to content

SQL database functions

Similarly to what we’ve done for the HTTP(S) protocol support, we have also designed a generalized and fluent client object to interact with SQL databases, called SqlCli.

It supports the following databases (and more will be added in the future):

  • Couchbase
  • FirebirdSQL
  • Google BigQuery
  • MS SQL Server
  • MySQL/MariaDB
  • Oracle
  • Postgres
  • SQLite

As mentioned here above, this client object can also be used via the fluent paradigm. Here’s two versions of the same example. The first one is more traditional, while the second version uses the fluent paradigm.

First example (traditional, non-fluent)

ts
{
  var cli = new SqlCli();
  cli.Driver("sqlite");
  cli.ConnString(":memory:");
  if (cli.Connect()) {
    // Perform SQL tasks....
    cli.Close();
  }
}

Second example (fluent)

ts
{
  var cli = new SqlCli().Driver("sqlite").ConnString(":memory:");
  if (cli.Connect()) {
    // Perform SQL tasks....
    cli.Close();
  }
}