MCPcopy Create free account
hub / github.com/dbcli/mycli / server_datetime

Function server_datetime

mycli/packages/key_binding_utils.py:23–28  ·  view source on GitHub ↗
(sqlexecute: SQLExecute, quoted: bool = False)

Source from the content-addressed store, hash-verified

21
22
23def server_datetime(sqlexecute: SQLExecute, quoted: bool = False) -> str:
24 server_datetime_str = sqlexecute.now().strftime('%Y-%m-%d %H:%M:%S')
25 if quoted:
26 return f"'{server_datetime_str}'"
27 else:
28 return server_datetime_str
29
30
31# todo: maybe these handlers belong in a repl_handlers.py (which does not exist yet)

Callers

nothing calls this directly

Calls 1

nowMethod · 0.45

Tested by

no test coverage detected