Fix bug #3427: config.spamProtectEmailAddresses may garble mail link
[Packages/TYPO3.CMS.git] / typo3 / sysext / dbal / doc / TODO.txt
1 Portability issues:
2 - AUTO_INCREMENT: Sequence generation is ux_t3lib_db::exec_INSERTquery(); We need to generate any unique ids for records in this function when ADOdb/PEAR is used, using other databases than MySQL. The problem is mostly that the function needs to make a lookup somewhere if the table in question has a field with auto-incremeneted values... We have no solution yet to where this information can come from
3 - CLOBS/BLOBS: Update/Insert CLOBs/BLOBs in ux_t3lib_db::exec_INSERTquery()/ux_t3lib_db::exec_UPDATEquery() - this will probably be needed for some databases. In that case we will have to know which fields should be handled separately. It's unclear to me if this depends on field-type (eg. "blob" / "clob") or if it depends on the length of the input!
5 Portability "Jokers":
6 In Oracle I have experienced that an error occurs if you:
7 - Insert a "" quoted string in an integer/number field - even if the value inside is a number! - so will we have to make lookups on field type to determine this?
8 - Insert a string longer than the size of the field in the database (MySQL just silently accepts this...) - so will we have to evaluate all values in update/insert queries first?
9 - sum(), max(), min(), count(), avg() functions in select field list? Are those available in all other DBMS?
10 - simple table joins are used many places. Are those available in all other DBMS?
12 ADOdb/PEAR implementation issues:
13 - sql_fetch_assoc() and sql_fetch_row(): How will the behavior of associative keys be with other databases than MySQL? This is not solid enough yet.
14 - "free-result" in ADOdb? What is it?
15 - sql_insert_id(): For PEAR this is definitely not working with anything by MySQL!
16 - sql_data_seek(): For PEAR this seems to have no equalent. Must be simulated?
17 - sql_field_type(): Needs support for all but "native" mode.
18 - admin_get_tables() / admin_get_fields() / admin_get_keys(): Needs support in ADOdb and PEAR.
20 SQL parser issues:
21 - t3lib_sqlengine: Quoting of strings is done sensitive to DB, but the PARSING of SQL and re-assembling done with t3lib_sqlengine does NOT know about quoting format! This has to be solved for other databases than MySQL... "t3lib_sqlengine" has to support parsing AND compiling of queries with different quoting methods.
23 New Features?
24 - user processing hooks implemented on tables/fields etc.
25 - readOnly control on tables/handlers
26 - persistent connections configured as an option per handler?
28 General TODO:
29 - Implement and test other databases with ADOdb and PEAR
30 - Create any amount of management needed
31 - Create documentation for other databases
32 - Support for people implementing DBAL (I imagine there is a contact person per. DBMS implemented)
40 ********************
41 APPENDIX: DBAL (moved to here from Core TODO.txt)
42 ********************
43 Issues:
44 - Install tool, analysing SQL files, comparing, dumping etc. How? (MetaDatabase, MetaTables)
45 - case-folding?
46 - reserved words (uid!!) Which R-words?
47 - LIMIT. selectLimit(x,x)
48 - mysql_fetch_assoc substitute (seems to be there)
49 - escaping chars with special function!!!
50 - datatypes? Integer not there? LOB's a problem?
51 - Internal functions: AVG, SUM, count
52 - mysql_num_rows() = recordCount()
53 - autoinc. of numbers with GenID()
54 - how about joining?
55 - ALTER TABLE syntax?
57 Analysis:
58 - SUPPORT: Core (+ 'cms') will support all DBs, extension MAY support a SUBSET of DBs only.
59 - EM: MySQL will be the main supported database. sql-files for install tool follows MySQL syntax. Comparison can be done if ADOdb allows us to read table/field info (will need mapping of datatypes), updates may only be done if we support it. Not important. People CAN update manually with other DBs.
60 - NAMING: Reserved words and case restrictions are a real problem. For now, lets call it unacceptable. Handling of this would include 1) conversion table in ADOdb for result set assoc. key mapping AND mapping of fields in the queries!
61 - ESCAPING: Escaping characters will be very annoying because we'll have to pass an array first to stripslashes, then to add DB-specific slashes, then make Query. But we can for MySQL (and similar) bypass this...
62 - LOBs: Working with LOBs seems to be extremely irritating, inserting them separately (In oracle)!! How are we knowing anyways that this is a LOB? Solution might be to bypass for MySQL and for problem DBs send the UPDATE/INSERT row (must be array then!!!) through a filter which returns new row plus a blob row for update afterwards.
63 - AUTO-ID: Auto-incrementing is also a BIG irritation! Currently all inserts DO NOT set the id column!!! All insert statements must include the new, correct field (at least for the problem DB's like Oracle)
64 - BTW: Escaping and BLOB handling seems to require the same for all INSERTs and UPDATEs: A field_array passed to function. Auto-id may relate to this (at least it will be required all places ...)
65 - SQL: Will have to split up LIMIT selects. New escaping in SELECT queries. INSERT/UPDATE from field_arrays + processing, mysql_fetch_assoc() function "pandan"
67 API:
69 - Separate LIMIT from the rest.
70 - JOINS ? Functions like AVG, SUM?
71 - Escaping of search strings
74 - Array passed to function if not MySQL
75 Function has: possible "autoincrement" field argument; If Oracle, auto-id is handled; If Oracle, BLOB-array is returned for separate insertion.
78 ORACLE does not allow us to CHANGE existing fields into something else - only create new fields, otherwise we must export/import database.
80 Other notes:
81 - Datatypes to use for integers and others? Date/Time not a problem because typo3 uses integers.
82 - AVG, SUM, COUNT - will they be there?
83 - I'll need access to Oracle, MSSQL, PostGres - basically the databases we are going to connect to!!!
84 - JOINS???
85 - Having some lookup table (not TCA, because this is very individual from site to site) telling us which database (name+brand+server) a table is coming from, if not the default database. This also means that we will have an array of databases set up (one being default)!
87 180303 / Oracle:
88 - all fields/tablenames must be quoted
89 - a quoted value cannot be inserted into an integerfield!!!
92 insert... "kasper"
94 Related issues:
95 - LPE: DB/DB sync.
97 ORACLE / DB2:
98 - u: db2admin
99 - p: password
101 Also see:
102 - [Kasper] "DB Abstraction" folder in Mailbox