-
Notifications
You must be signed in to change notification settings - Fork 22
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
Initial support for joining relations and filtering on joined relations. #147
Open
rmallah
wants to merge
10
commits into
preaction:master
Choose a base branch
from
redgrape-tech:list_prefetch_support
base: master
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.
Conversation
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
…on#124 currently read_schema returns the default values of db in verbatim even if they are function calls. This causes attempts to insert the function call body as defaults in columns instead of the the value, which does not makes sense. The current fix returns undef for such column defaults. Additionally as a measure of caution it does not do the above in case the default has been handled in fix_default mapping.
ignoring column defaults of db which are function calls issue preaction#124
currently uuid columns are typed as string with no particular format. However uuid strings stored in uuid data types in databases does not support the like operator. It is better to use '=' operator for the uuid columns for a functional match.
support for uuid data type column in search
support for joins have been implemented in list method. This will allow fetching of related records by specifying in 'join' parameters. currently joining with immediate relations is only supported.
this shall be re-submitted. |
support for specifying complex joins via query parameter is being introduced. The json is encoded as per uri encoding scheme and is decoded into a perl reference. The same reference is passed as the 'join' parameter in DBIC. This allows the same familier syntax to be adopted for specifying the joins. How it works: * The data structure in join is passed to a function _get_unique_relationships to get all the unique relations as keys of a hash. for each of such relation the properties are determined and are stored in another hash having keys in the format 'relation_name.key_name' , the value being the properties of the column. these properties help in using the appropriate operators at sql level. Note that it is also possible to filter the results based on any of the relationship columns by specifying as relation.columnname=somevalue in query parameters.
fac0f86
to
aa73002
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
support for joins have been implemented in list method. This will
allow fetching of related records by specifying in 'join' parameters.
currently joining with immediate relations is only supported.