Skip to content

Better postgres arrays - #744

Merged
mathiasrw merged 6 commits into
AlaSQL:developfrom
bopjesvla:betterarrays
Sep 3, 2016
Merged

mathiasrw merged 6 commits into
AlaSQL:developfrom
bopjesvla:betterarrays

Conversation

@bopjesvla

Copy link
Copy Markdown
Contributor

Continuation of #731

@codecov-io

codecov-io commented Sep 3, 2016 •

Copy link
Copy Markdown

Current coverage is 66.94% (diff: 100%)

Merging #744 into develop will decrease coverage by 0.01%

@@            develop       #744   diff @@
==========================================
  Files             1          1          
  Lines          9739       9749    +10   
  Methods        1018       1023     +5   
  Messages          0          0          
  Branches       2908       2910     +2   
==========================================
+ Hits           6521       6526     +5   
- Misses         3218       3223     +5   
  Partials          0          0          

Powered by Codecov. Last update d1f0ced...31238ac

@bopjesvla

Copy link
Copy Markdown
Contributor Author

hold up

@bopjesvla

Copy link
Copy Markdown
Contributor Author

that's all

@mathiasrw

Copy link
Copy Markdown
Member

You are a machine!

Thanks :)

@mathiasrw
mathiasrw merged commit c6cf56e into AlaSQL:develop Sep 3, 2016
@mathiasrw

Copy link
Copy Markdown
Member

Im trying to update the documentation a bit.

I see ANY (array[1,2]) and ARRAY[1,2,3] in the new tests, and will include it in the description for array keyword, but I cant figure out what cd4f46b and f10dd64 is adding as functionality.

Could you give me an example? I can add documentation and a test if you just give me a hint :)

@bopjesvla

Copy link
Copy Markdown
Contributor Author

The first two commits in this PR are kinda misguided and should probably be ignored. The commits you referenced are the real deal.

The first of those implements Postgres arrays. The difference between JSON arrays, which were already implemented, and pg arrays is that the former only takes JS primitives while the latter takes anything.

In a pg database, columns that take arrays have a type like text[], which denotes an array of strings. The last commit simply makes sure that those column types are allowed.

@bopjesvla

Copy link
Copy Markdown
Contributor Author

Actually the first commit is also pretty sane

Again, I'd appreciate it if you could publish this to npm as a patch

@mathiasrw

Copy link
Copy Markdown
Member

Again, I'd appreciate it if you could publish this to npm as a patch

Sure - consider it done...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants