Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13988

migrate executeQuery to live on top of doctrine

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Incomplete
    • Affects Version/s: Unscheduled
    • Fix Version/s: Unscheduled
    • Component/s: Doctrine Integration
    • Labels:
      None
    • Documentation Required?:
      None
    • Sprint:
      Sprint 2
    • Funding Source:
      Needs Funding

      Description

      For backward compatiblity and ensuring that we can execute sql queries, a quick way of emulating this is from the doctrine docs on NativeQuery (which we really cannot use since it involves a lot of the doctrine goodies and result mapping)

      If you want to execute DELETE, UPDATE or INSERT statements the Native SQL API cannot be used and will probably throw errors. Use EntityManager#getConnection() to access the native database connection and call the executeUpdate() method for these queries.

      so basically we get the PDO connection object (which is the DBAL wrapper) and then just execute sql.

      note that this is just a COMPATIBILITY layer fix. We dont move forward (or backward or sideways) with the doctrine project using this, but this allows us to keep a lot of our sql code without migrating. However this is semi useless without wrapping DAO's save/find/fetch/update/insert

      BUT maybe we can do this in the DataObject layer and stub out the DB/* classes and instead redirect to doctrine. More thoughts on that soon

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kurund Kurund Jalmi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: