| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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
|
|
See #292, #478
|
|
See #292
|
|
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
|
|
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.
|
|
|
|
The feature that duplicates auto-increment key fields does not work if the start number for the sequence is greater than 1
|
|
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
|
|
|
|
Conflicts:
drivers/adodb-mssqlnative.inc.php
|
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
|
|
|
https://github.com/ADOdb/ADOdb/issues/178
|
|
|
|
|
|
|
|
|
|
|
|
- running SED script
- manual adjustments for files not processed by regex
|
|
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>
|
|
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>
|
|
Fixes #31
Changes to original commit: whitespace and updated changelog.
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
Some methods' signature did not match the parent class
|
|
|
|
|
|
|
|
http://php.net/manual/en/language.basic-syntax.phptags.php
|
|
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.
|
|
|
|
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.
|
|
Simplify the code by setting $alter to include $colname
|
|
|
|
|
|
|
|
Causing error with E_STRICT. Fixes #2
|
|
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
|
|
- Move all files in adodb5/ to root
- Remove adodb-for-php4/ directory
|