MCPcopy
hub / github.com/dbcli/pgcli / get_timezone

Method get_timezone

pgcli/pgexecute.py:890–894  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

888 return "EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) "
889
890 def get_timezone(self) -> str:
891 query = psycopg.sql.SQL("show time zone")
892 with self.conn.cursor() as cur:
893 cur.execute(query)
894 return cur.fetchone()[0]
895
896 def set_timezone(self, timezone: str):
897 query = psycopg.sql.SQL("set time zone {}").format(psycopg.sql.Identifier(timezone))

Callers 1

cliFunction · 0.45

Calls 2

fetchoneMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected