8000 Add support for postgres interval type as Period by dylex · Pull Request #56 · mauricio/postgresql-async · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Add support for postgres interval type as Period #56

Merged
merged 2 commits into from
Nov 2, 2013

Conversation

dylex
Copy link
Contributor
@dylex dylex commented Oct 31, 2013

Internally postgres stores (months, days, seconds), for which it may make sense to use Duration instead. However, it externally presents an interface that looks more like Period, so this approach makes parsing easier, and allows the user to then convert to Durations as they see fit. If the binary interface is used eventually, this decision perhaps should be revisited. Duration is supported on encode. The lack of sub-millisecond precision is unfortunate, but issue #25 covers that. Some negative values are not supported correctly in some formats due to incompatibilities in the joda Period parser.

@@ -36,7 +36,8 @@ trait DatabaseTestHelper {

def defaultConfiguration = new Configuration(
port = databasePort,
username = "postgres",
username = "netty_driver_test",
password = Some("netty"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change the database details here?

@dylex
Copy link
Contributor Author
dylex commented Oct 31, 2013

Sorry, didn't mean to commit that change. Removed.

@mauricio
Copy link
Owner
mauricio commented Nov 2, 2013

Looks great, can you rebase this against master so I can merge?

@dylex
Copy link
Contributor Author
dylex commented Nov 2, 2013

Rebased.

dylex added 2 commits November 1, 2013 23:31
Internally postgres stores (months, days, seconds), for which it may make sense
to use Duration instead.  Unfortunately, it externally presents an interface
that looks more like Period, so this approach makes parsing easier.
mauricio added a commit that referenced this pull request Nov 2, 2013
Add support for postgres interval type as Period
@mauricio mauricio merged commit eb7e32c into mauricio:master Nov 2, 2013
@dylex dylex deleted the interval branch November 2, 2013 14:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0