-
Notifications
You must be signed in to change notification settings - Fork 15
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
Pgsql encoder #21
Open
gvasilopulos
wants to merge
28
commits into
tom--:pgsql-encoder
Choose a base branch
from
gvasilopulos:pgsql-encoder
base: pgsql-encoder
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pgsql encoder #21
Changes from 18 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
15bdcb8
removed dynColSqlMaria function, simply json_encode($attributes) in e…
a6c08b1
runned tests for pg and updated results in pgsql1.txt
8922cc1
some cleanup
49b6dce
modified test fixtures to not set id and let pg handle it through ser…
415c110
modified test fixtures to not set id and let pg handle it through ser…
270b23c
altered pgsql encoder to create attribute the way that seems proper
90791cd
altered pgsql encoder to create attribute the way that seems proper, …
1cc09c4
fixed error of $type declared as a const
54f9b57
fixed error of $type declared as a const
e0c56b3
altered encoderInterface no reason to set $type default in interface …
b07f8bd
altered encoderInterface no reason to set $type default in interface …
4583cd6
altered encoderInterface no reason to set $type default in interface …
bec2b6e
updated test results
99d1880
updated test file
7742a49
updated test file altered pgencoder to use jsonb_extract_path_text wh…
b9ebbc6
updated test file altered pgencoder to use jsonb_extract_path_text wh…
0799cbb
added numeric and text types to daq, modifies pgsqlencoder to accept …
d5e4267
added numeric and text types to daq, modifies pgsqlencoder to accept …
e3e3f37
reformatted the code to comply with psr2 standards altered encoder to…
gvasilopulos 817f1b8
created distinct regexp for postgres
gvasilopulos 5fc39ea
added exception for not supported jsonb dbtypes under postgres
gvasilopulos aed81d9
bugfixes, updated test file to be "closer" to the original dynamicrec…
gvasilopulos 7cdeb47
reformated sources to psr2 standard
gvasilopulos 3cd8844
added boolean type
gvasilopulos 6cd0565
added boolean type
gvasilopulos e4003a9
removed unused files
gvasilopulos 31f5f7b
added test for complex json stucture, added fixtures for complex json
gvasilopulos 768895d
added test for complex json stucture, added fixtures for complex json
gvasilopulos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want to use the same regex for pgsql and maria then we must test that all acceptable patterns behave properly. e.g. do things like
decimal
,datetime
anddouble
work in pgsql? donumeric
andtext
work in maria?if not then the exception should make clear what the problem is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking to implement just 3 types for pg numeric, jsonb, and char/text which is the default.
Postgres may have a hole lot of other types but in my mind that does not matter since we get json types back.
If anyone wants to typecast to anything else he can use (!dyncol|jsonb!)::postgres_data_type.
I'm thinking of including that possibility to the documentation. In fact the type declaration with the format dyncol|type was done for compatibility reasons one could use ::type straightforward in the start of the implementation.
You are right about removing it from maria's regexp. I will remove it asap and implement a regexp for pg.
I used a psr2 formatter to format the code to psr2 which I think is the yii2 coding standard.Hope it is ok now
I also added my real name and email to the git configuration
I'll get back to you with bug report later today.