stronk7
f555bfac15
nothing interesting, just a comment.
2007-01-30 00:21:22 +00:00
stronk7
011dd960f4
This seems to be the damned line! db must be CFG
2007-01-29 01:11:43 +00:00
stronk7
e5b094bed6
Added Oracle DIRTY HACK to both rs_fetchXX functions.
...
Detecting of EOF in rs_fetch_record()
Big improvement of rs_fetch_next_record() by using FethRow()
with speeds near native fields[]. MDL-8134
2007-01-28 23:08:14 +00:00
stronk7
bdd5bba791
Initial commit of the new rs_XXX() functions to fetch, advance and close
...
ADOdb recordsets in a standard way. Not finished yet but I need them in CVS.
MDL-8134
2007-01-28 20:10:33 +00:00
stronk7
1159927f08
Backported fix for annoying typo from HEAD.
2007-01-28 18:30:42 +00:00
stronk7
14da408e08
Adding two helper functions and modify upgrade to
...
work properly under MSSQL and Oracle. MDL-8303
2007-01-26 20:44:57 +00:00
tjhunt
93727c9b8e
MDL-7926 - set_field_select function
2006-12-15 18:23:15 +00:00
stronk7
a8c5a14b7c
Prevent some false-positives detecting uses of old user_XXX tables.
...
See http://moodle.org/mod/forum/discuss.php?d=58976
2006-11-18 20:25:52 +00:00
stronk7
7ca5f47dcb
modify_database() will show the deprecated debugging after 2006101007
...
(Moodle 1.7 release version) MDL-5919
2006-11-05 09:44:05 +00:00
stronk7
1ede3a6712
Now all the get_records() functions support only one field
...
to be specified in the SELECT clause. Not needed anymore to
write double "SELECT id, id..." queries. Results returned
follow exactly the same structure than normal recordsets
(first field = key) MDL-5877
2006-11-04 16:59:52 +00:00
stronk7
8558e34ed5
Deprecating modify_database(). It shows debugging info
...
if release > 2006101004 (Beta2 +01) MDL-5919
2006-11-04 16:21:30 +00:00
stronk7
088f9942ef
Oracle optimization. Texts under 4000cc can be handled directly as varchar2,
...
so they don't need the 2-phase (insert/update) handling of LOBs
2006-10-30 23:12:41 +00:00
stronk7
6befbe8050
Fixed one bug on Oracle produced when we were inserting
...
records with returnid disabled and containing LOBs
2006-10-30 22:58:04 +00:00
stronk7
3cef39f10a
New function sql_substr() returns the proper substr() function for each DB
2006-10-30 18:28:47 +00:00
stronk7
18ecdd56aa
Deprecating sql_as (now the AS keyword os required in COLUMN aliases)
2006-10-30 17:39:55 +00:00
stronk7
be310ffda8
Now record_cache is controlled by $CFG->enablerecordcache
2006-10-28 19:51:57 +00:00
stronk7
cacc23f041
Moved cache cleaning code near the begin of functions. Sometimes
...
it wasnt' executed due to function ending. MDL-7196
2006-10-28 17:51:43 +00:00
stronk7
df313f0e94
Counting extra updates performed by Oracle & MSSQL in PERF
2006-10-27 17:48:41 +00:00
stronk7
9717970b60
I forgot to globalize $record_cache in delete_record_XXX() functions.
2006-10-27 17:13:36 +00:00
stronk7
4f2ae57c31
Minor improvements to the get_record() cache. Part of MDL-7196
...
1) Check the cache issset() before unset() it.
2) In the set_field() function, if fieldX = 'id',
just delete such element from the cache,
else the whole table
3) Add some more unset() operations against the cache in
the delete_xxxx() dmllib functions.
2006-10-27 16:51:35 +00:00
toyomoyo
8e6f38a406
taking care of a warning
2006-10-27 02:14:20 +00:00
moodler
c60272d855
Variation of Sam Marshall's patch to cache simple get_record calls MDL-7196
2006-10-26 07:52:00 +00:00
stronk7
1fda1af9d2
Now insert_record() is using $db->GenID() to retrieve
...
sequence numbers for Oracle. Just wondering if the same
function should be used by PostgreSQL too.
2006-10-23 17:38:47 +00:00
stronk7
cba3313110
strip "old" harcoded "limit" clauses from the sql passed and
...
debug about them. MDL-7173
2006-10-23 07:09:51 +00:00
stronk7
f9baa9c1cc
Prevent MSSQL to return from insert_record() before
...
trying to execute the updating of LOBs.
2006-10-23 00:00:46 +00:00
stronk7
564f9b03e6
Debugging sql_paging_limit() as deprecated and
...
enforcing get_field_sql() to return 1 record max
2006-10-22 23:20:14 +00:00
stronk7
28c5a47afc
Adding limitfrom and limitnum parameters to a bunch of
...
rarely executed functions...
2006-10-22 22:35:26 +00:00
stronk7
325bbaaa17
Now insert/update/set of BINATY fields is supported by MSSQL
...
(and easier to add new DB in the furure) MDL-7062
2006-10-17 23:34:52 +00:00
stronk7
4d78c38a37
Fixed typo that was preventing correct BLOB storage under Oracle.
2006-10-17 18:29:35 +00:00
stronk7
59359cde79
Now set_field() supports Oracle LOBs. Better error handling of oracle_update_lobs()
2006-10-15 20:11:14 +00:00
stronk7
2794229c55
Now update_record() supports LOBs under Oracle. Plus prevent empty objects to be updated.
2006-10-15 19:37:58 +00:00
stronk7
626caefd89
Minor changes + debug info in UpdateXlob()
2006-10-15 18:34:38 +00:00
stronk7
6880e3bb16
- Introducing the first version of the new mssql_n adodb driver (not finished, just for experimenting).
...
- Now insert_record() is handling Oracle CLOBS and BLOBS properly (really annoying the number of hacks needed).
- Creating one new global object to cache $db->MetaColumns() calls per request, because it's being used
in a lot of places inside dmllib.
TODO: hack update_record() and set_field() to allow Oracle LOBs
enclose all the Oracle function calls into one db transaction
2006-10-15 16:38:22 +00:00
stronk7
97ab73aad4
Add odbc_msql dbtype to a bunch of places.
2006-10-09 22:55:55 +00:00
stronk7
5fbab6173a
Now Oracle uses the new find_sequence_name() function to find the
...
correct sequence name for each table on insert.
Also, introduced initial hooks to support Oracle LOBs in insert_record()
2006-10-08 09:58:11 +00:00
moodler
937b63ee52
Adding some serious checks to make Moodle break when there is any
...
select, insert or update on user_students, user_teachers, user_coursecreators,
or user_admins (once roles is installed), because they should not be used
at all and we will drop them soon.
2006-10-01 09:16:49 +00:00
stronk7
66841aed29
One wrong use of onespace2empty() - an strange function - :-/
...
in the DIRTY HACK was causing not info to be returned under Oracle
by the get_field_sql() function, so sequence numbers were broken.
2006-09-26 18:27:44 +00:00
skodak
6de2a7b6c8
fixed another missing global $CFG
2006-09-26 08:49:47 +00:00
skodak
05f8f7e76b
fixed missing global $CFG
2006-09-26 06:31:18 +00:00
martinlanghoff
1e7368e782
dmlib: set_field() now has the Oracle DIRTY HACK too!
2006-09-26 05:10:39 +00:00
martinlanghoff
5a55af6097
dmlib: Add Oracle dirty hack cleanup to recordset_to_menu() get_field_sql() and get_fieldset_sql()
...
This covers most (all?) the gaps in data retrieval except get_recordset_sql().
To tackle get_recordset_sql, where the actual data retrieval is done within
AdoDB, we would have to to wrap around AdoDB with a subclass, but that would
be dirty, dirty, dirtier.
2006-09-26 05:10:18 +00:00
martinlanghoff
44f9885044
sql_concat(): fixed param order thinko -- and now it works too!
2006-09-26 05:09:48 +00:00
martinlanghoff
95008f81c6
sql_ilike() -- added notes on Oracle support or lack thereof
2006-09-26 05:07:28 +00:00
martinlanghoff
38e02f4c32
Introducing sql_concat_join($sep, $array) helper
...
returns the SQL to do the equivalente of a join() or implode()
on the DB server. Watch the RDBMS work! ;-)
2006-09-26 05:05:54 +00:00
martinlanghoff
0ce96669c9
Introducing sql_concat() - and use it in sql_fullname()
...
sql_concat() is just a passthrough to $db->Concat() -- it doesn't
add any value, and I think the dispatching is somewhat expensive.
Just using $db->Concat() should be good enough, were it not for
consistency in our DM API.
2006-09-26 05:02:59 +00:00
mjollnir_
6e58026b29
recredited the sql_primary_role_subselect function to correct author (much as I would like to claim it)
2006-09-26 04:41:45 +00:00
moodler
867f5adb73
Moved Penny's funky sql function into dmllib.php
2006-09-26 04:33:59 +00:00
stronk7
f46e2c8cbc
Changed one LIMIT to a cross-db WHERE clause
2006-09-24 09:59:25 +00:00
stronk7
2a2905fb6f
Now using ADOdb standard transactions. Some day, we should switch to
...
Smart Transactions (http://phplens.com/adodb/tutorial.smart.transactions.html )
as they autodetect errors and are nestable and easier to write
2006-09-22 20:05:44 +00:00
stronk7
94e65cc36c
Now all the insert_record() and update_record() calls under
...
Oracle DB use the oracle_dirty_hack() function to transform
empty strings into something different ' ' in order to avoid
the problems with the empty=NULL stupid norm of Oracle.
With this change, Oracle installation works completely.
Now we need to implement everywhere the opposite hack: transforming
all those ' ' (1 whitespace) back to the '' (empty string). Working
on it now.
2006-09-21 18:30:50 +00:00