Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'extract' function to PostgresModule #208

Open
jczuchnowski opened this issue Nov 15, 2020 · 3 comments
Open

Add 'extract' function to PostgresModule #208

jczuchnowski opened this issue Nov 15, 2020 · 3 comments

Comments

@jczuchnowski
Copy link
Member

jczuchnowski commented Nov 15, 2020

Add support for function extract described in the PostgreSQL docs.

  1. Add function to PostgresFunctionDef in PostgresModule
  2. Add test in FunctionDefSpec
@rpiotrow
Copy link
Contributor

I'll try this one.

rpiotrow added a commit to rpiotrow/zio-sql that referenced this issue Nov 21, 2020
Changes:
 * add optional delimiter to FunctionDef for function call with 2 params
   since extract has form "extract(param1 from param2)"
 * add `TimestampPart` and corresponding type tags that are dedicated
   to PostgreSQL

Still to do:
 * make extract function available for other date like types
   (e.g. LocalDateTime, Instant, etc.), now it works only for LocalDate

Addresses zio#208
@jczuchnowski
Copy link
Member Author

This is still an open issue.

@jczuchnowski
Copy link
Member Author

This function needs extra handling as it's input is not a simple list of parameters. The signature is

extract ( field from timestamp ) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants