db_size: Function to get the size of a database.

View source: R/db_size.R

db_sizeR Documentation

Function to get the size of a database.

Description

For SQLite databases, the file size is returned, for PostgreSQL databases, the 'pg_database' table is queried, and for MySQL database 'information_schema.tables' is queried.

Usage

db_size(con, unit = "mb", as_fs_bytes = FALSE)

Arguments

con

Database connection.

unit

Measurement unit. Default is "mb" for megabytes.

as_fs_bytes

Should the return be of the fs_bytes data type? If this argument is used, unit is not used.

Value

Numeric or fs_bytes vector with a length of 1.

Author(s)

Stuart K. Grange


skgrange/databaser documentation built on Sept. 13, 2024, 3:53 a.m.