Skip to content

Update PgSQL driver to enable mapping#262

Open
mreiden wants to merge 12 commits intoconsolibyte:masterfrom
mreiden:postgres-driver
Open

Update PgSQL driver to enable mapping#262
mreiden wants to merge 12 commits intoconsolibyte:masterfrom
mreiden:postgres-driver

Conversation

@mreiden
Copy link
Copy Markdown
Contributor

@mreiden mreiden commented Jun 19, 2019

PgSQL driver updates to allow DB <-> QuickBooks mapping feature.

  • Lowercase table, column, and index names due to postgres case-folding names to lowercase unless they are quoted. They were quoted during table creation but not insert/update resulting in "ERROR: column "refnumber" does not exist. HINT: Perhaps you meant to reference the column "RefNumber" errors. (Solves PR Lowercase Table Names for PGSQL #39).
  • Create timestamp columns as timestamp without time zone instead of TEXT by adding a missing break in case statement.
  • Handle QUICKBOOKS_DRIVER_SQL_DATE to create date columns as DATE instead of TEXT.
  • Add hasTrueBoolean method to SQL Drivers to use true/false values instead of 1/0 for PgSQL. PgSQL does not accept 1/0 for Boolean.
  • Use class constants instead of undefined constants in mirroring examples.

Successful mapping depends on QuickBooks_Map_Qbxml class name capitalization change in PR #261.

This PR is based on top of the whitespace removal in #258.

mreiden added 12 commits June 13, 2019 15:49
…e commented out QUICKBOOKS_DRIVER_SQL_BOOLEAN MySql case (PgSQL version remains above) that accidentally included the return $sql.
…, QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY, and QuickBooks_WebConnector_Server_SQL::MODE_READWRITE instead of undefined QUICKBOOKS_SERVER_SQL_MODE_READONLY, QUICKBOOKS_SERVER_SQL_MODE_WRITEONLY, and QUICKBOOKS_SERVER_SQL_MODE_READWRITE in example_mssql_mirror.php and example_pgsql_mirror.php.
…mn and requires quotes for CoLuMn and you can actually create both in the same table if you want to cause mass confusion). Successful mapping depends on PR consolibyte#261.  Cleaned up version solves PR consolibyte#39.
… values for booleans in Pgsql driver and 1/0 for the other drivers.
… QUICKBOOKS_SERVER_SQL_CONFLICT_LOG and QUICKBOOKS_SERVER_SQL_DELETE_FLAG in PgSQL and Microsoft SQL. Use the same $mode and $delete settings as are in the MySQL example for consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant