max_date_for_user: Most recent date in the database for a given user

Description Usage Arguments Value

View source: R/read_data_utils.R

Description

Search the default database for the most recent (aka latest) timestamp Note: doesn't currently work for tables other than glucose_records

Usage

1
2
3
4
5
6
max_date_for_user(
  conn_args = config::get("dataconnection"),
  user_id = 1234,
  fromDate = "2019-11-01",
  table_name = conn_args$glucose_table
)

Arguments

conn_args

valid database connection

user_id

user ID

fromDate

data object representing the first date to return

table_name

the table in which to find the latest record (currently fixed at glucose-records)

Value

a date object representing the most recent record in the database for this user. NA if there are no records.


personalscience/psi-shiny-cgm documentation built on Dec. 22, 2021, 7:43 a.m.