SQLFlexClient: SQL database resource client

SQLFlexClientR Documentation

SQL database resource client

Description

SQL database resource client

SQL database resource client

Format

A R6 object of class SQLFlexClient

Details

Resource client that connects to a SQL database supported by DBI

Super class

resourcer::ResourceClient -> SQLFlexClient

Methods

Public methods

Inherited methods

Method new()

Creates a SQLFlexClient from a resource.

Usage
SQLFlexClient$new(resource, dbi.connector = NULL)
Arguments
resource

The resource object.

dbi.connector

An optional DBIResourceConnector object. If not provided, it will be looked up in the DBIResourceConnector registry.

Returns

The SQLResourceClient object.


Method getConnection()

Get or create the DBI connection object that will access the resource.

Usage
SQLFlexClient$getConnection()
Returns

The DBI connection object.


Method readQuery()

Execute a query in the database and retrieve the results.

Usage
SQLFlexClient$readQuery(sqltext, params = NULL)
Arguments
sqltext

a character, the query text

params

Additional parameters to dbGetQuery.

Returns

A data.frame


Method close()

Silently close the DBI connection.

Usage
SQLFlexClient$close()

Method clone()

The objects of this class are cloneable with this method.

Usage
SQLFlexClient$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


sib-swiss/resourcex documentation built on April 3, 2025, 1:13 p.m.