summaryrefslogtreecommitdiff
path: root/datadict
AgeCommit message (Collapse)AuthorFilesLines
2020-01-12Fix PHPDocDamien Regad1-13/+16
2020-01-12oci8: create compact trigger/sequence namesMark Newnham1-16/+43
This enhancement provides a method of creating an emulated auto- increment column for a table with a name greater than 25 characters, built using createTableSql() and specifying an "AUTO" option on the required column. Instead of using the table name, a CRC32 value of the tablename is created and used for the name of the sequence and trigger, i.e. instead of a trigger called "TRIG_EMPLOYEES" for a table called "EMPLOYEES", it creates a trigger "TRIG_3129131776", and similarly, a trigger for a table named "EMPLOYEE_HOURLY_PAY_RATES" becomes "TRIG_3754194288". The name of the trigger and sequence can be easily obtained after the fact by finding the CRC32 value of the table name. The feature is provided with a compatibility flag that must be enabled. Existing configurations that already use this feature are unchanged. To activate, set the dictionary class variable `$dict->useCompactAutoIncrements = true` when building the table, and the connection class variable `$db->useCompactAutoIncrements = true` when using the table in ADOdb. The feature is global for the database and cannot be specified on a table level basis. Fixes #565
2019-12-30mssqlnative: Added BLOB NOT NULL and DEFAULT supportMartin Schleußer1-0/+3
See #292, #478
2019-12-30db2: Added BLOB NOT NULL and DEFAULT support.Mark Newnham1-0/+4
See #292
2019-12-30Provides Control of BLOB data dictionary featureMark Newnham3-2/+8
ADOdb automatically disallows setting of NOT NULL or DEFAULT values on blob type fields. This was due to historic limitations on data types that no longer exists. This commit takes the work done in PR #118 by @obmsch and adds the driver for SQLite. Fixes #292
2019-12-30pgsql: specialized casts for _recreate_copy_table()Ralf Becker1-13/+27
Current PostgreSQL versions wont allow an ALTER COLUMN between varchar and bytea (blob) without an explicit cast. This pull request adds this casts for both directions and fixes sequence name detection to understand newer ::regclass instead of ::text in defaults. Fixes #207 Signed-off-by: Damien Regad <dregad@mantisbt.org> Original commits in PR #207 squashed and message reworded.
2019-11-12Codespell assisted typo cleaningJean-Michel Vourgère2-11/+11
2019-06-25Syntax error prevents correct sequence creation see #540Mark Newnham1-1/+1
The feature that duplicates auto-increment key fields does not work if the start number for the sequence is greater than 1
2018-07-29This release of the IBM DB2 driver is a full rewrite, based on the DB2Mark Newnham1-11/+65
native mode client, instead of the ODBC based one used previously. It encompasses the following changes: 1. All of the missing data dictionary functions have been added. 2. Proper binding of parameters to queries. 3. Support for stored procedures. 4. Full support for specific table casing, via a new method, setTableCase(). 5. Support for the setConnectionParameter() method, allowing use of elements such as CURSOR and trustedcontext 6. Connections via both catalogued and uncatalogued connections. 7. Support for sequences 8. The option $uCaseTables is no longer supported 9. The performance monitor is currently out of operation due to changes in the DB2 system tables The driver has been tested on PHP version 7.1, and is not supported on ADOdb versions less than 5.21
2017-05-13method ChangeTableSQL is incompatible with parent method, see #338Mark Newnham1-2/+1
2016-12-17Merge branch 'hotfix/5.20.8'Damien Regad1-9/+61
Conflicts: drivers/adodb-mssqlnative.inc.php
2016-12-17Reset version to avoid merge conflictsDamien Regad14-14/+14
2016-12-17Bump version to 5.20.8v5.20.8Damien Regad14-14/+14
2016-12-17mssql: fix drop/alter column with existing default constraintMartin Schleußer1-9/+61
With MSSQL it is not possible to drop or alter a column with an existing constraint. The constraint has to be removed before the operation takes place. In 'datadict-mssqlnative.inc.php' AlterColumnSQL is commented out and DropColumnSQL doesn't care. This tries to fix the problem with the smallest possible impact: - Fix DropColumnSQL(), to allow the drop even with a constraint on that given column. We drop, so any default doesn't matter. - Fix AlterColumnSql(), to allow changes if (and only if !) either a 'new' default is given for an existing default, or there is no existing one at all. So something like 'ALTER TABLE t ALTER COLUMN c INT NOT NULL' with an existing constraint on c will still fail since it can't be determined if keeping or removing the constraint is implied here. Fixes #290 via #297 Changes to original commit: - split long lines, whitespace - Added commit message text from issue #290's description Signed-off-by: Damien Regad <dregad@mantisbt.org>
2016-09-20Bump version to 5.20.7v5.20.7Damien Regad14-14/+14
2016-09-20Update changelogDamien Regad14-14/+14
2016-08-31Bump version to 5.20.6v5.20.6Damien Regad14-14/+14
2016-08-10Bump version to 5.20.5v5.20.5Damien Regad14-14/+14
2016-03-30Bump version to 5.20.4Damien Regad14-14/+14
2016-02-26Revised Firebird driverLester Caine1-15/+90
The new driver is no longer based on ADODB_ibase, but extends ADOConnection instead, and makes use of PHP's fbird_* functions. Fixes #201 Signed-off-by: Damien Regad <dregad@mantisbt.org> Changes to original commit [1]: whitespace, coding guidelines, phpDoc [1] http://hg.lsces.org.uk/bw/bitweaver/externals/adodb/rev/b4efbd3bfe07
2016-01-31A user-defined default Metatype is now availableMark Newnham5-6/+9
The user can now define a constant ADODB_DEFAULT_METATYPE. This overrides the original default value of 'N' and allows the user to control how a field of unknown metaType is presented. The constant controls the behavior of the returned value from the method MetaType(). Fixes #165
2016-01-31addColumnSql now supports ENUM data typesMark Newnham1-0/+18
addColumnSql (and methods that call it, such as createTableSql), now correctly parse the ENUM data type and associated VALUE lists, if the underlying database supports it. actively supported databases known to support it are mysql, postgres, oracle, db2. The statement will fail if the database does not support it (e.g. mssql, sqlite) Fixes #26
2016-01-31Added optional argument to datadict/_getsize()Mark Newnham3-5/+5
The private method datadict/_getSize() now has a new, optional 5th argument that allows the passing of additional information for processing data types See issue #26
2016-01-02Update version 5.21.0-dev release year to 2016Damien Regad14-14/+14
2016-01-01Bump version to 5.20.3v5.20.3Damien Regad14-14/+14
2016-01-01method _createSuffix in datadict-sqlite incompatible with parent. see ↵Mark Newnham1-1/+1
https://github.com/ADOdb/ADOdb/issues/178
2015-12-27Update version to avoid merge conflictsDamien Regad14-14/+14
2015-12-27Bump version to 5.20.2v5.20.2Damien Regad14-14/+14
2015-12-06Bump version to 5.20.1v5.20.1Damien Regad14-14/+14
2015-11-28Bump version to 5.21devDamien Regad14-14/+14
2015-11-28Bump version to 5.20.0v5.20.0Damien Regad14-14/+14
2015-11-26Adjust header comment blocksDamien Regad14-14/+42
- running SED script - manual adjustments for files not processed by regex
2015-03-04postgres: Fix AlterColumnSQL when updating multiple columnsJouni Ahto1-1/+1
Prior to this, when argument $flds contained more than 1 column to modify, the loop was generating SQL like: ALTER TABLE sometable ALTER COLUMN col1 ... ALTER TABLE sometable ALTER COLUMN col1col2 ... ALTER TABLE sometable ALTER COLUMN col1col2col3 ... Fixes #72 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2015-03-04oci8: fix broken quoting in tablesAndreas Fernandez1-0/+2
The methods "AddColumnSQL" and "AlterColumnSQL" did not quote the table name propery, resulting in broken ALTER TABLE statements. Fixes #67 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2014-09-08Align method signatures to parent classAndreas Fernandez10-19/+19
Fixes #31 Changes to original commit: whitespace and updated changelog. Signed-off-by: Damien Regad <dregad@mantisbt.org>
2014-05-16Fix #18: PHP Strict Standards in oci8 datadictDamien Regad1-3/+3
Some methods' signature did not match the parent class
2014-04-30Bump version to 5.20devDamien Regad14-14/+14
2014-04-23Bump version to 5.19v5.19Damien Regad14-14/+14
2014-04-07oci8: fix ORA-24344 when creating sequence triggerDamien Regad1-1/+1
2014-02-24Remove closing php tagDamien Regad14-24/+0
http://php.net/manual/en/language.basic-syntax.phptags.php
2014-01-21Bump version to 5.19devDamien Regad14-14/+14
Bumped 'dev' version allows users who rely on source code downloaded from the git repository rather than an official release tarball to reliably determine that they are running a development version of the library.
2013-09-20PostgreSQL: AlterColumnSQL properly reset default for NULLDamien Regad1-1/+4
2013-09-20PostgreSQL: AlterColumnSQL don't remove default NULL valueDamien Regad1-1/+4
The preg_replace statement was doing a global replace of 'NULL' by '', ignoring the fact that a column can be 'DEFAULT NULL', causing the function to generate incorrect SQL.
2013-09-20Reduce number of string concatenationsDamien Regad1-11/+13
Simplify the code by setting $alter to include $colname
2013-09-20Reformat if statement with bracesDamien Regad1-2/+6
2013-09-19Whitespace fixesDamien Regad1-67/+66
2013-08-22'str' not a valid phpdoc type definition keywordDamien Regad1-5/+6
2013-08-22Number of arguments did not match parent functionMark Newnham1-1/+4
Causing error with E_STRICT. Fixes #2
2013-08-09Various MSSQL fixesMark Newnham1-20/+50
Contact the commit's author directly for all comments/fixes. General ======= - The driver is qualified to run on Server 2005, 2008 and 2012. - At startup, the driver identifies the SQL Server version, which allows it to invisibly take advantage of new features available in SQL server 2012. - It will not run on SQL Server 2000, although I'm sure it would be easy enough to fix. - It includes all patches to the known bugs that I can find on the phplens forum. - Much of the debugging has been removed, as this impeded program debugging when used with FastCGI - Some fixes are my own versions of those reported on the phplens boards drivers/adodb-mssqlnative.inc ============================= Changed mapping of bigint from I to I8 MetaColumns() -------------- Missing MetaColumns function, re-introduced, Produces an extended list of 10 field attributes, including auto-increment, nullable GenID() / CreateSequence() -------------------------- - On Server 2008 and lower, uses the historical sequence emulation. - On Server 2012. Uses the newly introduced Create Sequence statement. FetchField() ------------ This follows the method used in the oracle driver and caches the metadata at initialisation, which helps performance. datadict/datadict-mssqlnative.inc ================================= Missing file reintroduced, to support SQL Server format datadict functions perf/perf-mssqlnative.inc ========================= Tables() -------- Arguments to the Tables() function declared incorrectly
2013-08-05Reorg: ADOdb5 (master) branchDamien Regad14-0/+2624
- Move all files in adodb5/ to root - Remove adodb-for-php4/ directory