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

Connection: added option [result][formatJson] that sets json column decoding (string|object|array) #335

Merged
merged 1 commit into from Sep 9, 2019

Conversation

paveljanda
Copy link
Contributor

@paveljanda paveljanda commented Sep 9, 2019

  • new feature? yes
  • BC break? no

Dibi\Connection($config) -> added new option $config['result']['formatJson'] to tell the Dibi\Result how to format json column. 3 options available: array (default, therefore no BC breaks), object (formatting json to \stdClass) and string.

@dg
Copy link
Owner

dg commented Sep 9, 2019

Great, thanks

@dg
Copy link
Owner

dg commented Sep 9, 2019

Wouldn't be better strings instead of text?

@paveljanda
Copy link
Contributor Author

I thought it would stick to Dibi conventions when it is a column type -> text. But sure, I will change it.

@dg
Copy link
Owner

dg commented Sep 9, 2019

Column type is text, but PHP type should be string IMHO

@paveljanda
Copy link
Contributor Author

It's done 👍

@paveljanda paveljanda changed the title Connection: added option [result][formatJson] that sets json column decoding (text|object|array) Connection: added option [result][formatJson] that sets json column decoding (string|object|array) Sep 9, 2019
@dg
Copy link
Owner

dg commented Sep 9, 2019

Thanks!

@dg dg merged commit a2afac8 into dg:master Sep 9, 2019
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.

None yet

2 participants