Roxen.git
/
server
/
base_server
/
module.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/module.pike:1:
// This file is part of Internet Server. // Copyright © 1996 - 2001, Roxen IS.
-
// $Id: module.pike,v 1.
132
2002/
06
/
14
16
:
05
:
03
jhs
Exp $
+
// $Id: module.pike,v 1.
133
2002/
07
/
03
20
:
20
:
32
nilsson
Exp $
#include <module_constants.h> #include <module.h> #include <request_trace.h> constant __pragma_save_parent__ = 1; inherit "basic_defvar"; mapping(string:array(int)) error_log=([]);
Roxen.git/server/base_server/module.pike:411:
return get_my_sql(1)->query( replace( query, __my_tables ), @args ); } object sql_big_query_ro( string query, mixed ... args ) //! Identical to @[sql_query_ro], but the @[Sql.sql()->big_query] method //! will be used instead of the @[Sql.sql()->query] method. { return get_my_sql(1)->big_query( replace( query, __my_tables ), @args ); }
-
static int create_sql_tables( mapping(string:array(string))
defenitions
,
+
static int create_sql_tables( mapping(string:array(string))
definitions
,
string|void comment, int|void no_unique_names ) //! Create multiple tables in one go. See @[get_my_table] //! Returns the number of tables that were actually created. { int ddc; if( !no_unique_names )
-
foreach(
indices(
defenitions
),
string t )
-
ddc+=get_my_table( t,
defenitions[t]
, comment, 1 );
+
foreach(
definitions
;
string t
; array(string
)
def )
+
ddc+=get_my_table( t,
def
, comment, 1 );
else { Sql.Sql sql = get_my_sql();
-
foreach(
indices(
defenitions
),
string t )
+
foreach(
definitions
;
string t
; array(string
)
def )
{ if( !catch {
-
sql->query("CREATE TABLE "+t+" ("
+defenitions[t]
*","+")" );
+
sql->query("CREATE TABLE "+t+" ("
+def
*","+")" );
} ) ddc++; DBManager.is_module_table( this_object(), my_db, t, comment ); } } return ddc; } static string sql_table_exists( string name ) //! Return the real name of the table 'name' if it exists.