Commit Graph

20 Commits

Author SHA1 Message Date
Damian Mooyman
19549d620f Moved deprecation of SQLQuery to 4.0 2014-12-04 09:30:50 +13:00
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
Damian Mooyman
d8e9af8af8 API New Database abstraction layer. Ticket #7429
Database abstraction broken up into controller, connector, query builder, and schema manager, each independently configurable via YAML / Injector
Creation of new DBQueryGenerator for database specific generation of SQL
Support for parameterised queries, move of code base to use these over escaped conditions
Refactor of SQLQuery into separate query classes for each of INSERT UPDATE DELETE and SELECT
Support for PDO
Installation process upgraded to use new ORM
SS_DatabaseException created to handle database errors, maintaining details of raw sql and parameter details for user code designed interested in that data.
Renamed DB static methods to conform correctly to naming conventions (e.g. DB::getConn -> DB::get_conn)
3.2 upgrade docs
Performance Optimisation and simplification of code to use more concise API
API Ability for database adapters to register extensions to ConfigureFromEnv.php
2014-07-09 18:04:05 +12:00
Ingo Schommer
3334eafcb1 API Marked statics private, use Config API instead (#8317)
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Ingo Schommer
664903433d Mark DBDatetimeTest skipped on wrong offsets, rather than error out.
While well-intentioned, this test keeps causing problems
due to wrong timezone settings in test mode.
It shouldn't completely abort test execution,
since its more of an environment sanity check than a failed test.

Refactored to mark test skipped (regardless of offset, as long as
its greater than 5 seconds). And skipping tests altogether
on SQLite3 with new supportsTimezoneOverride() check.
SapphireTest->setUp() sets the PHP timezone to UTC (see 59547745),
but SQLite doesn't support this for a DB connection.
Since changing it on a global UNIX system level is infeasible,
the tests need to be skipped.
2012-07-05 16:20:18 +02:00
Sean Harvey
bb9ffd2eb1 ENHANCEMENT SQLQuery::selectField() returns a SQLQuery object to be
consistent with how the other add/set methods work.
MINOR Fixing DbDatetimeTest to use the correct selectField to select an
alias
2012-05-07 16:59:42 +12:00
Sean Harvey
051d9de482 API CHANGE Deprecated internal access to SQLQuery properties, update core code to reflect these changes.
Using set/add instead in accessor methods, and use Database::sql*ToString() to allow easier per-database adapter SQL overloading.
2012-05-07 14:21:44 +12:00
Sam Minnee
2207e3d978 API CHANGE: Add SQLQuery::prepareSelect(), to further remove the need for direct property access.
API CHANGE: Change the format of SQLQuery::$select to use aliases as keys.
2012-05-01 18:15:11 +12:00
Simon Welsh
f8082e4814 MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
Fred Condo
82bb12b5d3 MINOR: Explicitly declare $adapter in DbDatetimeTest 2012-03-27 10:28:10 -07:00
Ingo Schommer
cc61551dae MINOR Using raw SQL queries in DBDatetimeTest as SQLQuery returns false if no explicit FROM part is provided (previously working API was broken in 4171015d) 2011-10-07 14:12:52 +02:00
Ingo Schommer
908eeb4811 MINOR Fixed SQL quoting in DbDatetimeTest (broke PostgreSQL) 2011-05-31 08:18:50 +12:00
Ingo Schommer
11b409aac8 MINOR Using SQLQuery wrapper in DbDatetimeTest to provide better cross-db support, specifically correct LIMIT syntax in MSSQL (previously broken in a9b13509) 2011-05-19 11:38:43 +12:00
Ingo Schommer
2870eb9212 MINOR Changed $fixture_path to relative filenames in all sapphire test cases in order to allow easier file moving and less verbosity in tests 2011-03-30 23:04:48 +13:00
Ingo Schommer
a9b13509d2 MINOR Removed dependency on SiteTree in various unit tests 2011-03-29 18:07:58 +13:00
Sean Harvey
9ac991636e MINOR Merged r113933,113936-113937 from branches/2.4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114001 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-22 02:02:11 +00:00
Sam Minnee
7d09ef3e60 MINOR Change matchesRoughly threshold slightly in DbDatetimeTest to allow for slower database server connections (from r111821)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112924 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:55:50 +00:00
Ingo Schommer
4c1938fabd MINOR Added DbDatetimeTest cases to sapphire (these were previously in the sqlite3 module, but they actually test core Database functionality) (from r105196)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112443 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:28:43 +00:00