Commit Graph

75 Commits

Author SHA1 Message Date
d590337cf5 dblayer : add the possibility to filtering on foreignkeys when reading
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2021 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-03-13 10:35:24 +00:00
b4241e1f30 dblayer : Check if the database is connected before using it
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1985 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-02-02 13:49:33 +00:00
b152996eab dblayer : Removing the unused singleton
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1951 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-01-27 18:05:33 +00:00
e49a5a97af dbLayer : new format with static call to limit the number of connection to the database
authzgroups : update to support the new dbLayer format


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1950 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-01-27 17:38:25 +00:00
4f23451432 dbLayer : don't connect multiple times to the same database/username
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1949 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-01-27 14:37:25 +00:00
53cd221538 DBLayer : Allow the order of column with name 'group' by adding separator
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1917 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-01-07 03:23:34 +00:00
153c58a39c dblayer : Check before update if multiple unique keys are not used before doing the update
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1858 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-10-02 13:57:19 +00:00
b80f9ecdea BUG : dblayer : don't raise an exception when re-inserting unique record
dblayer : add more unit tests


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1850 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-24 09:13:18 +00:00
6e97bad1f7 dblayer : foreign keys are not mandatory in update (in verify)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1844 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-22 11:32:54 +00:00
5085627b1d dblayer : be OK if the error of dblayer is an array or a string
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1843 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-22 11:18:35 +00:00
b034fa3625 dblayer : add more debug
dblayer : add more unit tests (foreign keys)
dblayer : add the same answer when updating a line with the same informations
dblayer : better support of foreign keys


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1842 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-22 10:52:53 +00:00
19966c094c dblayer : force the autoincrement values in INSERT to be compliant with our tests
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1841 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-19 12:22:20 +00:00
6d789a1651 dblayer : force the autoincrement fields to null in insert to have a value
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1840 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-19 12:19:44 +00:00
02bc20dd5d dblayer : correct tue verify in updates : must pass the key
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1838 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-19 11:07:29 +00:00
e81452a782 Remove the field name in tests : it is in the key
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1837 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-19 08:54:52 +00:00
ac15d8b3c3 Add translation to new dblayers
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1836 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-19 08:52:35 +00:00
c71452932f dblayer : return the verify result with priority
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1834 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-19 08:38:07 +00:00
7df93f95db dblayer : push the verify before insert/update in a public method, callable from in HTML before doing the work. Keep the verifications before doing the real modification of the database
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1829 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-19 07:23:06 +00:00
a1c5a35899 dblayer : allow the titles to be defined in public variable in plus of a function which can be overloaded
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1828 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-17 13:54:02 +00:00
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