1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
#pike __REAL_VERSION__ 
 
 
// Compatibility 
// FIXME: We really need a better way to do this.. 
mapping tmp; 
mixed `->(string s) 
{ 
  if(s=="_module_value") 
  { 
    if(!tmp) 
    { 
      tmp=([]); 
      tmp->sql=(program)"Sql"; 
    } 
    return tmp; 
  } 
  return UNDEFINED; 
} 
 
 
//! The SQL module is a unified interface between pike and all 
//! its supported databases. The parts of this module that is 
//! usuable for all normal uses is the @[Sql] class and the 
//! @[sql_result] class. 
//! 
//! @example 
//! string people_in_group(string group) { 
//!    Sql.Sql db = Sql.Sql("mysql://localhost/testdb"); 
//!    return db->query("SELECT name FROM users WHERE " 
//!                     "group=%s", group)->name * ","; 
//! }