Roxen.git / server / modules / tags / sqltag.pike

version» Context lines:

Roxen.git/server/modules/tags/sqltag.pike:1:   /* -  * $Id: sqltag.pike,v 1.29 1998/08/10 21:39:57 per Exp $ +  * $Id: sqltag.pike,v 1.30 1998/09/29 16:18:50 js Exp $    *    * A module for Roxen Challenger, which gives the tags    * <SQLQUERY> and <SQLOUTPUT>.    *    * Henrik Grubbström 1997-01-12    */    - constant cvs_version="$Id: sqltag.pike,v 1.29 1998/08/10 21:39:57 per Exp $"; + constant cvs_version="$Id: sqltag.pike,v 1.30 1998/09/29 16:18:50 js Exp $";   constant thread_safe=1;   #include <module.h>      /* Compatibility with old versions of the sqltag module. */   // #define SQL_TAG_COMPAT      inherit "module";   inherit "roxenlib";      import Array;   import Sql;    -  + object conf; +  +    /*    * Module interface functions    */      array register_module()   {    return( ({ MODULE_PARSER|MODULE_PROVIDER,    "SQL-module",    "This module gives the three tags &lt;SQLQUERY&gt;, "    "&lt;SQLOUTPUT&gt;, and &lt;SQLTABLE&gt;.<br>\n"
Roxen.git/server/modules/tags/sqltag.pike:453:   mapping query_container_callers()   {    return( ([ "sqloutput":sqloutput_tag, "sqlelse":sqlelse_tag ]) );   }      /*    * Callback functions    */       - object(sql) sql_object(object request_id) + object(sql) sql_object(void|string host)   { -  string host = query("hostname"); +  string host = stringp(host)?host:query("hostname");    object(sql) con; -  function sql_connect = request_id->conf->sql_connect; +  function sql_connect = conf->sql_connect;    mixed error;    error = catch(con = sql_connect(host));    if(error)    return 0;    return con;   }      string query_provides()   {    return "sql";
Roxen.git/server/modules/tags/sqltag.pike:507: Inside #if defined(SQL_TAG_COMPAT)
   defvar("password", "", "Default password (deprecated)",    TYPE_STRING|VAR_MORE,    "Specifies the default password to use for access.\n");   #endif /* SQL_TAG_COMPAT */   }      /*    * More interface functions    */    - object conf; +       void start(int level, object _conf)   {    if (_conf) {    conf = _conf;    }   //add_api_function("sql_query", api_sql_query, ({ "string", 0,"int" }));   }      void stop()