Skip to contents

The fundamental way to communicate with database tables.

Details

This class is a representation of a database table. It is the way that you can access data (e.g. `tbl()`), manipulate data (e.g. `insert_data`, `upsert_data`), and manipulate structural aspects of the database table (e.g. `add_indexes`, `drop_indexes`).

Public fields

config

Configuration details of the database.

Active bindings

connection

Database connection.

autoconnection

Database connection that automatically connects if possible.

Methods


Method new()

Create a new DBConnection_v9 object.

Usage

DBConnection_v9$new(
  driver = NULL,
  server = NULL,
  port = NULL,
  db = NULL,
  schema = NULL,
  user = NULL,
  password = NULL,
  trusted_connection = NULL,
  sslmode = NULL
)

Arguments

driver

Driver

server

Server

port

Port

db

DB

schema

Schema (e.g. "dbo")

user

User

password

Password

trusted_connection

NULL or "yes"

sslmode

NULL or "require"

Returns

A new `DBConnection_v9` object.


Method is_connected()

Is the DB schema connected?

Usage

DBConnection_v9$is_connected()

Returns

TRUE/FALSE


Method print()

Class-specific print function.

Usage

DBConnection_v9$print(...)

Arguments

...

Not used.


Method connect()

Connect to the database

Usage

DBConnection_v9$connect(attempts = 2)

Arguments

attempts

Number of attempts to be made to try to connect


Method disconnect()

Disconnect from the database

Usage

DBConnection_v9$disconnect()


Method clone()

The objects of this class are cloneable with this method.

Usage

DBConnection_v9$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.