Skip to content

Instantly share code, notes, and snippets.

@vmarkovtsev
Created June 1, 2022 15:58
Show Gist options
  • Save vmarkovtsev/e5101cb586811b1a093daca9fdb44663 to your computer and use it in GitHub Desktop.
Save vmarkovtsev/e5101cb586811b1a093daca9fdb44663 to your computer and use it in GitHub Desktop.
from asyncpg.rkt import set_query_dtype
query = set_query_dtype(
"SELECT 777, '2022-01-01'::timestamp",
np.dtype([("a", int), ("b", datetime64[s])]))
arr, nulls = await connection.fetch(query)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment