dbHumanizeTimestamps: create a view of a table where timestamps are displayed in...

View source: R/dbHumanizeTimestamps.R

dbHumanizeTimestampsR Documentation

create a view of a table where timestamps are displayed in human-readable form.

Description

create a view of a table where timestamps are displayed in human-readable form.

Usage

dbHumanizeTimestamps(dbcon, table, newtable = paste0("_", table),
  tsRegex = "^ts.*", temporary = FALSE)

Arguments

dbcon

connection to a MySQL/MariaDB server or sqlite database

table

name of existing table

newtable

name of new view; default: paste0('_', table)

tsRegex

regular expression that matches names of columns holding numeric timestamps. Default: '^ts.*'

temporary

should view be temporary? default:FALSE

Details

Creates a view of a table where any numeric 'timestamp' field is replaced by a human readble version. The view will have the given new name, 'timestamp' is judged by having a name matching the timestamp regex. If the view already exists, this function does nothing.

Value

TRUE on success; FALSE otherwise.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


MotusWTS/motusServer documentation built on Dec. 3, 2024, 10:47 a.m.