summaryrefslogtreecommitdiffstats
path: root/system/database
AgeCommit message (Collapse)AuthorFilesLines
2013-03-21Making a performance modification to DB_driver list_fields()RJ garcia1-7/+2
Signed-off-by: RJ garcia <rj@bighead.net>
2013-03-04Merge branch 'develop' of github.com:EllisLab/CodeIgniter into ↵Daniel Hunsaker2-8/+5
feature/exit-status
2013-03-04Fix #2298Andrey Andreev1-6/+3
2013-03-01Optimize changes from PR #2290Andrey Andreev1-4/+2
2013-02-28added spaces after the parameter separatorsMichelle Jones1-2/+2
2013-02-27Remove trailing delimiters from csv_from_resultMichelle Jones1-1/+3
When using the csv_from_result function, the returned string includes an extra delimiter at the end of every line, usually a comma unless another delimiter is specified. A simple addition of a couple of lines to remove the extra delimiter from the column names and the data rows is included. (Lines 241 and 251)
2013-02-23Updated exit codes as constant valuesDaniel Hunsaker1-1/+1
Re-allocated exit status codes according to three references, which follow: BSD sysexits.h:http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits GNU recomendations:http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html Bash scripting:http://tldp.org/LDP/abs/html/exitcodes.html The GNU recommendations stem from and expand upon the standard C/C++ library (stdlibc) definitions, while also suggesting some best-practice conventions which happen to prevent exit status code collisions with bash, and probably other shells. The re-allocated codes are now mapped to constant values, set in *application/config/constants.php*, and used throughout the CodeIgniter core. They would additionally be used in *index.php*, but the constants file hasn't been loaded at that point, so the integer values are used instead, and a comment follows each such use with amplifying information on why that particular value was selected. Finally, the errors documentation has been updated accordingly. Signed-off-by: Daniel Hunsaker <danhunsaker@gmail.com>
2013-02-22Merge branch 'develop' of github.com:EllisLab/CodeIgniter into ↵Daniel Hunsaker7-13/+10
feature/exit-status
2013-02-21Merge pull request #2266 from dionysiosarvanitis/fix/trans_completeAndrey Andreev1-1/+1
DB_driver's trans_complete exception fix
2013-02-21DB_result tests seem to also depend on autoloading via the class_exists() ↵Andrey Andreev1-1/+1
checks ...
2013-02-21Disable autoloader call from class_exists() occurences to improve performanceAndrey Andreev2-4/+4
Note: The Driver libary tests seem to depend on that, so one occurence in CI_Loader is left until we resolve that.
2013-02-21Manually apply PR #2234Andrey Andreev1-0/+1
2013-02-20Remove CI_DB_pdo_driver::Andrey Andreev1-7/+0
Improving on PR #2265, the property is inherited with the same value and doesn't need to be set.
2013-02-19DB_driver's trans_complete exception fixDionysis Arvanitis1-1/+1
2013-02-19Set transaction enabled flag default to TRUEDionysis Arvanitis1-1/+1
2013-01-29Fix list_fields seek bugChris Buckley3-0/+3
On the first list_fields call, the field pointer is moved to the end of the list of fields. This change ensures that the pointer is positioned at the start of the field list before grabbing the names. Signed-off-by: Chris Buckley <chris@cmbuckley.co.uk>
2013-01-28Fix issue #2179Andrey Andreev1-1/+1
2013-01-28Remove unnecessary defined('ENVIRONMENT') checksAndrey Andreev1-1/+1
As suggested in issue #2134 & PR #2149
2013-01-25Updated all cases of exit() to return a valid codeDaniel Hunsaker1-1/+1
Specific codes are as follows, but can easily be changed if a different order/breakdown makes more sense: - 0: Success; everything executed as planned - 1: Configuration Error; something is wrong with/in the configuration file(s) - 2: Class Not Found; what it says - 3: Driver Method Unsupported; the method you're trying to use on a Driver doesn't exist - 4: File Not Found; 404 error - 5: Database Error; something is broken in the database somewhere - 6: Invalid Input; the user attempted to submit a request with invlaid characters in 1+ key names 7 through 26 are reserved for future use - 27: Generic Error; generated by show_error() when the status code is >= 100 28 through 127 are errors generated by user applications, normally by using show_error() with a status code below 100 128 through 254 should not be used by applications, as they are reserved by system-level functions - 255: PHP Fatal Error; automatically generated by PHP for fatal errors, and therefore not allowed for our use Status codes below 100 are shifted up by 28 to place them in the user error range. It may make more sense to have these codes left alone and instead shift the CI errors into the 101 through 127 space, but that's not what I opted for here. It would probably also be a good idea to replace the hard-coded numbers with constants or some such, but I was in a bit of a hurry when I made these changes, so I didn't look around for the best place to do this. With proper guidance, I could easily amend this commit with another that uses such constant values. Signed-off-by: Daniel Hunsaker <danhunsaker@gmail.com>
2013-01-24Move db_select() call from CI_DB_driver::initialize() to db_connect()Andrey Andreev3-15/+27
so that it's only called by drivers that need it ('mysql', 'mssql'). As proposed in issue #2187.
2013-01-15A few adjustments to previous commitvlakoff1-1/+1
2013-01-14Replace is_null() with === / !== NULLvlakoff3-11/+11
Exact same behavior, but faster. I also think it's more readable.
2013-01-10Unify escape_str() array input and LIKE logicAndrey Andreev13-345/+87
Added protected method _escape_str() to deal with quote escaping.
2013-01-10Fix SQLSRV escape_str()Andrey Andreev1-1/+23
2013-01-10Apply improvement proposed in #2142Andrey Andreev2-2/+2
2013-01-09Fix interbase limit issue for subqueriesTimothy Warren1-1/+1
2013-01-01[ci skip] Happy new yearAndrey Andreev79-79/+79
2012-12-20[ci skip] Minor style/spacing changes following PR #2087Andrey Andreev3-13/+13
2012-12-20fixes #2081 : change parameter/variable name to 'foreign_key_checks', update ↵Andrew Podner3-16/+16
change log Signed-off-by:Andrew Podner <a.podner@me.com>
2012-12-19Resolves issue #2081 : provides an option to include statements to disable ↵Andrew Podner3-1/+28
and re-enable foreign key checks in a MySQL database backup output statement.
2012-12-17[ci skip] Fix some spacesAndrey Andreev1-1/+1
2012-12-17update for Issue #2064 (changed docblocks which return $this or only call a ↵Andrew Podner2-36/+36
method that returns $this to @return CI_DB_class_name)
2012-12-15Fix #2072Andrey Andreev1-1/+1
2012-12-04Remove CI_DB_oci8_result::data_seek()Andrey Andreev1-63/+0
It can only call oci_execute() in order to reset the pointer to 0, the oci8 driver doesn't support setting the pointer. Due to the result_object(), result_array() and custom_result_object() calling data_seek() every time prior to fetching the result set, this only causes the query to be executed twice. All of the three methods now cast from existing result_object and/or result_array sets, so the probability to ever need to really fetch the result set again is practically zero and so this method doesn't bring any benefit.
2012-12-04Rename DB_result _data_seek() to data_seek() and make it publicly availableAndrey Andreev9-13/+18
(as requested in #2050)
2012-12-03Fix postgre db_connect()Andrey Andreev1-6/+6
2012-12-03Improve schema support for PostgreAndrey Andreev2-12/+43
2012-12-03[ci skip] Cleaned some spacesAndrey Andreev14-20/+20
2012-11-29Fix #2041Andrey Andreev1-2/+3
2012-11-25Fix #2027Andrey Andreev6-13/+79
2012-11-24Bug fix - optimize_table() in DB utility classDimitar1-1/+1
2012-11-22Fix modify_column() issues (#2020)Andrey Andreev12-42/+38
2012-11-20Fix #1996Andrey Andreev1-10/+13
2012-11-20Fix issue #2015Andrey Andreev4-180/+29
2012-11-20Fix an E_NOTICEAndrey Andreev1-1/+1
2012-11-20Merge pull request #2009 from Eco91/patch-2Andrey Andreev1-1/+1
SQLSRV - Connection error if database name contains space-characters
2012-11-19Update system/database/drivers/sqlsrv/sqlsrv_driver.phpEco911-1/+1
2012-11-19DB forge to use single quotes for ENUM/SET string delimitersAndrey Andreev1-1/+1
2012-11-19Update system/database/drivers/sqlsrv/sqlsrv_driver.phpEco911-1/+1
Connection error if database name contains space-characters. Use of MSSQL brackets => 'USE [Database Name]'  instead of 'USE Database Name'
2012-11-19Add db_set_charset() support for the mssql driverAndrey Andreev1-0/+13