Closed (fixed)
Project:
Drupal driver for SQL Server and SQL Azure
Version:
8.x-1.x-dev
Component:
Schema handling
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
14 Nov 2019 at 23:55 UTC
Updated:
22 May 2020 at 18:59 UTC
Jump to comment: Most recent
Comments
Comment #2
mikeryanComment #3
beakerboyThank you for the patch. I plan on reviewing it soon. If this were a non-default driver option, how would like to see the user enabling or disabling the option? If it is through the module settings configuration, I would appreciate you adding that to the patch.
Comment #4
beakerboyComment #5
beakerboyGood idea. One improvement may be a flag that can be set by the
changeFoo()functions. This way, if a connection changes a table, that connection will update the cache the next timequeryColumnInformation()is called. Can a static property be used to flag the need to update across all connections? The way this is currently written, core tests will probably fail when the changeTable and changeField methods are tested in core Kernel tests.Comment #6
beakerboyBetter idea. Every time a schema function perform an “ALTER TABLE” query, or anything that changes the schema, unset the appropriate entry in the columnInformation array. Also, provide a public method to unset the element in case a user changes the schema with a static query.
Comment #7
beakerboyMost of the time, the only piece of this information that is actually used is the list of blobs. I wonder if things would speed up if we just queried for the blobs instead of the entire table's schema.
Comment #8
beakerboyWOW! I just implemented this, and it dropped the time to run the entire Drupal test suite in Travis-ci from 6 hours down to 4.5. By consolidating tests to reduce the number of containers I'm spinning up, I can drop it to 4 hours.
Comment #9
beakerboyAdded this as a feature that can be enabled by users when installing.