MYDDAS: Added db_sql_mode/1 and db_sql_mode/2 predicates

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1885 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
tiagosoares 2007-05-20 21:33:29 +00:00
parent 530df10f5c
commit ed7873ef8a
3 changed files with 18 additions and 6 deletions

View File

@ -15,6 +15,7 @@
* *
*************************************************************************/
#if defined MYDDAS_MYSQL || defined MYDDAS_ODBC
/* Initialize MYDDAS GLOBAL STRUCTURES */
:- c_db_initialize_myddas.
@ -92,7 +93,9 @@
db_call_procedure/4,
db_call_procedure/3,
db_my_sql_mode/1,
db_my_sql_mode/2
db_my_sql_mode/2,
db_sql_mode/1,
db_sql_mode/2
#endif
]).
@ -134,8 +137,10 @@
db_call_procedure/4,
db_call_procedure/3,
db_my_sql_mode/1,
db_my_sql_mode/2
]).
db_my_sql_mode/2,
db_sql_mode/1,
db_sql_mode/2
]).
#endif /* MYDDAS_MYSQL */
:- use_module(myddas_util_predicates,[
@ -568,4 +573,4 @@ db_multi_queries_number(Connection,Number) :-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif /*MYDDAS_MYSQL || MYDDAS_ODBC*/

View File

@ -33,7 +33,9 @@
db_call_procedure/4,
db_call_procedure/3,
db_my_sql_mode/1,
db_my_sql_mode/2
db_my_sql_mode/2,
db_sql_mode/1,
db_sql_mode/2
]).
:- use_module(myddas,[
@ -218,6 +220,11 @@ db_call_procedure(Connection,Procedure,Args,LA) :-
% db_my_sql_mode/1
% db_my_sql_mode/2
% Possible values : traditional,ansi,strict_trans_tables or '' (empty)
db_sql_mode(SQLMode):-
db_my_sql_mode(SQLMode).
db_sql_mode(Connection,SQLMode):-
db_my_sql_mode(Connection,SQLMode).
db_my_sql_mode(SQLMode):-
db_my_sql_mode(myddas,SQLMode).
db_my_sql_mode(Connection,SQLMode):-

View File

@ -89,7 +89,7 @@ translate(ProjectionTerm,DatabaseGoal,SQLQueryTermOpt):-
% --- optimize sql ------------------------------------------------------------------
optimize_sql(SQLQueryTerm,SQLQueryTermOpt).
% --- disjunction(Goal,Disjunction) ----------------------------------------------------
%
% turns original goal into disjunctive normalized form by computing all conjunctions