{"action":"created","issue":{"url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/565","repository_url":"https://api.github.com/repos/vitaly-t/pg-promise","labels_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/565/comments","events_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/565/events","html_url":"https://github.com/vitaly-t/pg-promise/issues/565","id":377776929,"node_id":"MDU6SXNzdWUzNzc3NzY5Mjk=","number":565,"title":"Exporting via stream - not expected behaviour","user":{"login":"kristjank","id":414412,"node_id":"MDQ6VXNlcjQxNDQxMg==","avatar_url":"https://avatars2.githubusercontent.com/u/414412?v=4","gravatar_id":"","url":"https://api.github.com/users/kristjank","html_url":"https://github.com/kristjank","followers_url":"https://api.github.com/users/kristjank/followers","following_url":"https://api.github.com/users/kristjank/following{/other_user}","gists_url":"https://api.github.com/users/kristjank/gists{/gist_id}","starred_url":"https://api.github.com/users/kristjank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristjank/subscriptions","organizations_url":"https://api.github.com/users/kristjank/orgs","repos_url":"https://api.github.com/users/kristjank/repos","events_url":"https://api.github.com/users/kristjank/events{/privacy}","received_events_url":"https://api.github.com/users/kristjank/received_events","type":"User","site_admin":false},"labels":[{"id":183000956,"node_id":"MDU6TGFiZWwxODMwMDA5NTY=","url":"https://api.github.com/repos/vitaly-t/pg-promise/labels/no-issue","name":"no-issue","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-06T10:14:02Z","updated_at":"2018-11-07T12:52:45Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\nWhen exporting data via stream\r\n```\r\nconst qs = new QueryStream('select * from table')\r\nconst data = await options.database.db.stream(qs, s => s.pipe(encodeStream).pipe(snapshotWriteStream))\r\n\r\n```\r\nthe data is exported in raw format. Meaning that the global settings for https://vitaly-t.github.io/pg-promise/global.html#event:receive should be ignored. In our implementation we have conversion of properties setup, like this: \r\nhttps://github.com/ArkEcosystem/core/blob/docs/snapshost/packages/core-database-postgres/lib/connection.js#L63\r\n\r\nAccording to docs, this should be ignored when using stream export.\r\n\r\n### Actual behaviour\r\nWhat actually happens is that every 100th returned record from the query gets camelized, and others not?\r\n{record 98: block_id: 1, sender_public_key: 'zzzz'}\r\n{record 99: block_id: 1, sender_public_key: 'zzzz'}\r\n{record 100: **blockId**: 1, **senderPublicKey**: 'zzzz'}\r\n{record 101: block_id: 1, sender_public_key: 'zzzz'}\r\n\r\n### Steps to reproduce\r\n\r\n\r\n### Environment\r\n\r\n* Version of pg-promise: latest\r\n* OS type (Linux/Windows/Mac): mac os, linux-ubuntu\r\n* Version of Node.js: node 10\r\n"},"comment":{"url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/comments/436613105","html_url":"https://github.com/vitaly-t/pg-promise/issues/565#issuecomment-436613105","issue_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/565","id":436613105,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjYxMzEwNQ==","user":{"login":"vitaly-t","id":5108906,"node_id":"MDQ6VXNlcjUxMDg5MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/5108906?v=4","gravatar_id":"","url":"https://api.github.com/users/vitaly-t","html_url":"https://github.com/vitaly-t","followers_url":"https://api.github.com/users/vitaly-t/followers","following_url":"https://api.github.com/users/vitaly-t/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-t/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-t/subscriptions","organizations_url":"https://api.github.com/users/vitaly-t/orgs","repos_url":"https://api.github.com/users/vitaly-t/repos","events_url":"https://api.github.com/users/vitaly-t/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-t/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T12:52:45Z","updated_at":"2018-11-07T12:52:45Z","author_association":"OWNER","body":"The `receive` handler receives all records. Why your code doesn't change all of them - I don't know, depends on what that code is doing."}}
{"actor":{"display_login":"vitaly-t"}}