diff --git a/library/MYDDAS/myddas.ypp b/library/MYDDAS/myddas.ypp index 008074372..ebafb9e73 100755 --- a/library/MYDDAS/myddas.ypp +++ b/library/MYDDAS/myddas.ypp @@ -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*/ diff --git a/library/MYDDAS/myddas_mysql.ypp b/library/MYDDAS/myddas_mysql.ypp index 6f145cf73..d4e7ba0fe 100755 --- a/library/MYDDAS/myddas_mysql.ypp +++ b/library/MYDDAS/myddas_mysql.ypp @@ -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):- diff --git a/library/MYDDAS/myddas_prolog2sql.ypp b/library/MYDDAS/myddas_prolog2sql.ypp index 543b4618a..98fe5f027 100755 --- a/library/MYDDAS/myddas_prolog2sql.ypp +++ b/library/MYDDAS/myddas_prolog2sql.ypp @@ -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