Commit Graph

157 Commits

Author SHA1 Message Date
Damian Mooyman
685e33cf84
BUG Fix postgres + PDO not working
BUG Fix empty enums
2017-11-20 09:07:32 +13:00
Neil Gladwin
7a8bcd1ec5 Returns the last inserted ID using currval() which is session dependant rather than last_value which is across all sessions 2017-10-20 13:38:06 +10:00
Russell Michell
45233e4e74 FIX: Fixes #64 by the addition on of the USING clause. 2017-07-26 08:04:48 +12:00
Damian Mooyman
e941f0b122
API Ensure table aliases longer than max characters are safely re-written 2017-05-26 10:15:10 +12:00
Daniel Hensby
35c1428c63
Getting postgres to work with stricter index api 2017-05-19 18:29:06 +01:00
Loz Calver
b5214def7c FIX: PostgreSQLQuery::seek() returning indexed array instead of associative 2017-01-13 11:04:01 +00:00
Loz Calver
72ca91981f FIX: PostgreSQLQuery::seek() failed to return a row 2017-01-12 16:19:27 +00:00
Daniel Hensby
d3d2875012
FIX BigIng bug with default clause 2016-11-10 00:21:28 +00:00
Damian Mooyman
f2ba2f6717 BUG Fix reference to obsolete API (#59) 2016-10-28 16:50:09 +13:00
Damian Mooyman
a5738dbfd1 BUG Fix installer for 4.0 (#58) 2016-10-26 14:24:00 +13:00
Damian Mooyman
d8aab6383e Rename SS_ prefixed classes (#57) 2016-09-09 15:47:01 +12:00
Damian Mooyman
fc915b856a Update for framework namespacing 2016-09-01 16:22:17 +12:00
Damian Mooyman
586fbce1e8 Update for SilverStripe\CMS namespace 2016-08-12 10:28:47 +12:00
Damian Mooyman
e2096d690c Suppress upgrade of certain strings 2016-07-05 16:27:31 +12:00
Damian Mooyman
db2d4574d8 Remove dead code 2016-07-04 13:53:54 +12:00
Damian Mooyman
f83fa173d9 Move config into private statics for future maintainability 2016-07-04 13:53:54 +12:00
Damian Mooyman
f797f49aeb BUG Fix pg_query / pg_query_params not correctly raising exceptions on error 2016-07-04 13:32:41 +12:00
Damian Mooyman
946d429c41 Upgrade code for new namespaces 2016-07-04 13:32:41 +12:00
Damian Mooyman
3780d1b152 BUG Fix constraints ignoring schema 2016-01-21 09:52:37 +13:00
Damian Mooyman
e46a37090c Converted to PSR-2 2016-01-21 09:49:28 +13:00
Damian Mooyman
24caacbf3b Merge remote-tracking branch 'origin/1.2'
# Conflicts:
#	code/PostgreSQLSchemaManager.php
#	composer.json
2016-01-21 09:30:15 +13:00
helpfulrobot
605ba3eeff Converted to PSR-2 2015-12-18 07:18:01 +13:00
Damian Mooyman
2b3da3c9a8 BUG Fix decimal not supporting non-integer values 2015-11-03 09:14:10 +13:00
Damian Mooyman
90a7539ebd Fix incorrect SQL 2015-10-16 11:47:58 +13:00
Damian Mooyman
f932aa4b04 Update master to 2.0 for 4.0 compatibility 2015-10-16 11:30:00 +13:00
Damian Mooyman
a596d9d343 Update API for 3.2 release
Fix bug with literal question mark in conditions
See https://github.com/silverstripe/silverstripe-framework/pull/4288
2015-06-17 13:50:36 +12:00
Loz Calver
0a61b16caf NEW: Allow 'null' limit in database queries 2015-05-04 15:36:49 +01:00
Ingo Schommer
5a7ea699a0 Fixed indentation from last commit 2015-04-30 23:30:23 +12:00
David Preece
7bb29a9288 Fixes alter table problem
If you can log in (with write permissons), you can alter tables.
2015-03-14 12:14:54 +13:00
Damian Mooyman
1aeb7b1436 Merge pull request #30 from ClaySolutions/master
Add bigint support
2015-02-25 08:52:57 +13:00
Sean Harvey
846f31b31c Merge pull request #26 from torleif/patch-1
FIX postgres can filter on non text fields
2014-09-24 18:06:06 +12:00
Damian Mooyman
010ce575ed BUG Fix issues in master 2014-07-18 13:06:58 +12:00
ClayLennart
d9699fa28d Add bigint support 2014-07-15 09:44:01 +02:00
Damian Mooyman
abe3843012 API Upgraded module to use new database ORM 2014-07-11 09:13:52 +12:00
torleif
7626d74bee FIX postgres can filter on non text fields
This issue causes the comparison to fail if comparing a non text fields (for example, a date or integer). This will cause the CMS to fail in places such as Gridfield selector. 

Similar fix as this one: https://github.com/silverstripe/silverstripe-framework/pull/2242 The difference being comparisonClause(...) being more apt solution in SS 3.1
2014-04-08 13:24:05 +12:00
Sam Minnee
863ead3255 FIX: Fix fatal bugs in previous commit. 2014-02-14 15:27:36 +13:00
Sam Minnee
f967c20383 FIX: PostgreSQLDatabase::selectDatabase() should switch to the database if it exists.
Previous implementation of PostgreSQLDatabase::selectDatabase() just updated internal
registers, and expected connectDatabase() or similar to be called.  This is out of line
with MySQLDatabase's behaviour, and frankly a bit stupid.  FullTextSearch's test system
expected different behaviour from selectDatabase() and so this is needed to fix that.

Since it's making PostgreSQLDatabase match the behaviour of MySQLDatabase, I don't consider
it an API change.
2014-02-14 13:49:11 +13:00
Simon Welsh
b8771b79da Better error handling and support passwords with spaces in them 2013-12-20 14:34:31 +13:00
Sean Harvey
65702e4a6b Merge pull request #22 from stojg/unittest-speed-improvements
NEW: Improve the unittest running time by not truncating tables
2013-06-06 16:40:49 -07:00
Stig Lindqvist
082adb4fd6 NEW: Improve the unittest running time by not truncating tables
When clearing tables this will delete all rows instead of truncating it.

Benchmarking this change by running the full cms and framework test suit changed improved the running time from 32 minutes to 9 minutes.

If truncate functionality is needed for any special cases it should be run as

    DB::query("TRUNCATE \"TableToTruncate\"");
2013-06-06 13:43:31 +12:00
Stephen Shkardoon
0c7362bbc5 Update PostgreSQLDatabaseConfigurationHelper.php
In prepration for https://github.com/silverstripe/sapphire/pull/1319
Probably should accept this at the same time.

If someone knows of the relevant ALTER permissions in Postgres, feel free to implment.
2013-03-24 03:03:59 +13:00
Stig Lindqvist
201e5b7b8b BUG: Infinite loop on failed connect to a postgresql server
When a postgres db server is down or credentials are wrone, the adapter still tries to check for a existing database and loops back into trying to connect again.
2013-02-27 11:17:11 +13:00
Ingo Schommer
cd7b761bed BUG Faulty query escape in tableList()
This caused tables starting with "sql" to be excluded from
the tableList() results, where only "sql_" should be filtered.
An unescaped underscore in ANSI SQL pattern matching stands
for "any single character", the escape needed to be doubled
to account for PHP's own escape expanding.

This broke SQLQueryTest since the test data wasn't reset
between test runs.
2012-12-11 15:09:10 +01:00
Ingo Schommer
fc7a21b567 BUG Support for case sensitive searches
Through newly added Database->comparisonClause() API
2012-12-11 01:47:47 +01:00
Damian Mooyman
9b623a2b2b BUG Unescaped underscore in query unintentionally hid any table beginning with 'SQL' or 'PG' 2012-11-16 14:42:49 +13:00
Damian Mooyman
ef4cd20cfa FIXED: Minor typo in string concatenation 2012-09-24 12:46:23 +12:00
Sam Minnee
3fe7671442 FIX: Conditional revert of 06f80d3347 as the original code is necessary in some configurations.
Now we have the magic of an if block to guide us.
2012-09-19 17:28:17 +12:00
Sam Minnee
06f80d3347 FIX: Fix the apparently obsolete code for extracting search index columns from the trigger meta-data. 2012-09-18 13:19:22 +12:00
Sam Minnee
54821bde2d FIX: Fixed PostgreSQLDatabase::indexList() / PostgresSQLDatabase::requireIndex() so that it doesn't need to infer the ORM-name for the index in order to determine the schema update. 2012-09-18 13:19:19 +12:00
Sam Minnee
8cd7cc5127 Removed unnecessary exec bit. 2012-09-18 12:49:21 +12:00