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

Cache table structure on PDO object #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 4, 2020

  1. Configuration menu
    Copy the full SHA
    5c80d87 View commit details
    Browse the repository at this point in the history
  2. Add caching for DB table structure operations

    Similar to ac6f81d for table exists checks.
    
    By remembering the table structure, we don't need to look it up each time we want to insert or update a row. Saves a little bit of time off mass-inserts/updates.
    
    Until we can improve `alterTable()`, the cached table structure is cleared whenever a change is made to the table.
    
    Added:
    - Method `setTableStructure()` to store copy of table schema on PDO instance
    - Method `queryTableStructure()` to prepare and run actual table schema retrieval
    
    Changed:
    - Method `tableStructure()` to delegate and remember lookup
    - Method `alterTable() to clear cached table structure
    mcaskill committed May 4, 2020
    Configuration menu
    Copy the full SHA
    3561c6e View commit details
    Browse the repository at this point in the history