193 Commits

Author SHA1 Message Date
Matthew Bucci
bf2ef7f418 Merge pull request #55 from PostgreSQL-For-Wordpress/switch-to-mysqli
WIP: Switch to mysqli
v3.0
2023-11-10 11:25:48 -08:00
Matthew Bucci
3d164e15a6 remove the field function because it's already accounted for in the rewriter 2023-11-10 11:24:49 -08:00
Matthew Bucci
402d9cbb73 Update compatibility table 2023-11-10 11:23:15 -08:00
Matthew Bucci
2485f31cdc Change connections to pass by reference to better emulate the mysqli driver 2023-11-10 11:11:04 -08:00
Matthew Bucci
54b4ffb4df add connect error handling 2023-11-09 23:01:26 -08:00
Matthew Bucci
31ce063e06 ignore multi query as part of flush 2023-11-09 22:51:55 -08:00
Matthew Bucci
1f3692d4f9 implement pg_ping 2023-11-09 21:28:21 -08:00
Matthew Bucci
259a58b144 remove nonexistant PG_query mode 2023-11-09 21:24:38 -08:00
Matthew Bucci
20f0d7b9e9 driver fixes 2023-11-09 20:19:02 -08:00
Matthew Bucci
eb3a4c1711 port over what exists from the old pgsql driver 2023-11-09 19:53:49 -08:00
Matthew Bucci
0761849977 add links 2023-11-09 18:05:52 -08:00
Matthew Bucci
5b73c978e7 give example use cases 2023-11-09 18:02:06 -08:00
Matthew Bucci
b66d747b21 add a graphic explaining the design of pg4wp 2023-11-09 17:57:30 -08:00
Matthew Bucci
50db9c8fd8 rewrite mysql driver implementation to replace mysqli instead of mysql 2023-11-09 09:34:33 -08:00
Matthew Bucci
e3f3682bc0 update wordpress dependency files for WP 6.4.1 2023-11-08 22:48:27 -08:00
Matthew Bucci
a810cfb7da cleanup AlterTableSQLRewriter 2023-11-07 15:50:52 -08:00
Matthew Bucci
8a19f4c76d Merge pull request #53 from PostgreSQL-For-Wordpress/mb-fix-install
Migrate install rewriting to new rewriters
v2.3
2023-11-07 15:32:53 -08:00
Matthew Bucci
ed00779cf5 add connection to pg_last_error call 2023-11-07 15:32:19 -08:00
Matthew Bucci
dad1f0d264 formatting 2023-11-07 15:29:37 -08:00
Matthew Bucci
c60d8f90b1 Migrate install rewriting to new rewriters 2023-11-07 15:26:03 -08:00
Matthew Bucci
3754ae32e4 Change plugin info 2023-10-30 22:15:04 -07:00
Matthew Bucci
4d7e4e86ff Merge pull request #44 from PostgreSQL-For-Wordpress/mb-fix-insert-caching
correct regex for insert matching
v2.2
2023-10-30 21:33:02 -07:00
Matthew Bucci
ae2cbff59b add test for verifying parsing of insert statements and caching 2023-10-30 21:32:25 -07:00
Matthew Bucci
fa6222bdee correct regex for insert matching 2023-10-30 21:02:50 -07:00
Matthew Bucci
974ccf11a6 clarify what has been tested so far 2023-10-30 15:48:43 -07:00
Matthew Bucci
5f2d8be921 Add link to releases page to readme v2.1.1-beta 2023-10-30 15:34:34 -07:00
Matthew Bucci
9a805a63de convert readme to markdown 2023-10-30 15:32:15 -07:00
Matthew Bucci
63f3f092ba ensure we don't pass null to trim during ensureGroupByOrAggregate 2023-10-30 15:20:15 -07:00
Matthew Bucci
eb545e68ef Merge pull request #41 from kevinoid/mb-fix-ensure-groupBy
modify ensureGroupBy to pass newly added test for users page query
v2.1-beta
2023-10-30 14:39:09 -07:00
Matthew Bucci
ec9079d9c9 don't split on ',' if within a function 2023-10-30 14:24:27 -07:00
Matthew Bucci
ee6328fca7 Merge pull request #38 from kevinoid/mb-add-basic-tests
Add basic tests
2023-10-30 09:39:57 -07:00
Matthew Bucci
76a8d85238 add github action for running tests 2023-10-30 09:35:50 -07:00
Matthew Bucci
cbe173d2ff add basic testing suite 2023-10-30 09:32:50 -07:00
Matthew Bucci
9fda15b2da correct DB_DRIVER define 2023-10-30 09:27:19 -07:00
Matthew Bucci
f035c8f8b2 Merge pull request #31 from mattbucci/mb-php8-wp6-support
WIP: PHP 8 and Wordpress 6+ support
v2.0-beta
2023-10-29 13:03:01 -07:00
Matthew Bucci
83002198b1 Polymorphic refactor + improvements to select sql rewriting 2023-10-28 02:56:41 -07:00
Matthew Bucci
a45338251e Merge branch 'postgres15-compatibility' into mb-php8-wp6-support 2023-10-28 02:54:37 -07:00
Matthew Bucci
0e692fd263 Merge branch 'php8-compatiblity' into mb-php8-wp6-support 2023-10-28 02:54:19 -07:00
Matthew Bucci
8816e1dcaa replace incorrect constant 2023-10-28 02:50:05 -07:00
Matthew Bucci
1bde430f0d PHP 8 compatibility fixes 2023-10-28 02:43:59 -07:00
Matthew Bucci
aef2e89812 patches for postgres 15 compatibility, various warnings fixes and more 2023-10-28 02:27:14 -07:00
ycz
f2a05dddbe fix meta_value compares bug 1.3.2 2019-07-23 21:19:40 +00:00
Kevin Locke
3fa4370b37 Merge pull request #13 from alexander255/wordpress4-compat
Also search for `pg4wp` data files in the WordPress root directory
2018-03-17 13:17:52 -06:00
Alexander Schlarb
0607337f6b Also check in the WordPress base directory for the PG4WP files 2018-03-17 14:43:04 +01:00
Kevin Locke
06884bd732 Move pg4wp_rewrite_field out of pg4wp_rewrite
To fix "Cannot redeclare pg4wp_rewrite_field"

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-09-24 15:41:21 -06:00
Kevin Locke
54042c1bcc Convert MySQL RAND() to PostgreSQL RANDOM()
These functions are compatible, with the exception that MySQL RAND()
optionally takes a seed argument.  If future queries require seed
support, a call to PostgreSQL SETSEED() can be added.

Fixes: #12

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-09-24 14:18:25 -06:00
Kevin Locke
f896bb1759 Rewrite MySQL FIELD function to CASE statement
PostgreSQL does not provide an equivalent to the MySQL FIELD function.
It is possible to create such a function, although the syntax is
version-dependent (and creates a persistent database object, which so
far has not been done by this plugin).  So use a generic CASE statement.

Fixes: #12

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-09-24 14:07:40 -06:00
Kevin Locke
35e0af4252 Convert HAVING without GROUP BY to WHERE
Fixes #9

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-04-14 12:54:14 -06:00
Kevin Locke
6587b4085b Create MySQL-compatible field function on connect
Fixes: #8

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-04-08 16:20:58 -06:00
Kevin Locke
1d2666ca1d Remove unnecessary isset() before empty()
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-04-08 16:20:39 -06:00