-
-
Notifications
You must be signed in to change notification settings - Fork 823
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
Search Kit - For "Entity" displays, provide TABLE/VIEW options #31632
base: master
Are you sure you want to change the base?
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
ext/search_kit/ang/crmSearchAdmin/displays/searchAdminDisplayEntity.html
Outdated
Show resolved
Hide resolved
35499fe
to
238e986
Compare
public static function getDataModes(): array { | ||
return [ | ||
['table'], | ||
['view'], |
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.
Current test failures are likely because (1) the tests are running on MySQL 5.7 and (2) this new functionality requires MySQL 8.0.
In the most recent push, I commented out all the references to using Common Table Expressions (CTE) as a mechanism. Some thoughts:
|
Following up on discussion today and consideration of MySQL 5.7 compatibility:
|
OK, so I tried this upgrade procedure:
Observations:
|
Overview
In Search Kit, you can create a saved-search and use it to generate a read-only custom API.
Steps to Reproduce
Before
The DB entity is created as a
TABLE
. This table must be periodically refreshed.After
You can optionally set a flag to control data-storage for the entity ("MySQL TABLE" vs "MySQL VIEW" vs "MySQL CTE").
Technical Details
_row
column on aVIEW
requires some trickery.CONCAT(a.id,"_",b.id",...)
? Or limit the feature to non-joined searches?