Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Add Support for Key Value Hash#105

Open
nHurD wants to merge2 commits intoeulerto:master
base:master
Choose a base branch
Loading
fromnHurD:feature/column_value

Conversation

nHurD
Copy link

This will add support for outputting change data in a key value hash rather than a series of arrays (see#71) and is enabled by setting theuse-key-value-hash to1.

Once enabled, the changes will be outputted as follows:

{"change":[{"kind":"insert","schema":"public","table":"table_with_pk","changes":{"a":2,"b":1,"c":2,"d":3,"e":3.540,"f":876.563,"g":1.23,"h":"teste     ","i":"testando","j":"um texto longo","k":"001110010101010","l":"Sat Nov 02 17:30:52 2013","m":"02-04-2013","n":true,"o":"{ \"a\": 123 }","p":"'Old' 'Parr'"},"columntypes":{"a":"smallint","b":"smallint","c":"integer","d":"bigint","e":"numeric(5,3)","f":"real","g":"double precision","h":"character(10)","i":"character varying(30)","j":"text","k":"bit varying(20)","l":"timestamp without time zone","m":"date","n":"boolean","o":"json","p":"tsvector"}}]}

AndreSteenveld reacted with thumbs up emoji
This will add an additional configuration flag that, if enabled, willoutput the changes in a hash map rather than a series of arrays. Whenenabled, the output will look something like this:```json{"change": [{"kind": "insert","schema": "public","table": "table_with_pk","changes": {"a": 18,"b": "Test Insert","c": "2019-01-11 07:05:33.047587"},"columntypes": {"a": "integer","b": "character varying(30)","c": "timestamp without time zone"}}]}```
Add additional tests to ensure the new key value functionality worksas expected.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@nHurD

[8]ページ先頭

©2009-2025 Movatter.jp