Commit Graph

56 Commits

Author SHA1 Message Date
29e92c1147 dblayer : reindent / add a todo
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1817 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-15 14:19:31 +00:00
2c21043a9e BUG : dblayer : UPDATE can now update the table primary key too
dblayer : add support of the differents field separator (choosed by DB engine)
Add more unit tests


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1813 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-12 14:14:26 +00:00
b2264440a4 dblayer : add more unittests
dblayer : add compatibility in column names with MySQL and SQLite


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1812 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-12 12:56:18 +00:00
5e93c78ddb dblayer : Force using UTF8 for MySQL and PostgreSQL
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1811 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-11 14:44:35 +00:00
50c328cdd6 BUG : dblayer : allow to prepare the SQL with fields containing spaces
BUG : dblayer : add more unit tests


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1809 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-11 13:05:53 +00:00
b496dadc62 BUG : dblayer : allow to create more than one foreign key
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1808 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-10 14:41:22 +00:00
effbc9f4a8 Correct indentation error
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1807 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-10 11:38:30 +00:00
675ecee530 dblayer : Add support to OR in WHERE clause
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1806 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-10 11:13:57 +00:00
33e87e33de Add Exception code in dblayer
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1701 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-08-11 14:59:17 +00:00
b8a3e1aa23 Update domframework to be gettext package compliant
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1661 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-08-06 13:16:43 +00:00
40ad90502c dblayer : Add dropTable support
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1644 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-08-01 08:04:54 +00:00
9fef934b71 Cosmetics : remove spaces at the end of lines and correct lines with more than 80 chars
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1643 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-08-01 07:11:14 +00:00
dea292339a dblayer : don't check the non provided field in update
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1623 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-31 12:54:04 +00:00
33f15aff33 dblayer: Add the verification of the types of fields in update
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1622 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-31 12:47:19 +00:00
49fbe8b16e dblayer : Add verification of format in insert selected by field type
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1621 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-31 12:42:21 +00:00
cf51241f34 BUG dblayer : if the foreign keys are not modified, we don't check if they are correct
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1617 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-31 12:00:56 +00:00
b15d90ce0b dblayer : add date support
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1602 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-30 12:07:55 +00:00
7afa8bfc54 dblayer : Add better error messages (gettext, Exception code, field name)
dblayer : Add support to date type 


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1601 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-30 11:49:36 +00:00
09e7559086 dblayer/authorizationdb : tableprefix is updated
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1595 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-30 09:10:41 +00:00
8f9e540a4a dblayer : Simplify the prefix table code (all the calls are the same)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1592 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-30 08:24:12 +00:00
7c935b49ef dblayer : Add the prefix support in tables name
dblayer : Add $table public attribute in the definition


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1591 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-30 06:31:04 +00:00
414610db41 dblayer : Add test of foreign keys before INSERT or UPDATE. Reject with an exception if the foreign key doesn't exists
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1582 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-28 10:13:51 +00:00
af990df2f3 Correct typo consistancy -> consistency
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1571 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-27 06:59:41 +00:00
f1ca57b4cb Do the chmod only if we are on linux and if we are the owner of the file
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1474 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-20 11:23:17 +00:00
d168f3a06f Force the SQLite database file in 0666 mode to be readable from CLI or Web site
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1473 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-20 11:16:42 +00:00
21964e47b0 Add directRead to dblayer to solve the problem of read with OR in WHERE clause
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1470 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-18 11:57:11 +00:00
280617b547 Add support to list of tables in dblayer for the 3 PDO engines
Add support to connect database


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1469 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-18 09:10:18 +00:00
9e2da45514 dblayers functions are now public
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1468 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-17 18:00:45 +00:00
027cbccdcf PHPDoc support : correct the erroneous entries
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1463 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-16 13:46:39 +00:00
81e298a089 The createTable must use the class fields and not external variables. Easier !
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1443 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-12 14:39:44 +00:00
ab6a4715ac dblayer : Add foreign keys in creation of table
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1439 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-12 12:39:51 +00:00
1d1e0cb0b6 dblayer : Move unique fields in each SQL engine
bug dblayer : table name was alwas 'table' (missing $)
adding quotes arround unique fields to support spaces


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1438 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-12 12:00:52 +00:00
a1122a716c Add creationTable function for MySQL, SQLite and PostgreSQL
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1437 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-11 14:50:16 +00:00
87b4c843ef Add the public in functions of dblayer
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1436 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-11 12:23:19 +00:00
57ee35fb22 Fix error in unique fields validation
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1429 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-05 20:18:02 +00:00
3671350f7d Check before using if the SQLite database file is writeable and raise an exceptiion in case of error
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1423 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-05 12:27:36 +00:00
edb78f936c Force Foreignkeys support in SQLite (PRAGMA foreign_keys = ON;)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1422 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-05 11:19:33 +00:00
b7fe8ad341 Missing ! : not test of existing key in an array before update in dblayer
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1412 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-04 16:43:51 +00:00
2e8dd883d2 Add a PDO exception if PDO has a problem
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1408 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-04 12:17:22 +00:00
95cd53193e In creation, non mandatory and inexisting fields are not asked
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1340 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-05-21 21:08:43 +00:00
5449ecc27a Skip the primary key in update tests if it is provided
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1331 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-05-21 20:01:24 +00:00
c0d4b0ef24 Update the dbLayer to update more easily the tables
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1317 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-05-21 14:23:09 +00:00
7c2ea07315 Bug : display in read method doesn't function. It always display all the fields
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1262 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-26 19:58:13 +00:00
350aa1dea8 Add all the phpdocs to the domframework
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1246 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-24 19:44:34 +00:00
7e69a0e978 Correct bug in uniq constrain violation test in update for dblayer
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1240 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-23 19:58:55 +00:00
bd575e67ed A little bug : if we don't modify the uniq columns, no need to check if there is a constrain violation
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1239 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-23 19:09:42 +00:00
9460c245ef Add a unique constrain in the tables in dblayer. Block the creation/update if the constrain is forced.
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1232 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-22 14:57:42 +00:00
32835b4d7c Add an exception to dblayer.php if the datas are not in the right format
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1230 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-22 11:55:48 +00:00
544dc3cfed Return the number of rows modified by the request
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1226 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-19 20:35:09 +00:00
383e831ff3 Add support to read in dblayer with order and colmuns displayed
Return the number of deleted rows in delete


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1223 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-18 18:35:48 +00:00