Changeset 115

Show
Ignore:
Timestamp:
11/22/09 17:28:01 (3 years ago)
Author:
Abscissa
Message:

Updated to:
* Latest dsource db schema
* DMD 1.043 / Tango 0.99.8
* Newest DDBI that still has Postgre support (also made a small fix to it)
This seems to work for me, but should be looked over by someone more familiar with DSource's databases.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bbconv/bbcode.d

    r29 r115  
    11module bbcode; 
    22 
    3 import std.conv; 
    4 import std.utf; 
    5 import std.stdio; 
     3import tango.io.Stdout; 
     4import tango.util.Convert; 
    65import enki.types; 
    7 import entity; 
     6import enki.library.d.CharEntity; 
    87 
    98char[] Latin1ToUTF8(char[] value){ 
     
    1817            result ~= 0x80  | (ch & 0x3F); 
    1918             
    20             debug writefln("converted: %0.2X to %0.2X %0.2X",ch, result[$-2], result[$-1]); 
     19            debug Stdout.formatln("converted: {:X2} to {:X2} {:X2}",ch, result[$-2], result[$-1]); 
    2120        } 
    2221    } 
     
    4342                         
    4443                        entity = entity[1..$]; 
    45                         dchar value = cast(dchar)toUint(entity); 
    46                         result ~= toUTF8((&value)[0..1]); 
     44                        dchar value = cast(dchar)to!(uint)(entity); 
     45                        result ~= to!(char[])((&value)[0..1]); 
    4746                    } 
    4847                    // handle non-numeric entities by lookup 
  • trunk/bbconv/bbconv.d

    r34 r115  
     1module bbconv; 
     2 
    13import bbcode; 
    24import parser; 
     
    68import dbi.pg.all; 
    79 
    8 import std.stdio; 
    9 import std.string; 
    10 import std.file; 
    11 import std.utf; 
     10import tango.io.Stdout; 
     11import tango.text.Util; 
     12import tango.text.convert.Layout; 
     13import tango.time.Clock; 
     14import tango.time.Time; 
     15import tango.time.chrono.Gregorian; 
     16import tango.util.Convert; 
     17 
     18Layout!(char) sformat; 
     19char[][char[]] bioHeadings; 
     20 
     21static this() 
     22
     23    sformat = new Layout!(char)(); 
     24    bioHeadings = [ 
     25        "user_icq"[]:     "ICQ Number"[], 
     26        "user_aim":       "AIM Address", 
     27        "user_msnm":      "MSN Messenger", 
     28        "user_yim":       "Yahoo Messenger", 
     29        "user_website":   "Website", 
     30        "user_from":      "Location", 
     31        "user_occ":       "Occupation", 
     32        "user_interests": "Interests" 
     33    ]; 
     34 
     35
    1236 
    1337char[] escape(char[] value){ 
    14     return std.string.replace(std.string.replace(value,"\\","\\\\"),"'","''"); 
     38    return substitute(substitute(value,"\\","\\\\"),"'","''"); 
     39
     40 
     41TimeSpan parsePhpbbTime(char[] timeStr) 
     42
     43    return TimeSpan.fromSeconds( to!(long)(timeStr) + TimeSpan(TimeSpan.Epoch1970).seconds ); 
     44
     45 
     46char[] timeToPgTimestamp(TimeSpan time, char[] timezone) 
     47
     48    auto date = Gregorian.generic.toDate(Time(time.ticks)); 
     49 
     50    if(timezone.length > 0 && !"+-".contains(timezone[0])) 
     51        timezone = "+" ~ timezone; 
     52     
     53    return 
     54        "{,4}-{}-{} {}:{}:{}{}".sformat( 
     55            date.year, date.month, date.day, 
     56            time.time.hours, time.time.minutes, time.time.seconds, 
     57            timezone 
     58        ); 
     59
     60 
     61char[] genBioLine(Row row, char[] column) 
     62
     63    if(row[column] is null || row[column] == "") 
     64        return ""; 
     65    else 
     66        return "'''{}''': {}\n\n".sformat(bioHeadings[column], row[column]); 
     67
     68 
     69char[] genBio(Row row) 
     70
     71    char[] bio = ""; 
     72     
     73    foreach(char[] column; bioHeadings.keys) 
     74        bio ~= genBioLine(row, column); 
     75     
     76    return bio; 
    1577} 
    1678 
     
    2183    auto config = new IniParser("config.ini"); 
    2284 
    23     writefln("connecting to source database.");    
     85    Stdout.formatln("connecting to source database.");     
    2486    auto phpbbDB = new PgDatabase(config["SourceDB"]); 
    2587    scope(exit) phpbbDB.close(); 
    2688         
    27     writefln("connecting to destination database."); 
     89    Stdout.formatln("connecting to destination database."); 
    2890    auto tracforumsDB = new PgDatabase(config["DestDB"]); 
    2991    scope(exit) tracforumsDB.close(); 
     
    39101        } 
    40102         
    41         writefln("data failed convertion\n[%s]\n[%s]\n",parser.getErrorReport(),bbcode); 
     103        Stdout.formatln("data failed convertion\n[{}]\n[{}]\n",parser.getErrorReport(),bbcode); 
    42104        return bbcode; 
    43105    } 
    44106     
    45107    //Convert profile Data 
    46     writefln("Removing old profile data..."); 
    47      
    48     tracforumsDB.execute("DELETE FROM profile"); 
     108    Stdout.formatln("Removing old profile data..."); 
     109     
     110    tracforumsDB.execute("DELETE FROM userprofile"); 
    49111     
    50112    auto users = phpbbDB.query(` 
    51113        SELECT username,user_sig,user_timezone,user_email,user_regdate,user_lastvisit,user_viewemail, 
     114            user_actkey,user_posts,user_password, 
     115            user_icq,user_aim,user_msnm,user_yim,user_website,user_from,user_occ,user_interests, 
    52116        CASE WHEN user_active = -1 THEN 0 ELSE 1 END AS active 
    53117        FROM phpbb_users 
    54118    `); 
    55119     
    56     writefln("Adding user data..."); 
     120    auto dsAuthUserRows = tracforumsDB.query(` 
     121        SELECT id,username 
     122        FROM auth_user 
     123    `).fetchAll; 
     124     
     125    Stdout.formatln("Adding user data..."); 
    57126         
    58127    char[] sql; 
    59128    foreach(user; users.fetchAll){ 
    60129        char[] sig = Latin1ToUTF8(user["user_sig"]); 
    61          
     130 
    62131        if(sig.length > 0){ 
    63132            sig = convertBBCode(sig); 
    64133        }        
    65134        char[] username = Latin1ToUTF8(user["username"]); 
    66                  
     135         
     136        auto joinedOn      = parsePhpbbTime(user["user_regdate"  ]); 
     137        auto lastVisitedOn = parsePhpbbTime(user["user_lastvisit"]); 
     138 
     139        char[] userId; 
     140        bool userIdFound=false; 
     141        foreach(Row row; dsAuthUserRows){ 
     142            if(row["username"] == username){ 
     143                userId = row["id"]; 
     144                userIdFound = true; 
     145            } 
     146        } 
     147         
     148        if(!userIdFound){ 
     149            //Stdout.formatln("Could not find dsource auth_user row for user: {}\n",username); 
     150            sql =  
     151                "INSERT INTO auth_user " 
     152                "(username,first_name,last_name,email,password,is_staff,is_active,is_superuser,last_login,date_joined) " 
     153                "VALUES (" 
     154                    "E'" ~ escape(username) ~ "',"              // username 
     155                    "'" ~ "" ~ "',"                             // first_name 
     156                    "'" ~ "" ~ "',"                             // last_name 
     157                    "E'" ~ escape(user["user_email"]) ~ "',"    // email 
     158                    "'" ~ user["user_password"] ~ "',"          // password 
     159                    "" ~ "0" ~ "::bool,"                        //TODO: is_staff 
     160                    "" ~ user["active"] ~ "::bool,"             // is_active 
     161                    "" ~ "0" ~ "::bool,"                        //TODO: is_superuser 
     162                    "'" ~ timeToPgTimestamp(lastVisitedOn, user["user_timezone"]) ~ "',"    // last_login 
     163                    "'" ~ timeToPgTimestamp(joinedOn,      user["user_timezone"]) ~ "'"     // date_joined 
     164                ")"; 
     165            try{ 
     166                tracforumsDB.execute(sql); 
     167            } 
     168            catch(DBIException e){ 
     169                Stdout.formatln("Could not insert user account: {}\nSQL:{}\n",user["username"],sql); 
     170                e.writeOut( (char[] s) { Stdout(s); } ); 
     171                Stdout.newline; 
     172            } 
     173 
     174            userId = 
     175                tracforumsDB 
     176                    .query("SELECT id FROM auth_user WHERE username=E'"~escape(username)~"'") 
     177                    .fetchRow["id"]; 
     178        } 
     179        else{ 
     180            //TODO? Update auth_user row 
     181            Stdout.formatln("User already exists in dsource auth_user: {}\n",username); 
     182        } 
     183 
    67184        sql =  
    68             "INSERT INTO profile " 
    69             "(isactive,username,sig,timezone,email,regdate,lastvisit,viewemail,bio) " 
     185            "INSERT INTO userprofile " 
     186            "(user_id,activation_key,key_expires,sig,defaultavatarid,bio,timezone,viewemail,isexpert,posts) " 
    70187            "VALUES (" 
    71                 "" ~ user["active"] ~ "::bool," 
    72                 "'" ~ escape(username) ~ "'," 
    73                 "'" ~ escape(sig) ~ "'," 
    74                 "'" ~ escape(user["user_timezone"]) ~ "'," 
    75                 "'" ~ escape(user["user_email"]) ~ "'," 
    76                 "" ~ user["user_regdate"] ~ "," 
    77                 "" ~ user["user_lastvisit"] ~ "," 
    78                 "" ~ user["user_viewemail"] ~ "::bool," 
    79                 "'" ~ "" ~ "'" //TODO: bio 
     188                "" ~ userId ~ ","                           // user_id 
     189                "E'" ~ escape(user["user_actkey"]) ~ "',"   // activation_key 
     190                "'" ~ timeToPgTimestamp(TimeSpan(Clock.now.ticks + TimeSpan.TicksPerDay * 7), "") ~ "',"    // key_expires 
     191                "E'" ~ escape(sig) ~ "',"                   // sig 
     192                "" ~ "0" ~ ","                              // defaultavatarid 
     193                "E'" ~ escape(genBio(user)) ~ "',"          // bio 
     194                "E'" ~ escape(user["user_timezone"]) ~ "'," // timezone 
     195                "" ~ user["user_viewemail"] ~ "::bool,"     // viewemail 
     196                "" ~ "0" ~ "::bool,"                        // isexpert 
     197                "'" ~ user["user_posts"] ~ "'"              // posts 
    80198            ")"; 
    81199        try{ 
     
    83201        } 
    84202        catch(DBIException e){ 
    85             writefln("Could not insert user: %s\nSQL:%s\n",user["username"],sql); 
    86             writefln("%s",e.toString()); 
     203            Stdout.formatln("Could not insert user profile: {}\nSQL:{}\n",user["username"],sql); 
     204            e.writeOut( (char[] s) { Stdout(s); } ); 
     205            Stdout.newline; 
    87206        } 
    88207    } 
    89208    users.finish(); 
    90209     
    91     writefln("Done."); 
     210    Stdout.formatln("Done."); 
    92211     
    93212    //Convert Forum Data     
    94     writefln("Removing old fourm data..."); 
    95          
    96     tracforumsDB.execute("DELETE FROM forum"); 
    97     tracforumsDB.execute("DELETE FROM topic"); 
    98     tracforumsDB.execute("DELETE FROM message"); 
    99     tracforumsDB.execute("DELETE FROM moderators"); 
    100          
    101     writefln("Adding forums, moderators, topics and posts...");  
     213    Stdout.formatln("Removing old fourm data..."); 
     214         
     215    tracforumsDB.execute("DELETE FROM f_forum"); 
     216    tracforumsDB.execute("DELETE FROM f_topic"); 
     217    tracforumsDB.execute("DELETE FROM f_message"); 
     218    tracforumsDB.execute("DELETE FROM f_moderators"); 
     219     
     220    try 
     221    { 
     222        sql = "ALTER TABLE f_topic ADD COLUMN hidden boolean NOT NULL"; 
     223        tracforumsDB.execute(sql); 
     224        sql = "ALTER TABLE f_topic ADD COLUMN locked boolean NOT NULL"; 
     225        tracforumsDB.execute(sql); 
     226    } 
     227    catch(DBIException e){ 
     228        Stdout.formatln("Could not add column to topic\nSQL:{}\n",sql); 
     229        e.writeOut( (char[] s) { Stdout(s); } ); 
     230        Stdout.newline; 
     231    } 
     232 
     233    Stdout.formatln("Adding forums, moderators, topics and posts...");   
    102234     
    103235    auto forums = phpbbDB.query(` 
     
    105237        CASE WHEN projects.project_code is null THEN 'dsource' ELSE projects.project_code END AS project_code 
    106238        FROM phpbb_forums 
    107         Left JOIN projects ON projects.forum_id = phpbb_forums.forum_id; 
     239        Left JOIN projects ON projects.forum_id = phpbb_forums.forum_id 
     240        ORDER BY forum_id; 
    108241    `); 
    109242     
     243    char[] lastForumId = ""; 
    110244    foreach(forum; forums.fetchAll){ 
    111         writefln("adding forum: %s (%s)",forum["project_code"],forum["forum_id"]); 
     245        if(forum["forum_id"] == lastForumId) 
     246            continue; 
     247        lastForumId = forum["forum_id"]; 
     248             
     249        Stdout.formatln("adding forum: {} ({})",forum["project_code"],forum["forum_id"]); 
    112250         
    113251        // add forum 
    114252        tracforumsDB.execute( 
    115             "INSERT INTO forum " 
     253            "INSERT INTO f_forum " 
    116254            "(id,name,description,created,modified,projectid,locked,hidden) " 
    117255            "VALUES( " 
    118256                "" ~ forum["forum_id"] ~ "," 
    119                 "'" ~ escape(forum["forum_name"]) ~ "'," 
    120                 "'" ~ escape(forum["forum_desc"]) ~ "'," 
     257                "E'" ~ escape(forum["forum_name"]) ~ "'," 
     258                "E'" ~ escape(forum["forum_desc"]) ~ "'," 
    121259                "0," // created 
    122260                "0," // modified 
    123                 "'" ~ escape(forum["project_code"]) ~ "'," 
     261                "E'" ~ escape(forum["project_code"]) ~ "'," 
    124262                "0::bool," // locked 
    125263                "0::bool" // hidden 
     
    140278        foreach(mod; moderators.fetchAll){ 
    141279            char[] username = Latin1ToUTF8(mod["username"]); 
    142             writefln("\tmod: %s for %s",username,mod["forum_name"]); 
     280            Stdout.formatln("\tmod: {} for {}",username,mod["forum_name"]); 
    143281             
    144282            tracforumsDB.execute( 
    145                 "INSERT INTO moderators " 
     283                "INSERT INTO f_moderators " 
    146284                "(forumid,username) " 
    147285                "VALUES( " 
    148286                    "" ~ forum["forum_id"] ~ "," 
    149                     "'" ~ escape(username) ~ "'" 
     287                    "E'" ~ escape(username) ~ "'" 
    150288                ")" 
    151289            );           
     
    158296         
    159297        foreach(topic; topics.fetchAll){ 
    160             writefln("\ttopic: %s",topic["topic_title"]); 
     298            Stdout.formatln("\ttopic: {}",topic["topic_title"]); 
    161299 
    162300            char[] type; 
     
    175313            // add topic 
    176314            tracforumsDB.execute( 
    177                 "INSERT INTO topic " 
     315                "INSERT INTO f_topic " 
    178316                "(id,forumid,subject,hidden,locked,type,views) " 
    179317                "VALUES( " 
    180318                    "" ~ topic["topic_id"] ~ "," 
    181319                    "" ~ forum["forum_id"] ~ "," 
    182                     "'" ~ escape(topic["topic_title"]) ~ "'," 
     320                    "E'" ~ escape(topic["topic_title"]) ~ "'," 
     321                    "0::bool," // hidden 
    183322                    "0::bool," // locked 
    184                     "0::bool," // hidden 
    185323                    "'" ~ type ~ "'," // type 
    186324                    "" ~ topic["topic_views"] ~ "" 
     
    203341                char[] username = Latin1ToUTF8(post["username"]); 
    204342                 
    205                 writefln("\t\tpost: %s by %s at %s",post["post_id"],username,post["post_time"]); 
     343                Stdout.formatln("\t\tpost: {} by {} at {}",post["post_id"],username,post["post_time"]); 
    206344                                 
    207345                // convert text 
     
    220358                // add post 
    221359                char[] messagesql =  
    222                     "INSERT INTO message " 
     360                    "INSERT INTO f_message " 
    223361                    "(id,topicid,created,modified,author,body,avatarid) " 
    224362                    "VALUES( " 
     
    227365                        "" ~ post["post_time"] ~ "," 
    228366                        "" ~ editTime ~ "," 
    229                         "'" ~ escape(username) ~ "'," 
    230                         "'" ~ escape(text) ~ "'," 
     367                        "E'" ~ escape(username) ~ "'," 
     368                        "E'" ~ escape(text) ~ "'," 
    231369                        "0" // avatarid 
    232370                    ")"; 
     
    240378                         
    241379                        tracforumsDB.execute( 
    242                             "UPDATE topic SET leadmessageid=" ~ post["post_id"] ~ " WHERE topic.id = " ~ topic["topic_id"] ~ "" 
     380                            "UPDATE f_topic SET leadmessageid=" ~ post["post_id"] ~ " WHERE f_topic.id = " ~ topic["topic_id"] ~ "" 
    243381                        ); 
    244382                        isFirst = false; 
     
    246384                } 
    247385                catch(DBIException e){ 
    248                     writefln("ERROR: failure on post %s\n sql: %s\n%s",post["post_id"],sql,e.toString()); 
     386                    Stdout.formatln("ERROR: failure on post {}\n sql: {}\n{}",post["post_id"],sql,e.toString()); 
    249387                } 
    250388            } 
     
    256394     
    257395    // update sequences 
    258     tracforumsDB.execute("SELECT setval('forum_id_seq',max(id)) FROM forum"); 
    259     tracforumsDB.execute("SELECT setval('message_id_seq',max(id)) FROM message"); 
    260     tracforumsDB.execute("SELECT setval('profile_id_seq',max(id)) FROM profile"); 
    261     tracforumsDB.execute("SELECT setval('topic_id_seq',max(id)) FROM topic"); 
    262 } 
     396    tracforumsDB.execute("SELECT setval('f_forum_id_seq',max(id)) FROM f_forum"); 
     397    tracforumsDB.execute("SELECT setval('f_message_id_seq',max(id)) FROM f_message"); 
     398    tracforumsDB.execute("SELECT setval('f_profile_id_seq',max(id)) FROM f_profile"); 
     399    tracforumsDB.execute("SELECT setval('f_topic_id_seq',max(id)) FROM f_topic"); 
     400} 
  • trunk/bbconv/dbi/DBIException.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.DBIException; 
    96 
    10 version (Ares) { 
    11     private import std.vararg : va_arg; 
    12 } else { 
    13     private import std.stdarg : va_arg; 
    14 
     7private import tango.core.Vararg : va_arg; 
    158private import dbi.ErrorCode; 
    169 
     
    3427     * Params: 
    3528     *  msg = The message to report to the users. 
    36      *  
     29     * 
    3730     * Throws: 
    3831     *  DBIException on invalid arguments. 
     
    6255                dbiCode = va_arg!(ErrorCode)(_argptr); 
    6356            } else { 
    64                throw new DBIException("Invalid argument of type \"" ~ _arguments[i].toString() ~ "\" passed to the DBIException constructor."); 
     57              throw new DBIException("Invalid argument of type \"" ~ _arguments[i].toString() ~ "\" passed to the DBIException constructor."); 
    6558            } 
    6659        } 
     
    9689        return sql; 
    9790    } 
    98     deprecated alias getSql getSQL; 
    99      
     91 
    10092    private: 
    10193    char[] sql; 
  • trunk/bbconv/dbi/Database.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.Database; 
    96 
    10 version (Ares) { 
    11     private static import std.regexp; 
    12     debug (UnitTest) private import std.io.Console; 
    13 } else { 
    14     private static import std.string; 
    15     debug (UnitTest) private import std.stdio; 
    16 
     7private static import tango.text.Util; 
     8private static import tango.io.Stdout; 
    179private import dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement; 
     10public import dbi.SqlGen; 
    1811 
    1912/** 
     
    7063     */ 
    7164    final Statement prepare (char[] sql) { 
    72         return new Statement(cast(Database)this, sql); 
     65        return new Statement(this, sql); 
     66    } 
     67 
     68    /** 
     69     * Escape a _string using the database's native method, if possible. 
     70     * 
     71     * Params: 
     72     *  string = The _string to escape, 
     73     * 
     74     * Returns: 
     75     *  The escaped _string. 
     76     */ 
     77    char[] escape (char[] string) 
     78    { 
     79        char[] result; 
     80        size_t count = 0; 
     81 
     82        // Maximum length needed if every char is to be quoted 
     83        result.length = string.length * 2; 
     84 
     85        for (size_t i = 0; i < string.length; i++) { 
     86            switch (string[i]) { 
     87                case '"': 
     88                case '\'': 
     89                case '\\': 
     90                    result[count++] = '\\'; 
     91                    break; 
     92                default: 
     93                    break; 
     94            } 
     95            result[count++] = string[i]; 
     96        } 
     97 
     98        result.length = count; 
     99        return result; 
    73100    } 
    74101 
     
    147174     */ 
    148175    deprecated abstract char[] getErrorMessage (); 
    149  
     176  
     177    /** 
     178     * Get the integer id of the last row to be inserted. 
     179     * 
     180     * Returns: 
     181     *  The id of the last row inserted into the database. 
     182     */ 
     183        abstract long getLastInsertID (); 
     184   
    150185    /** 
    151186     * Split a _string into keywords and values. 
     
    162197    final protected char[][char[]] getKeywords (char[] string) { 
    163198        char[][char[]] keywords; 
    164         version (Ares) { 
    165             foreach (char[] group; std.regexp.split(string, ";")) { 
    166                 if (group == "") { 
    167                     continue; 
    168                 } 
    169                 char[][] vals = std.regexp.split(group, "="); 
    170                 keywords[vals[0]] = vals[1]; 
     199        foreach (char[] group; tango.text.Util.delimit(string, ";")) { 
     200            if (group == "") { 
     201                continue; 
    171202            } 
    172         } else { 
    173             foreach (char[] group; std.string.split(string, ";")) { 
    174                 if (group == "") { 
    175                     continue; 
    176                 } 
    177                 char[][] vals = std.string.split(group, "="); 
    178                 keywords[vals[0]] = vals[1]; 
    179             } 
     203            char[][] vals = tango.text.Util.delimit(group, "="); 
     204            keywords[vals[0]] = vals[1]; 
    180205        } 
    181206        return keywords; 
     207    } 
     208     
     209    static this() 
     210    { 
     211        sqlGen = new SqlGenerator; 
     212    } 
     213    private static SqlGenerator sqlGen; 
     214     
     215    SqlGenerator getSqlGenerator() 
     216    { 
     217        return sqlGen; 
    182218    } 
    183219} 
     
    190226    deprecated int getErrorCode () {return 0;} 
    191227    deprecated char[] getErrorMessage () {return "";} 
    192  
    193 
     228
     229 
     230debug(UnitTest) { 
    194231 
    195232unittest { 
    196     version (Ares) { 
    197         void s1 (char[] s) { 
    198             Cout("" ~ s ~ "\n"); 
    199         } 
    200  
    201         void s2 (char[] s) { 
    202             Cout("   ..." ~ s ~ "\n"); 
    203         } 
    204     } else { 
    205         void s1 (char[] s) { 
    206             writefln("%s", s); 
    207         } 
    208  
    209         void s2 (char[] s) { 
    210             writefln("   ...%s", s); 
    211         } 
    212     } 
    213  
     233    void s1 (char[] s) { 
     234        tango.io.Stdout.Stdout(s).newline(); 
     235    } 
     236 
     237    void s2 (char[] s) { 
     238        tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
     239    } 
    214240 
    215241    s1("dbi.Database:"); 
     
    218244    s2("getKeywords"); 
    219245    char[][char[]] keywords = db.getKeywords("dbname=hi;host=local;"); 
    220     assert(keywords["dbname"] == "hi"); 
    221     assert(keywords["host"] == "local"); 
    222 
     246    assert (keywords["dbname"] == "hi"); 
     247    assert (keywords["host"] == "local"); 
     248
     249
  • trunk/bbconv/dbi/ErrorCode.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
  • trunk/bbconv/dbi/Result.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
  • trunk/bbconv/dbi/Row.d

    r11 r115  
    1  
    2 /** 
     1/** 
    32 * Authors: The D DBI project 
    4  * 
    5  * Version: 0.2.4 
    6  * 
    73 * Copyright: BSD license 
    84 */ 
    95module dbi.Row; 
    106 
    11 version (Ares) { 
    12     debug (UnitTest) private import std.io.Console; 
    13 } else { 
    14     debug (UnitTest) private import std.stdio; 
    15 } 
    167private import dbi.DBIException; 
    178 
     
    6253     *  --- 
    6354     * 
    64      * Returns:  
     55     * Returns: 
    6556     *  The field's contents. 
    6657     */ 
     
    162153    } 
    163154 
     155        /** 
     156     * Ability to do a foreach of each column. 
     157     */ 
     158        int opApply(int delegate(inout char[], inout char[]) dg) { 
     159               int result = 0; 
     160 
     161               for (int i = 0; i < fieldNames.length; i++) { 
     162                   result = dg(fieldNames[i], fieldValues[i]); 
     163                   if (result) 
     164                   break; 
     165               } 
     166               return result; 
     167        } 
     168 
     169    /** 
     170     *  
     171     * Returns: the number of columns in the row. 
     172     */ 
     173    size_t length () { 
     174        return fieldTypes.length; 
     175    }  
     176     
    164177    private: 
    165178    char[][] fieldNames; 
     
    169182} 
    170183 
     184debug(UnitTest) { 
     185static import tango.io.Stdout; 
     186 
    171187unittest { 
    172     version (Ares) { 
    173         void s1 (char[] s) { 
    174             Cout("" ~ s ~ "\n"); 
    175         } 
    176  
    177         void s2 (char[] s) { 
    178             Cout("   ..." ~ s ~ "\n"); 
    179         } 
    180     } else { 
    181         void s1 (char[] s) { 
    182             writefln("%s", s); 
    183         } 
    184  
    185         void s2 (char[] s) { 
    186             writefln("   ...%s", s); 
    187         } 
     188 
     189    void s1 (char[] s) { 
     190        tango.io.Stdout.Stdout(s).newline(); 
     191    } 
     192 
     193    void s2 (char[] s) { 
     194        tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
    188195    } 
    189196 
    190197    s1("dbi.Row:"); 
    191198    Row r1 = new Row(); 
    192     r1.addField("name", "John Doe", "text",    3); 
    193     r1.addField("age", "23",      "integer", 1); 
     199    r1.addField("name", "John Doe", "text", 3); 
     200    r1.addField("age", "23", "integer", 1); 
    194201 
    195202    s2("get(int)"); 
    196     assert(r1.get(0) == "John Doe"); 
     203    assert (r1.get(0) == "John Doe"); 
    197204 
    198205    s2("get(char[])"); 
    199     assert(r1.get("name") == "John Doe"); 
     206    assert (r1.get("name") == "John Doe"); 
    200207 
    201208    s2("[int]"); 
    202     assert(r1[0] == "John Doe"); 
     209    assert (r1[0] == "John Doe"); 
    203210 
    204211    s2("[char[]]"); 
    205     assert(r1["age"] == "23"); 
     212    assert (r1["age"] == "23"); 
    206213 
    207214    s2("getFieldIndex"); 
    208     assert(r1.getFieldIndex("name") == 0); 
     215    assert (r1.getFieldIndex("name") == 0); 
    209216 
    210217    s2("getFieldType"); 
    211     assert(r1.getFieldType(0) == 3); 
    212      
     218    assert (r1.getFieldType(0) == 3); 
     219 
    213220    s2("getFieldDecl"); 
    214     assert(r1.getFieldDecl(1) == "integer"); 
     221    assert (r1.getFieldDecl(1) == "integer"); 
    215222} 
     223} 
  • trunk/bbconv/dbi/Statement.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.Statement; 
    96 
    10 version (Ares) { 
    11     private static import std.regexp
    12     debug (UnitTest) private import std.io.Console
     7version (Phobos) { 
     8    private static import std.string
     9    debug (UnitTest) private static import std.stdio
    1310} else { 
    14     private static import std.string; 
    15     debug (UnitTest) private import std.stdio; 
    16 
    17 private import dbi.Database, dbi.Result; 
     11    private static import tango.text.Util; 
     12    private static import tango.text.Regex; 
     13    debug (UnitTest) private static import tango.io.Stdout; 
     14
     15private import dbi.Database, dbi.DBIException, dbi.Result; 
    1816 
    1917/** 
     
    9997     */ 
    10098    char[] escape (char[] string) { 
    101         version (Ares) { 
    102             return std.regexp.sub(string, "'", "''"); 
     99        if (database !is null) { 
     100            return database.escape(string); 
    103101        } else { 
    104             return std.string.replace(string, "'", "''"); 
     102            char[] result; 
     103            size_t count = 0; 
     104 
     105            // Maximum length needed if every char is to be quoted 
     106            result.length = string.length * 2; 
     107 
     108            for (size_t i = 0; i < string.length; i++) { 
     109                switch (string[i]) { 
     110                    case '"': 
     111                    case '\'': 
     112                    case '\\': 
     113                        result[count++] = '\\'; 
     114                        break; 
     115                    default: 
     116                        break; 
     117                } 
     118                result[count++] = string[i]; 
     119            } 
     120 
     121            result.length = count; 
     122            return result; 
    105123        } 
    106124    } 
     
    116134     */ 
    117135    char[] getSqlByQM () { 
    118         char[] result = sql; 
    119         int qmIdx = 0, qmCount = 0; 
    120  
    121         void replace () { 
    122             result = result[0 .. qmIdx] ~ "'" ~ binds[qmCount] ~ "'" ~ result[qmIdx + 1 .. result.length]; 
    123                 qmCount++; 
    124         } 
    125  
    126         version (Ares) { 
    127             while((qmIdx = std.regexp.find(result, "\\u003F")) != size_t.max) { 
    128                 replace(); 
    129             } 
    130         } else { 
    131             while ((qmIdx = std.string.find(result, "?")) != -1) { 
    132                 replace(); 
    133             } 
    134         } 
     136        char[] result; 
     137        size_t i = 0, j = 0, count = 0; 
     138 
     139        // binds.length is for the '', only 1 because we replace the ? too 
     140        result.length = sql.length + binds.length; 
     141        for (i = 0; i < binds.length; i++) { 
     142            result.length = result.length + binds[i].length; 
     143        } 
     144 
     145        for (i = 0; i < sql.length; i++) { 
     146            if (sql[i] == '?') { 
     147                result[j++] = '\''; 
     148                result[j .. j + binds[count].length] = binds[count]; 
     149                j += binds[count++].length; 
     150                result[j++] = '\''; 
     151            } 
     152            else { 
     153                result[j++] = sql[i]; 
     154            } 
     155        } 
     156 
     157        sql = result; 
    135158        return result; 
    136159    } 
     
    147170    char[] getSqlByFN () { 
    148171        char[] result = sql; 
    149         ptrdiff_t begIdx = 0, endIdx = 0; 
    150         version (Ares) { 
    151             while ((begIdx = std.regexp.find(result, ":")) != -1 && (endIdx = std.regexp.find(result[begIdx + 1 .. length], ":")) != -1) { 
    152                 result = result[0 .. begIdx] ~ "'" ~ getBoundValue(result[begIdx + 1.. begIdx + endIdx + 1])~ "'" ~ result[begIdx + endIdx + 2 .. length]; 
     172        version (Phobos) { 
     173           ptrdiff_t beginIndex = 0, endIndex = 0; 
     174            while ((beginIndex = std.string.find(result, ":")) != -1 && (endIndex = std.string.find(result[beginIndex + 1 .. length], ":")) != -1) { 
     175                result = result[0 .. beginIndex] ~ "'" ~ getBoundValue(result[beginIndex + 1.. beginIndex + endIndex + 1]) ~ "'" ~ result[beginIndex + endIndex + 2 .. length]; 
    153176            } 
    154177        } else { 
    155             while ((begIdx = std.string.find(result, ":")) != -1 && (endIdx = std.string.find(result[begIdx + 1 .. length], ":")) != -1) { 
    156                 result = result[0 .. begIdx] ~ "'" ~ getBoundValue(result[begIdx + 1.. begIdx + endIdx + 1])~ "'" ~ result[begIdx + endIdx + 2 .. length]; 
     178            uint beginIndex = 0, endIndex = 0; 
     179            while ((beginIndex = tango.text.Util.locate(result, ':')) != result.length && (endIndex = tango.text.Util.locate(result, ':', beginIndex + 1)) != result.length) { 
     180                result = result[0 .. beginIndex] ~ "'" ~ getBoundValue(result[beginIndex + 1 .. endIndex]) ~ "'" ~ result[endIndex + 1 .. length]; 
    157181            } 
    158182        } 
     
    167191     */ 
    168192    char[] getSql () { 
    169         version (Ares) { 
    170             if (std.regexp.find(sql, "\\u003F") != size_t.max) { 
    171                 return getSqlByQM(); 
    172             } else if (std.regexp.find(sql, ":") != size_t.max) { 
    173                 return getSqlByFN(); 
    174             } else { 
    175                 return sql; 
    176             } 
    177         } else { 
     193        version (Phobos) { 
    178194            if (std.string.find(sql, "?") != -1) { 
    179195                return getSqlByQM(); 
     
    183199                return sql; 
    184200            } 
     201        } else { 
     202            if (tango.text.Util.contains(sql, '?')) { 
     203                return getSqlByQM(); 
     204            } else if (tango.text.Util.contains(sql, ':')) { 
     205                return getSqlByFN(); 
     206            } else { 
     207                return sql; 
     208            } 
    185209        } 
    186210    } 
     
    194218     * Returns: 
    195219     *  The bound value of fn. 
     220     * 
     221     * Throws: 
     222     *  DBIException if fn is not bound 
    196223     */ 
    197224    char[] getBoundValue (char[] fn) { 
    198         for (ptrdiff_t idx = 0; idx < bindsFNs.length; idx++) { 
    199             if (bindsFNs[idx] == fn) { 
    200                 return binds[idx]; 
    201             } 
    202         } 
    203         return null; 
    204     } 
    205      
    206     public void clearBinds(){ 
    207         this.bindsFNs = (char[][]).init; 
    208         this.binds = (char[][]).init; 
    209     } 
    210 
    211  
     225        for (size_t index = 0; index < bindsFNs.length; index++) { 
     226            if (bindsFNs[index] == fn) { 
     227                return binds[index]; 
     228            } 
     229        } 
     230        throw new DBIException(fn ~ " is not bound in the Statement."); 
     231    } 
     232
     233 
     234debug(UnitTest) { 
    212235unittest { 
    213     version (Ares) { 
     236    version (Phobos) { 
    214237        void s1 (char[] s) { 
    215             Cout("" ~ s ~ "\n"); 
     238            std.stdio.writefln("%s", s); 
    216239        } 
    217240 
    218241        void s2 (char[] s) { 
    219             Cout("   ..." ~ s ~ "\n"); 
     242            std.stdio.writefln("   ...%s", s); 
    220243        } 
    221244    } else { 
    222245        void s1 (char[] s) { 
    223             writefln("%s", s); 
     246            tango.io.Stdout.Stdout(s).newline(); 
    224247        } 
    225248 
    226249        void s2 (char[] s) { 
    227             writefln("   ...%s", s); 
     250            tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
    228251        } 
    229252    } 
     
    231254    s1("dbi.Statement:"); 
    232255    Statement stmt = new Statement(null, "SELECT * FROM people"); 
    233     char[] resultingSql = "SELECT * FROM people WHERE id = '10' OR name LIKE 'John Mc''Donald'"; 
     256    char[] resultingSql = "SELECT * FROM people WHERE id = '10' OR name LIKE 'John Mc\\'Donald'"; 
    234257 
    235258    s2("escape"); 
    236     assert(stmt.escape("John Mc'Donald") == "John Mc''Donald"); 
     259    assert (stmt.escape("John Mc'Donald") == "John Mc\\'Donald"); 
    237260 
    238261    s2("simple sql"); 
    239262    stmt = new Statement(null, "SELECT * FROM people"); 
    240     assert(stmt.getSql() == "SELECT * FROM people"); 
     263    assert (stmt.getSql() == "SELECT * FROM people"); 
    241264 
    242265    s2("bind by '?'"); 
     
    244267    stmt.bind(1, "10"); 
    245268    stmt.bind(2, "John Mc'Donald"); 
    246     assert(stmt.getSql() == resultingSql); 
     269    assert (stmt.getSql() == resultingSql); 
    247270 
    248271    /+ 
    249272    s2("bind by '?' sent to getSql via variable arguments"); 
    250273    stmt = new Statement("SELECT * FROM people WHERE id = ? OR name LIKE ?"); 
    251     assert(stmt.getSql("10", "John Mc'Donald") == resultingSql); 
     274    assert (stmt.getSql("10", "John Mc'Donald") == resultingSql); 
    252275    +/ 
    253276 
     
    256279    stmt.bind("id", "10"); 
    257280    stmt.bind("name", "John Mc'Donald"); 
    258     assert(stmt.getBoundValue("name") == "John Mc''Donald"); 
    259     assert(stmt.getSql() == resultingSql); 
    260 
     281    assert (stmt.getBoundValue("name") == "John Mc\\'Donald"); 
     282    assert (stmt.getSql() == resultingSql); 
     283
     284
  • trunk/bbconv/dbi/all.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
     
    1714        dbi.Result, 
    1815        dbi.Row, 
    19         dbi.Statement; 
     16        dbi.Statement, 
     17        dbi.Registry; 
  • trunk/bbconv/dbi/ib/IbDatabase.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.ib.IbDatabase; 
     6 
     7version (dbi_ib) { 
    98 
    109private import dbi.Database, dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement; 
     
    4039 
    4140    /** 
    42      *  
     41     * 
    4342     */ 
    4443    override void connect (char[] params, char[] username = null, char[] password = null) { 
     
    105104 
    106105    private: 
    107      
     106 
    108107} 
     108 
     109} 
  • trunk/bbconv/dbi/ib/IbResult.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.ib.IbResult; 
     6 
     7version (dbi_ib) { 
    98 
    109private import dbi.DBIException, dbi.Result, dbi.Row; 
     
    2019    public: 
    2120    this () { 
    22          
     21 
    2322    } 
    2423 
     
    3736     */ 
    3837    override void finish () { 
    39          
     38 
    4039    } 
    4140 
    4241    private: 
    4342} 
     43} 
  • trunk/bbconv/dbi/ib/all.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
     
    129} 
    1310 
     11version (dbi_ib) { 
     12 
    1413public import   dbi.ib.IbDatabase, 
    1514        dbi.ib.IbResult, 
    1615        dbi.all; 
     16} 
  • trunk/bbconv/dbi/ib/imp.d

    r11 r115  
    1 /** 
     1/** 
    22 * InterBase import library. 
    33 * 
     
    77 *  InterBase version 7.5.1 
    88 * 
    9  *  Import library version 0.01 
     9 *  Import library version 0.02 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
     
    1615 
    1716version (Windows) { 
    18      
     17    pragma (msg, "You will need to manually link in the InterBase library."); 
    1918} else version (linux) { 
    20      
     19    pragma (msg, "You will need to manually link in the InterBase library."); 
     20} else version (Posix) { 
     21    pragma (msg, "You will need to manually link in the InterBase library."); 
    2122} else version (darwin) { 
    22     static assert (0); 
     23    pragma (msg, "You will need to manually link in the InterBase library."); 
    2324} else { 
    24     static assert (0); 
     25    pragma (msg, "You will need to manually link in the InterBase library."); 
    2526} 
    2627 
     
    796797const uint SQL_DIALECT_V6           = 3; /// supports SQL delimited identifier, SQLDATE/DATE, TIME, TIMESTAMP, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, and 64-bit exact numeric type. 
    797798const uint SQL_DIALECT_CURRENT          = SQL_DIALECT_V6; /// latest IB DIALECT. 
     799version (dbi_ib) { 
     800 
    798801 
    799802const uint sec_uid_spec         = 0x01; 
     
    11651168 
    11661169int isc_modify_user (ISC_STATUS*, USER_SEC_DATA*); 
    1167                                           
     1170 
    11681171ISC_STATUS isc_compile_request (ISC_STATUS*, isc_db_handle*, isc_req_handle*, short, char*); 
    11691172 
     
    13421345 
    13431346ISC_STATUS isc_suspend_window (ISC_STATUS*, isc_win_handle*); 
     1347 
     1348} 
  • trunk/bbconv/dbi/msql/MsqlDatabase.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.msql.MsqlDatabase; 
     6 
     7version (dbi_msql) { 
    98 
    109private import dbi.Database, dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement; 
     
    4039 
    4140    /** 
    42      *  
     41     * 
    4342     */ 
    4443    override void connect (char[] params, char[] username = null, char[] password = null) { 
     
    102101 
    103102    private: 
    104      
     103 
    105104} 
     105 
     106} 
  • trunk/bbconv/dbi/msql/MsqlResult.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.msql.MsqlResult; 
     6 
     7version (dbi_msql) { 
     8 
    99 
    1010private import dbi.DBIException, dbi.Result, dbi.Row; 
     
    2020    public: 
    2121    this () { 
    22          
     22 
    2323    } 
    2424 
     
    3737     */ 
    3838    override void finish () { 
    39          
     39 
    4040    } 
    4141 
    4242    private: 
    4343} 
     44 
     45} 
  • trunk/bbconv/dbi/msql/all.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
     
    129} 
    1310 
     11version (dbi_msql) { 
     12 
    1413public import   dbi.msql.MsqlDatabase, 
    1514        dbi.msql.MsqlResult, 
    1615        dbi.all; 
     16 
     17} 
  • trunk/bbconv/dbi/msql/imp.d

    r11 r115  
    77 *  mSQL version 3.8 
    88 * 
    9  *  Import library version 0.01 
     9 *  Import library version 0.02 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.msql.imp; 
    1615 
     16version (dbi_msql) { 
     17 
     18version (Phobos) { 
     19    private import std.c.time; 
     20} else { 
     21    private import tango.stdc.time; 
     22} 
     23 
     24 
    1725version (Windows) { 
    18      
     26    pragma (msg, "You will need to manually link in the mSQL library."); 
    1927} else version (linux) { 
    2028    pragma (lib, "libmsql.a"); 
     29} else version (Posix) { 
     30    pragma (lib, "libmsql.a"); 
    2131} else version (darwin) { 
    22      
     32    pragma (msg, "You will need to manually link in the mSQL library."); 
    2333} else { 
    24     static assert (0); 
    25 
    26  
    27 private import std.c.time; 
     34    pragma (msg, "You will need to manually link in the mSQL library."); 
     35
    2836 
    2937const uint INT_TYPE     = 1;        /// 
     
    540548 */ 
    541549time_t msqlMillidatetimeToUnixTime (char*); 
     550 
     551} 
  • trunk/bbconv/dbi/mysql/MysqlDatabase.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.mysql.MysqlDatabase; 
    96 
    10 version (Ares) { 
    11     private static import std.regexp; 
    12     private import util.string : asString = toString; 
    13     debug (UnitTest) private import std.io.Console; 
    14 } else { 
    15     private static import std.string; 
    16     alias std.string.toString asString; 
    17     debug (UnitTest) private import std.stdio; 
    18 
    19 private import dbi.Database, dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement; 
    20 private import dbi.mysql.imp, dbi.mysql.MysqlError, dbi.mysql.MysqlResult; 
     7version (dbi_mysql) { 
     8 
     9private import tango.stdc.stringz : toDString = fromStringz, toCString = toStringz; 
     10private import tango.io.Console; 
     11private static import tango.text.Util; 
     12private static import tango.text.convert.Integer; 
     13debug(UnitTest) import tango.io.Stdout; 
     14 
     15private import dbi.Database, dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement, dbi.Registry; 
     16version(Windows) { 
     17    private import dbi.mysql.imp_win; 
     18
     19else { 
     20    private import dbi.mysql.imp; 
     21
     22private import dbi.mysql.MysqlError, dbi.mysql.MysqlResult; 
     23 
     24static this() { 
     25    uint ver = mysql_get_client_version(); 
     26    if(ver < 50000) { 
     27        throw new Exception("Unsupported MySQL client version.  Please compile using at least version 5.0 of the MySQL client libray."); 
     28    } 
     29    else if(ver < 50100) { 
     30        if(MYSQL_VERSION != 50000) { 
     31            throw new Exception("You are linking against version 5.0 of the MySQL client library but you have a build switch turned on for a different version (such as MySQL_51)."); 
     32        } 
     33    } 
     34    else { 
     35        if(MYSQL_VERSION != 50100) { 
     36            throw new Exception("You are linking against version 5.1 (or higher) of the MySQL client library so you need to use the build switch '-version=MySQL_51'."); 
     37        } 
     38    } 
     39
    2140 
    2241/** 
     
    8099        char[] host = "localhost"; 
    81100        char[] dbname = "test"; 
    82         char[] sock = "/tmp/mysql.sock"
     101        char[] sock = null
    83102        uint port = 0; 
    84103 
     
    95114            } 
    96115            if ("port" in keywords) { 
    97                 port = toInt(keywords["port"]); 
    98             } 
    99         } 
    100  
    101         version (Ares) { 
    102             if (std.regexp.find(params, "=") != size_t.max) { 
    103                 parseKeywords(); 
    104             } else { 
    105                 dbname = params; 
    106             } 
    107         } else { 
    108             if (std.string.find(params, "=") != -1) { 
    109                 parseKeywords(); 
    110             } else { 
    111                 dbname = params; 
    112             } 
    113         } 
    114  
    115         mysql_real_connect(connection, host, username, password, dbname, port, sock, 0); 
     116                port = cast(uint)tango.text.convert.Integer.parse(keywords["port"]); 
     117            } 
     118        } 
     119        if (tango.text.Util.contains(params, '=')) { 
     120            parseKeywords(); 
     121        } else { 
     122            dbname = params; 
     123        } 
     124 
     125        mysql_real_connect(connection, toCString(host), toCString(username), toCString(password), toCString(dbname), port, toCString(sock), 0); 
    116126        if (uint error = mysql_errno(connection)) { 
    117             throw new DBIException("Unable to connect to the MySQL database.", error, dbi.mysql.MysqlError.specificToGeneral(error)); 
     127                Cout("connect(): "); 
     128                Cout(toDString(mysql_error(connection))); 
     129                Cout("\n").flush;            
     130            throw new DBIException("Unable to connect to the MySQL database.", error, specificToGeneral(error)); 
    118131        } 
    119132    } 
     
    126139     */ 
    127140    override void close () { 
    128         mysql_close(connection); 
    129         if (uint error = mysql_errno(connection)) { 
    130             throw new DBIException("Unable to close the MySQL database.", error, dbi.mysql.MysqlError.specificToGeneral(error)); 
     141        if (connection !is null) { 
     142            mysql_close(connection); 
     143            if (uint error = mysql_errno(connection)) { 
     144                        Cout("close(): "); 
     145                        Cout(toDString(mysql_error(connection))); 
     146                        Cout("\n").flush;            
     147                throw new DBIException("Unable to close the MySQL database.", error, specificToGeneral(error)); 
     148            } 
     149            connection = null; 
    131150        } 
    132151    } 
     
    142161     */ 
    143162    override void execute (char[] sql) { 
    144         int error = mysql_real_query(connection, sql, sql.length); 
     163        int error = mysql_real_query(connection, toCString(sql), sql.length); 
    145164        if (error) { 
    146             throw new DBIException("Unable to execute a command on the MySQL database.", sql, error, dbi.mysql.MysqlError.specificToGeneral(error)); 
     165                Cout("execute(): "); 
     166                Cout(toDString(mysql_error(connection))); 
     167                Cout("\n").flush;            
     168                throw new DBIException("Unable to execute a command on the MySQL database.", sql, error, specificToGeneral(error)); 
    147169        } 
    148170    } 
     
    161183     */ 
    162184    override MysqlResult query (char[] sql) { 
    163         mysql_real_query(connection, sql, sql.length); 
     185        mysql_real_query(connection, toCString(sql), sql.length); 
    164186        MYSQL_RES* results = mysql_store_result(connection); 
    165         //if (results is null) { 
    166         //  throw new DBIException("Unable to query the MySQL database.", sql); 
    167         //} 
     187        if (results is null) { 
     188                Cout("query(): "); 
     189                Cout(toDString(mysql_error(connection))); 
     190                Cout("\n").flush; 
     191            throw new DBIException("Unable to query the MySQL database.", sql); 
     192        } 
    168193        assert (results !is null); 
    169194        return new MysqlResult(results); 
     
    181206     */ 
    182207    deprecated override int getErrorCode () { 
     208            Cout("GetErrorCode: "); 
     209                Cout(toDString(mysql_error(connection))); 
     210            Cout("\n").flush; 
    183211        return cast(int)mysql_errno(connection); 
    184212    } 
     
    195223     */ 
    196224    deprecated override char[] getErrorMessage () { 
    197         return asString(mysql_error(connection)); 
    198     } 
    199  
    200     private: 
     225        return toDString(mysql_error(connection)); 
     226    } 
     227 
     228    /** 
     229     * Get the integer id of the last row to be inserted. 
     230     * 
     231     * Returns: 
     232     *  The id of the last row inserted into the database. 
     233     */ 
     234        override long getLastInsertID() { 
     235                return mysql_insert_id(connection); 
     236        } 
     237         
     238    static this() 
     239    { 
     240        mysqlSqlGen = new MysqlSqlGenerator; 
     241    } 
     242    private static MysqlSqlGenerator mysqlSqlGen; 
     243         
     244    override SqlGenerator getSqlGenerator() 
     245    { 
     246        return mysqlSqlGen; 
     247    } 
     248 
     249    package: 
    201250    MYSQL* connection; 
    202251} 
    203252 
     253class MysqlSqlGenerator : SqlGenerator 
     254{ 
     255    override char getIdentifierQuoteCharacter() 
     256    { 
     257        return '`';  
     258    } 
     259} 
     260 
     261private class MysqlRegister : Registerable { 
     262     
     263    public char[] getPrefix() { 
     264        return "mysql"; 
     265    } 
     266     
     267    public Database getInstance(char[] url) { 
     268        //parse the URL here 
     269        return new MysqlDatabase(); 
     270    } 
     271} 
     272 
     273static this() { 
     274    Cout("Attempting to register MysqlDatabase in Registry").newline; 
     275    registerDatabase(new MysqlRegister()); 
     276} 
     277 
     278debug(UnitTest) { 
    204279unittest { 
    205     version (Ares) { 
    206         void s1 (char[] s) { 
    207             Cout("" ~ s ~ "\n"); 
    208         } 
    209  
    210         void s2 (char[] s) { 
    211             Cout("   ..." ~ s ~ "\n"); 
    212         } 
    213     } else { 
    214         void s1 (char[] s) { 
    215             writefln("%s", s); 
    216         } 
    217  
    218         void s2 (char[] s) { 
    219             writefln("   ...%s", s); 
    220         } 
    221     } 
     280 
     281    void s1 (char[] s) { 
     282        tango.io.Stdout.Stdout(s).newline(); 
     283    } 
     284 
     285    void s2 (char[] s) { 
     286        tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
     287    } 
    222288 
    223289    s1("dbi.mysql.MysqlDatabase:"); 
    224290    MysqlDatabase db = new MysqlDatabase(); 
    225   s2("connect"); 
     291/+    s2("connect"); 
    226292    db.connect("dbname=test", "test", "test"); 
    227293 
     
    265331 
    266332    s2("close"); 
    267     db.close(); 
    268 
    269  
    270 /* 
    271  * Copyright (C) 2002-2006 by Digital Mars, www.digitalmars.com 
    272  * Written by Walter Bright 
    273  * Some parts contributed by David L. Davis 
    274  * Modified for use in D DBI. 
    275  * 
    276  *  This software is provided 'as-is', without any express or implied 
    277  *  warranty. In no event will the authors be held liable for any damages 
    278  *  arising from the use of this software. 
    279  * 
    280  *  Permission is granted to anyone to use this software for any purpose, 
    281  *  including commercial applications, and to alter it and redistribute it 
    282  *  freely, subject to the following restrictions: 
    283  * 
    284  *  o  The origin of this software must not be misrepresented; you must not 
    285  *     claim that you wrote the original software. If you use this software 
    286  *     in a product, an acknowledgment in the product documentation would be 
    287  *     appreciated but is not required. 
    288  *  o  Altered source versions must be plainly marked as such, and must not 
    289  *     be misrepresented as being the original software. 
    290  *  o  This notice may not be removed or altered from any source 
    291  *     distribution. 
    292  */ 
    293 int toInt (char[] string) { 
    294     if (!string.length) { 
    295         throw new DBIException("Couldn't convert \"" ~ string ~ "\" to type \"int.\""); 
    296     } 
    297  
    298     bool negative = false; 
    299     int v = 0; 
    300  
    301     for (size_t i = 0; i < string.length; i++) { 
    302         char c = string[i]; 
    303  
    304         if (c >= '0' && c <= '9') { 
    305             uint v1 = v; 
    306             v = v * 10 + (c - '0'); 
    307  
    308             if (cast(uint)v < v1) { 
    309                 throw new DBIException("Couldn't convert \"" ~ string ~ "\" to type \"int.\""); 
    310             } 
    311         } else if (c == '-' && i == 0) { 
    312             negative = true; 
    313  
    314             if (string.length == 1) { 
    315                 throw new DBIException("Couldn't convert \"" ~ string ~ "\" to type \"int.\""); 
    316             } 
    317         } else if (c == '+' && i == 0) { 
    318             if (string.length == 1) { 
    319                 throw new DBIException("Couldn't convert \"" ~ string ~ "\" to type \"int.\""); 
    320             } 
    321         } else { 
    322             throw new DBIException("Couldn't convert \"" ~ string ~ "\" to type \"int.\""); 
    323         } 
    324     } 
    325     if (negative) { 
    326         if (cast(uint)v > 0x80000000) { 
    327             throw new DBIException("Couldn't convert \"" ~ string ~ "\" to type \"int.\""); 
    328         } 
    329  
    330         v = -v; 
    331     } else { 
    332         if (cast(uint)v > 0x7FFFFFFF) { 
    333             throw new DBIException("Couldn't convert \"" ~ string ~ "\" to type \"int.\""); 
    334         } 
    335     } 
    336     return v; 
    337 
     333    db.close();+/ 
     334    auto sqlgen = db.getSqlGenerator; 
     335    auto res = sqlgen.makeInsertSql("user", ["name", "date"]); 
     336    assert(res == "INSERT INTO `user` (`name`,`date`) VALUES(?,?)", res); 
     337
     338
     339 
     340
  • trunk/bbconv/dbi/mysql/MysqlError.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.mysql.MysqlError; 
     6 
     7version (dbi_mysql) { 
    98 
    109private import dbi.ErrorCode; 
     
    145144    return ErrorCode.Unknown; 
    146145} 
     146 
     147} 
  • trunk/bbconv/dbi/mysql/MysqlResult.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.mysql.MysqlResult; 
    96 
    10 version (Ares) { 
    11     private import util.string : asString = toString; 
    12 } else { 
    13     private import std.string : asString = toString; 
     7version (dbi_mysql) { 
     8private import tango.stdc.stringz : asString = fromStringz; 
     9private import dbi.DBIException, dbi.Result, dbi.Row; 
     10version(Windows) { 
     11    private import dbi.mysql.imp_win; 
    1412} 
    15 private import dbi.DBIException, dbi.Result, dbi.Row; 
    16 private import dbi.mysql.imp; 
     13else { 
     14    private import dbi.mysql.imp; 
     15
    1716 
    1817/** 
     
    6665    const uint fieldCount; 
    6766} 
     67 
     68} 
  • trunk/bbconv/dbi/mysql/all.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
     
    129} 
    1310 
     11version (dbi_mysql) { 
     12 
    1413public import   dbi.mysql.MysqlDatabase, 
    1514        dbi.mysql.MysqlResult, 
    1615        dbi.all; 
     16 
     17} 
  • trunk/bbconv/dbi/mysql/imp.d

    r11 r115  
     1/** 
     2 * Authors: The D DBI project 
     3 * Copyright: BSD license 
     4 */ 
    15module dbi.mysql.imp; 
     6 
     7version (dbi_mysql) { 
     8 
     9extern (C): 
    210 
    311version (Windows) { 
     
    513} else version (linux) { 
    614    pragma (lib, "libmysql.a"); 
     15} else version (Posix) { 
     16    pragma (lib, "libmysql.a"); 
    717} else version (darwin) { 
    818    pragma (lib, "libmysql.a"); 
    919} else { 
    10     static assert (0); 
     20    pragma (msg, "You will need to manually link in the MySQL library."); 
    1121} 
    1222 
    13 extern (C): 
     23version(MySQL_51) { 
     24    const uint MYSQL_VERSION = 50100; 
     25
     26else { 
     27    const uint MYSQL_VERSION = 50000; 
     28
    1429 
    1530alias ubyte __u_char; 
     
    675690  uint charsetnr; 
    676691  enum_field_types type; 
     692  version(MySQL_51){ 
     693      void* extension; 
     694  } 
    677695}; 
    678696alias st_mysql_field MYSQL_FIELD; 
     
    731749alias st_mem_root MEM_ROOT; 
    732750 
    733  
    734 struct st_mysql_data { 
    735   my_ulonglong rows; 
    736   uint fields; 
    737   MYSQL_ROWS *data; 
    738   MEM_ROOT alloc; 
    739  
    740   MYSQL_ROWS **prev_ptr; 
    741  
    742 }; 
     751version(MySQL_51) { 
     752    struct st_mysql_data { 
     753        MYSQL_ROWS *data; 
     754        //embedded_query_result *embedded_info; 
     755        void* embedded_info; 
     756        MEM_ROOT alloc; 
     757        my_ulonglong rows; 
     758        uint fields; 
     759        void* extension; 
     760     
     761        };   
     762
     763else { 
     764    struct st_mysql_data { 
     765      my_ulonglong rows; 
     766      uint fields; 
     767      MYSQL_ROWS *data; 
     768      MEM_ROOT alloc; 
     769     
     770      MYSQL_ROWS **prev_ptr; 
     771     
     772    }; 
     773
    743774alias st_mysql_data MYSQL_DATA; 
    744775 
     
    805836  int (*local_infile_error)(void *, char *, uint); 
    806837  void *local_infile_userdata; 
     838  version(MySQL_51) { 
     839      void* extension; 
     840  } 
    807841} 
    808842 
     
    853887alias charset_info_st CHARSET_INFO; 
    854888 
    855 // end self inserted  
     889// end self inserted 
    856890 
    857891//struct st_mysql_methods; // conflict with line 1211 
     
    910944 
    911945  my_bool *unbuffered_fetch_owner; 
     946  byte* info_buffer; 
     947  version(MySQL_51) { 
     948      void* extension; 
     949  } 
    912950}; 
    913951alias st_mysql MYSQL; 
     
    921959  uint *lengths; 
    922960  MYSQL *handle; 
    923   MEM_ROOT field_alloc; 
    924   uint field_count, current_field; 
    925   MYSQL_ROW row; 
    926   MYSQL_ROW current_row; 
    927   my_bool eof; 
    928  
    929   my_bool unbuffered_fetch_cancelled; 
    930   const st_mysql_methods *methods; 
     961  version(MySQL_51) { 
     962      const st_mysql_methods *methods; 
     963      MYSQL_ROW row; 
     964      MYSQL_ROW current_row; 
     965      MEM_ROOT field_alloc; 
     966      uint field_count, current_field; 
     967      my_bool eof; 
     968      my_bool unbuffered_fetch_cancelled;      
     969      void* extension; 
     970  } 
     971  else { 
     972      MEM_ROOT field_alloc; 
     973      uint field_count, current_field; 
     974      MYSQL_ROW row; 
     975      MYSQL_ROW current_row; 
     976      my_bool eof; 
     977 
     978      my_bool unbuffered_fetch_cancelled; 
     979      const st_mysql_methods *methods;   
     980  } 
    931981}; 
    932982alias st_mysql_res MYSQL_RES; 
     
    935985  NET net; 
    936986  char*  host,user,passwd; 
     987version(MySQL_51) { 
     988    char* net_buf,net_buf_pos,net_data_end; 
     989    uint port; 
     990    int cmd_status; 
     991    int last_errno; 
     992    int net_buf_size; 
     993    my_bool free_me; 
     994    my_bool eof; 
     995    char last_error[256]; 
     996    void* extension; 
     997} 
     998else { 
    937999  uint port; 
    9381000  my_bool free_me; 
     
    9441006  int net_buf_size; 
    9451007  char last_error[256]; 
     1008} 
    9461009}; 
    9471010alias st_mysql_manager MYSQL_MANAGER; 
     
    9831046uint mysql_field_count(MYSQL *mysql); 
    9841047my_ulonglong mysql_affected_rows(MYSQL *mysql); 
    985 my_ulonglong mysql_insert_id(MYSQL *mysql); 
     1048long mysql_insert_id(MYSQL *mysql); 
    9861049uint mysql_errno(MYSQL *mysql); 
    9871050 char * mysql_error(MYSQL *mysql); 
     
    11491212  MYSQL_STMT_FETCH_DONE 
    11501213}; 
    1151 struct st_mysql_bind { 
    1152   uint *length; 
    1153   my_bool *is_null; 
    1154   void *buffer; 
    1155  
    1156   my_bool *error; 
    1157   enum_field_types buffer_type; 
    1158  
    1159   uint buffer_length; 
    1160   ubyte *row_ptr; 
    1161   uint offset; 
    1162   uint length_value; 
    1163   uint param_number; 
    1164   uint pack_length; 
    1165   my_bool error_value; 
    1166   my_bool is_unsigned; 
    1167   my_bool int_data_used; 
    1168   my_bool is_null_value; 
    1169   void (*store_param_func)(NET *net, st_mysql_bind *param); 
    1170   void (*fetch_result)(st_mysql_bind *, MYSQL_FIELD *, 
    1171                        ubyte **row); 
    1172   void (*skip_result)(st_mysql_bind *, MYSQL_FIELD *, 
    1173                       ubyte **row); 
    1174 }; 
     1214version(MySQL_51) 
     1215
     1216    struct st_mysql_bind 
     1217    { 
     1218      uint      *length;          /* output length pointer */ 
     1219      my_bool   *is_null;     /* Pointer to null indicator */ 
     1220      void      *buffer;      /* buffer to get/put data */ 
     1221      /* set this if you want to track data truncations happened during fetch */ 
     1222      my_bool       *error; 
     1223      ubyte *row_ptr;         /* for the current data position */ 
     1224      void (*store_param_func)(NET *net, st_mysql_bind *param); 
     1225      void (*fetch_result)(st_mysql_bind *, MYSQL_FIELD *, 
     1226                           ubyte **row); 
     1227      void (*skip_result)(st_mysql_bind *, MYSQL_FIELD *, 
     1228                  ubyte **row); 
     1229      /* output buffer length, must be set when fetching str/binary */ 
     1230      uint buffer_length; 
     1231      uint offset;           /* offset position for char/binary fetch */ 
     1232      uint  length_value;     /* Used if length is 0 */ 
     1233      uint  param_number;     /* For null count and error messages */ 
     1234      uint  pack_length;      /* Internal length for packed data */ 
     1235      enum_field_types buffer_type; /* buffer type */ 
     1236      my_bool       error_value;      /* used if error is 0 */ 
     1237      my_bool       is_unsigned;      /* set if integer type is unsigned */ 
     1238      my_bool   long_data_used;   /* If used with mysql_send_long_data */ 
     1239      my_bool   is_null_value;    /* Used if is_null is 0 */ 
     1240      void *extension; 
     1241    } 
     1242
     1243else 
     1244
     1245    struct st_mysql_bind { 
     1246      uint *length; 
     1247      my_bool *is_null; 
     1248      void *buffer; 
     1249     
     1250      my_bool *error; 
     1251      enum_field_types buffer_type; 
     1252     
     1253      uint buffer_length; 
     1254      ubyte *row_ptr; 
     1255      uint offset; 
     1256      uint length_value; 
     1257      uint param_number; 
     1258      uint pack_length; 
     1259      my_bool error_value; 
     1260      my_bool is_unsigned; 
     1261      my_bool int_data_used; 
     1262      my_bool is_null_value; 
     1263      void (*store_param_func)(NET *net, st_mysql_bind *param); 
     1264      void (*fetch_result)(st_mysql_bind *, MYSQL_FIELD *, 
     1265                           ubyte **row); 
     1266      void (*skip_result)(st_mysql_bind *, MYSQL_FIELD *, 
     1267                          ubyte **row); 
     1268    }; 
     1269
    11751270alias st_mysql_bind MYSQL_BIND; 
    11761271 
     
    11871282  MYSQL_DATA result; 
    11881283  MYSQL_ROWS *data_cursor; 
    1189  
    1190   my_ulonglong affected_rows; 
    1191   my_ulonglong insert_id; 
    1192  
    1193  
    1194  
    1195  
    1196   int (*read_row_func)(st_mysql_stmt *stmt, 
    1197                                   ubyte **row); 
     1284  version(MySQL_51) {     
     1285      int (*read_row_func)(st_mysql_stmt *stmt, 
     1286                                      ubyte **row); 
     1287      my_ulonglong affected_rows; 
     1288      my_ulonglong insert_id; 
     1289  } 
     1290  else { 
     1291      my_ulonglong affected_rows; 
     1292      my_ulonglong insert_id; 
     1293      int (*read_row_func)(st_mysql_stmt *stmt, 
     1294                                      ubyte **row); 
     1295 
     1296  } 
    11981297  uint stmt_id; 
    11991298  uint flags; 
     
    12201319 
    12211320  my_bool update_max_length; 
     1321  version(MySQL_51) { 
     1322      void* extension; 
     1323  } 
    12221324}; 
    12231325alias st_mysql_stmt MYSQL_STMT; 
     
    13191421void mysql_close(MYSQL *sock); 
    13201422uint net_safe_read(MYSQL* mysql); 
     1423 
     1424const uint NOT_NULL_FLAG = 1;       /* Field can't be NULL */ 
     1425const uint PRI_KEY_FLAG = 2;        /* Field is part of a primary key */ 
     1426const uint UNIQUE_KEY_FLAG = 4;     /* Field is part of a unique key */ 
     1427const uint MULTIPLE_KEY_FLAG = 8;       /* Field is part of a key */ 
     1428const uint BLOB_FLAG = 16;      /* Field is a blob */ 
     1429const uint UNSIGNED_FLAG = 32;      /* Field is unsigned */ 
     1430const uint ZEROFILL_FLAG = 64;      /* Field is zerofill */ 
     1431const uint BINARY_FLAG = 128;       /* Field is binary   */ 
     1432 
     1433const int MYSQL_NO_DATA = 100; 
     1434const int MYSQL_DATA_TRUNCATED = 101; 
     1435 
     1436} 
  • trunk/bbconv/dbi/odbc/OdbcDatabase.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    6  * Modified: 
    7  *  2006-11-01  Added some casts around nulls. 
    8  * 
    93 * Copyright: BSD license 
    104 */ 
     
    159// WindowsAPI should also include odbc32.lib itself. 
    1610 
    17 version (Ares) { 
    18     private static import std.array; 
    19     debug (UnitTest) private import std.io.Console; 
     11version (dbi_odbc) { 
     12 
     13version (Phobos) { 
     14    private static import std.string; 
     15    debug (UnitTest) private static import std.stdio; 
    2016} else { 
    21     private static import std.string
    22     debug (UnitTest) private import std.stdio
     17    private static import tango.text.Util
     18    debug (UnitTest) private static import tango.io.Stdout
    2319} 
    2420private import dbi.Database, dbi.DBIException, dbi.Result; 
     
    2723debug (UnitTest) private import dbi.Row, dbi.Statement; 
    2824 
    29 pragma (lib, "odbc32.lib"); 
     25version (Windows) pragma (lib, "odbc32.lib"); 
    3026 
    3127private SQLHENV environment; 
     
    107103     * Connect to a database using ODBC. 
    108104     * 
    109      * This function will connect DSN-lessly if params has a "=" and with DSN 
    110      * otherwise.  For information on how to use connect DSN-lessly, see the 
     105     * This function will connect without DSN if params has a '=' and with DSN 
     106     * otherwise.  For information on how to use connect without DSN, see the 
    111107     * ODBC documentation. 
    112108     * 
    113109     * Bugs: 
    114      *  Connecting DSN-lessly ignores username and password. 
     110     *  Connecting without DSN ignores username and password. 
    115111     * 
    116112     * Params: 
     
    135131            SQLCHAR[1024] buffer; 
    136132 
    137             if (!SQL_SUCCEEDED(SQLDriverConnect(connection, null, cast(SQLCHAR*)params, cast(SQLSMALLINT)params.length, buffer, buffer.length, null, SQL_DRIVER_COMPLETE))) { 
     133            if (!SQL_SUCCEEDED(SQLDriverConnect(connection, null, cast(SQLCHAR*)params.ptr, cast(SQLSMALLINT)params.length, buffer.ptr, buffer.length, null, SQL_DRIVER_COMPLETE))) { 
    138134                throw new DBIException("Unable to connect to the database.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    139135            } 
     
    141137 
    142138        void connectWithDSN () { 
    143             if (!SQL_SUCCEEDED(SQLConnect(connection, cast(SQLCHAR*)params, cast(SQLSMALLINT)params.length, cast(SQLCHAR*)username, cast(SQLSMALLINT)username.length, cast(SQLCHAR*)password, cast(SQLSMALLINT)password.length))) { 
     139            if (!SQL_SUCCEEDED(SQLConnect(connection, cast(SQLCHAR*)params.ptr, cast(SQLSMALLINT)params.length, cast(SQLCHAR*)username.ptr, cast(SQLSMALLINT)username.length, cast(SQLCHAR*)password.ptr, cast(SQLSMALLINT)password.length))) { 
    144140                throw new DBIException("Unable to connect to the database.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    145141            } 
    146142        } 
    147143 
    148         version (Ares) { 
    149             if (std.regexp.find(params, "=") == size_t.max) { 
    150                 connectWithDSN(); 
    151             } else { 
    152                 connectWithoutDSN(); 
    153             } 
    154         } else { 
     144        version (Phobos) { 
    155145            if (std.string.find(params, "=") == -1) { 
    156146                connectWithDSN(); 
     
    158148                connectWithoutDSN(); 
    159149            } 
    160         } 
    161  
     150        } else { 
     151            if (tango.text.Util.contains(params, '=')) { 
     152                connectWithoutDSN(); 
     153            } else { 
     154                connectWithDSN(); 
     155            } 
     156        } 
    162157    } 
    163158 
     
    200195                throw new DBIException("Unable to destroy an ODBC statement.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    201196            } 
    202         scope (failure)  
     197        scope (failure) 
    203198            if (!SQL_SUCCEEDED(SQLEndTran(SQL_HANDLE_DBC, connection, SQL_ROLLBACK))) { 
    204199                throw new DBIException("Unable to rollback after a query failure.  ODBC returned " ~ getLastErrorMessage, sql, getLastErrorCode); 
     
    207202            throw new DBIException("Unable to create an ODBC statement.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    208203        } 
    209         if (!SQL_SUCCEEDED(SQLExecDirect(stmt, cast(SQLCHAR*)sql, sql.length))) { 
     204        if (!SQL_SUCCEEDED(SQLExecDirect(stmt, cast(SQLCHAR*)sql.ptr, sql.length))) { 
    210205            throw new DBIException("Unable to execute SQL code.  ODBC returned " ~ getLastErrorMessage, sql, getLastErrorCode); 
    211206        } 
    212          
     207 
    213208    } 
    214209 
     
    238233                throw new DBIException("Unable to destroy an ODBC statement.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    239234            } 
    240         scope (failure)  
     235        scope (failure) 
    241236            if (!SQL_SUCCEEDED(SQLEndTran(SQL_HANDLE_DBC, connection, SQL_ROLLBACK))) { 
    242237                throw new DBIException("Unable to rollback after a query failure.  ODBC returned " ~ getLastErrorMessage, sql, getLastErrorCode); 
     
    245240            throw new DBIException("Unable to create an ODBC statement.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    246241        } 
    247         if (SQL_SUCCEEDED(SQLExecDirect(stmt, cast(SQLCHAR*)sql, sql.length))) { 
     242        if (SQL_SUCCEEDED(SQLExecDirect(stmt, cast(SQLCHAR*)sql.ptr, sql.length))) { 
    248243            return new OdbcResult(stmt); 
    249244        } else { 
     
    278273    deprecated override char[] getErrorMessage () { 
    279274        return getLastErrorMessage(); 
    280    
     275
    281276 
    282277    /* 
     
    299294        SQLRETURN ret = SQL_SUCCESS; 
    300295 
    301         while (SQL_SUCCEEDED(ret = SQLDrivers(environment, direction, driver, driver.length, &driverLength, attr, attr.length, &attrLength))) { 
     296        while (SQL_SUCCEEDED(ret = SQLDrivers(environment, direction, driver.ptr, driver.length, &driverLength, attr.ptr, attr.length, &attrLength))) { 
    302297            direction = SQL_FETCH_NEXT; 
    303298            driverList ~= driver[0 .. driverLength] ~ cast(SQLCHAR[])" ~ " ~ attr[0 .. attrLength]; 
     
    324319        SQLRETURN ret = SQL_SUCCESS; 
    325320 
    326         while (SQL_SUCCEEDED(ret = SQLDataSources(environment, direction, dsn, dsn.length, &dsnLength, desc, desc.length, &descLength))) { 
     321        while (SQL_SUCCEEDED(ret = SQLDataSources(environment, direction, dsn.ptr, dsn.length, &dsnLength, desc.ptr, desc.length, &descLength))) { 
    327322            if (ret == SQL_SUCCESS_WITH_INFO) { 
    328323                throw new DBIException("Data truncation occurred in the data source list.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
     
    352347 
    353348        SQLGetDiagField(SQL_HANDLE_DBC, connection, 0, SQL_DIAG_NUMBER, &errorNumber, 0, null); 
    354         SQLGetDiagRec(SQL_HANDLE_DBC, connection, errorNumber, state, &nativeCode, text, text.length, &textLength); 
     349        SQLGetDiagRec(SQL_HANDLE_DBC, connection, errorNumber, state.ptr, &nativeCode, text.ptr, text.length, &textLength); 
    355350        return cast(char[])state ~ " = " ~ cast(char[])text; 
    356351    } 
     
    370365 
    371366        SQLGetDiagField(SQL_HANDLE_DBC, connection, 0, SQL_DIAG_NUMBER, &errorNumber, 0, null); 
    372         SQLGetDiagRec(SQL_HANDLE_DBC, connection, errorNumber, state, &nativeCode, text, text.length, &textLength); 
     367        SQLGetDiagRec(SQL_HANDLE_DBC, connection, errorNumber, state.ptr, &nativeCode, text.ptr, text.length, &textLength); 
    373368        return nativeCode; 
    374369    } 
     
    376371 
    377372unittest { 
    378     version (Ares) { 
     373    version (Phobos) { 
    379374        void s1 (char[] s) { 
    380             Cout("" ~ s ~ "\n"); 
     375            std.stdio.writefln("%s", s); 
    381376        } 
    382377 
    383378        void s2 (char[] s) { 
    384             Cout("   ..." ~ s ~ "\n"); 
     379            std.stdio.writefln("   ...%s", s); 
    385380        } 
    386381    } else { 
    387382        void s1 (char[] s) { 
    388             writefln("%s", s); 
     383            tango.io.Stdout.Stdout(s).newline(); 
    389384        } 
    390385 
    391386        void s2 (char[] s) { 
    392             writefln("   ...%s", s); 
     387            tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
    393388        } 
    394389    } 
     
    441436    delete db; 
    442437} 
     438 
     439} 
  • trunk/bbconv/dbi/odbc/OdbcResult.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    6  * Modified: 
    7  *  2006-11-01  Fixed an array bounds exception on null data. 
    8  *  2006-11-01  Fixed a problem that sometimes caused the column name to be "". 
    9  *  2006-11-01  Added some casts around nulls. 
    10  * 
    113 * Copyright: BSD license 
    124 */ 
     
    179// WindowsAPI should also include odbc32.lib itself. 
    1810 
    19 version (Ares) { 
    20     private static import std.regexp; 
     11version (dbi_odbc) { 
     12 
     13version (Phobos) { 
     14    private import std.string : trim = strip; 
    2115} else { 
    22     private import std.string : strip
     16    private import tango.text.Util : trim
    2317} 
    2418private import dbi.DBIException, dbi.Result, dbi.Row; 
    2519private import win32.odbcinst, win32.sql, win32.sqlext, win32.sqltypes, win32.sqlucode, win32.windef; 
    2620 
    27 pragma (lib, "odbc32.lib"); 
     21version (Windows) pragma (lib, "odbc32.lib"); 
    2822 
    2923/* 
     
    6155                throw new DBIException("Unable to get the SQL column types.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    6256            } 
    63             if (!SQL_SUCCEEDED(SQLColAttribute(stmt, i, SQL_DESC_TYPE_NAME, typeName, typeName.length, &typeNameLength, null))) { 
     57            if (!SQL_SUCCEEDED(SQLColAttribute(stmt, i, SQL_DESC_TYPE_NAME, typeName.ptr, typeName.length, &typeNameLength, null))) { 
    6458                throw new DBIException("Unable to get the SQL column type names.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    6559            } 
    66             if (!SQL_SUCCEEDED(SQLColAttribute(stmt, i, SQL_DESC_NAME, columnName, columnName.length, &columnNameLength, null))) { 
     60            if (!SQL_SUCCEEDED(SQLColAttribute(stmt, i, SQL_DESC_NAME, columnName.ptr, columnName.length, &columnNameLength, null))) { 
    6761                throw new DBIException("Unable to get the SQL column names.  ODBC returned " ~ getLastErrorMessage, getLastErrorCode); 
    6862            } 
     
    8175     */ 
    8276    override Row fetchRow () { 
    83         version (Ares) { 
    84             char[] strip (char[] string) { 
    85                 return std.regexp.sub(std.regexp.sub(string, "^[ \t\v\r\n\f]+", ""), " [\t\v\r\n\f]+$", ""); 
    86             } 
    87         } 
    88  
    8977        if (SQL_SUCCEEDED(SQLFetch(stmt))) { 
    9078            Row row = new Row(); 
     
    9381 
    9482            for (SQLUSMALLINT i = 1; i <= numColumns; i++) { 
    95                 if (SQL_SUCCEEDED(SQLGetData(stmt, i, SQL_C_CHAR, buf, buf.length, &indicator))) { 
     83                if (SQL_SUCCEEDED(SQLGetData(stmt, i, SQL_C_CHAR, buf.ptr, buf.length, &indicator))) { 
    9684                    if (indicator == SQL_NULL_DATA) { 
    9785                        buf[0 .. 4] = cast(SQLCHAR[])"null"; 
     
    10189                        row.addField(columnNames[i - 1], null, columnTypesName[i - 1], columnTypesNum[i - 1]); 
    10290                    } else { 
    103                         row.addField(columnNames[i - 1], strip(cast(char[])buf[0 .. indicator]), columnTypesName[i - 1], columnTypesNum[i - 1]); 
     91                        row.addField(columnNames[i - 1], trim(cast(char[])buf[0 .. indicator]), columnTypesName[i - 1], columnTypesNum[i - 1]); 
    10492                    } 
    10593                } 
     
    145133 
    146134        SQLGetDiagField(SQL_HANDLE_STMT, stmt, 0, SQL_DIAG_NUMBER, &errorNumber, 0, null); 
    147         SQLGetDiagRec(SQL_HANDLE_STMT, stmt, errorNumber, state, &nativeCode, text, text.length, &textLength); 
     135        SQLGetDiagRec(SQL_HANDLE_STMT, stmt, errorNumber, state.ptr, &nativeCode, text.ptr, text.length, &textLength); 
    148136        return cast(char[])state ~ " = " ~ cast(char[])text; 
    149137    } 
     
    160148 
    161149        SQLGetDiagField(SQL_HANDLE_STMT, stmt, 0, SQL_DIAG_NUMBER, &errorNumber, 0, null); 
    162         SQLGetDiagRec(SQL_HANDLE_STMT, stmt, errorNumber, state, &nativeCode, text, text.length, &textLength); 
     150        SQLGetDiagRec(SQL_HANDLE_STMT, stmt, errorNumber, state.ptr, &nativeCode, text.ptr, text.length, &textLength); 
    163151        return nativeCode; 
    164152    } 
    165153} 
     154 
     155} 
  • trunk/bbconv/dbi/odbc/all.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
     
    129} 
    1310 
     11 
     12version (dbi_odbc) { 
     13 
    1414public import   dbi.odbc.OdbcDatabase, 
    1515        dbi.odbc.OdbcResult, 
    1616        dbi.all; 
     17 
     18} 
  • trunk/bbconv/dbi/oracle/OracleDatabase.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.oracle.OracleDatabase; 
     6 
     7version (dbi_oracle) { 
    98 
    109private import dbi.Database, dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement; 
     
    7170     */ 
    7271    override void connect (char[] params, char[] username, char[] password) { 
    73         if (sword error = OCILogon(env, err, &svc, username, username.length, password, password.length, params, params.length) != OCI_SUCCESS) { 
     72        if (sword error = OCILogon(env, err, &svc, username.ptr, username.length, password.ptr, password.length, params.ptr, params.length) != OCI_SUCCESS) { 
    7473            throw new DBIException("Unable to connect to the Oracle database.", error); 
    7574        } 
     
    153152    OCIStmt* sql; 
    154153} 
     154 
     155} 
  • trunk/bbconv/dbi/oracle/OracleResult.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.oracle.OracleResult; 
     6 
     7version (dbi_oracle) { 
    98 
    109private import dbi.DBIException, dbi.Result, dbi.Row; 
     
    2019    public: 
    2120    this () { 
    22          
     21 
    2322    } 
    2423 
     
    3736     */ 
    3837    override void finish () { 
    39          
     38 
    4039    } 
    4140 
    4241    private: 
    4342} 
     43 
     44} 
  • trunk/bbconv/dbi/oracle/all.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
     
    129} 
    1310 
     11version (dbi_oracle) { 
     12 
    1413public import   dbi.oracle.OracleDatabase, 
    1514        dbi.oracle.OracleResult, 
    1615        dbi.all; 
     16 
     17} 
  • trunk/bbconv/dbi/oracle/imp/nzerror.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.nzerror; 
     15 
     16 
     17version (dbi_oracle) { 
    1618 
    1719/** 
     
    322324    NZERROR_CERT_IN_CRL     = 29178,    /// Cert is in CRL - cert is revoked. 
    323325    NZERROR_CERT_IN_CRL_CHECK_FAILED= 29179,    /// Cert revocation check failed. 
    324     NZERROR_INVALID_CERT_STATUS_PROTOCOL = 29180,  
     326    NZERROR_INVALID_CERT_STATUS_PROTOCOL = 29180, 
    325327    NZERROR_LDAP_OPEN_FAILED    = 29181,    /// ldap_open failed. 
    326328    NZERROR_LDAP_BIND_FAILED    = 29182,    /// ldap_bind failed. 
     
    333335    NZERROR_LDAP_NO_ENTRY_FOUND = 29189,    /// No entry found in OID. 
    334336    NZERROR_LDAP_MULTIPLE_ENTRIES_FOUND = 29190,    /// Multiple entries in OID. 
    335     NZERROR_OID_INFO_NOT_SET    = 29191,  
     337    NZERROR_OID_INFO_NOT_SET    = 29191, 
    336338    NZERROR_LDAP_VALMEC_NOT_SET = 29192,    /// Validation mechanism not set in OID. 
    337339    NZERROR_CRLDP_NO_CRL_FOUND  = 29193,    /// No CRL found using CRLDP mechanism. 
     
    419421//  return ssl_error == SSLNoErr ? nzerror.NZERROR_OK : cast(nzerror)(ssl_error - SSLMemoryErr + cast(size_t)nzerror.NZERROR_SSLMemoryErr); 
    420422} 
     423 
     424} 
  • trunk/bbconv/dbi/oracle/imp/nzt.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.nzt; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.nzerror; 
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.nzerror, dbi.oracle.imp.oratypes; 
    1819 
    1920const uint NZT_MAX_SHA1         = 20;       /// 
     
    143144/** 
    144145 * Cert-version types. 
    145  *  
     146 * 
    146147 * This is used to quickly look-up the cert-type. 
    147148 */ 
     
    209210 * 
    210211 * Deprecated: 
    211  *  
     212 * 
    212213 * 
    213214 * What a persona will be used for? 
     
    263264 * The flags_nzttBufferBlock member tells the function whether the 
    264265 * buffer can be grown or not.  If flags_nzttBufferBlock is 0, then 
    265  * the buffer will be realloc'ed automatically.   
     266 * the buffer will be realloc'ed automatically. 
    266267 * 
    267268 * The buflen_nzttBufferBLock member is set to the length of the 
     
    437438 * wallet.  The list of personas (and their associated identities) 
    438439 * is built and stored into the wallet structure. 
    439  *  
    440  * Params: 
    441  *  osscntxt = OSS context.  
     440 * 
     441 * Params: 
     442 *  osscntxt = OSS context. 
    442443 *  wrllen = Length of WRL. 
    443444 *  wrl = WRL. 
    444445 *  pwdlen = Length of password. 
    445446 *  pwd = Password. 
    446  *  wallet = Initialized wallet structure.    
    447  *     
     447 *  wallet = Initialized wallet structure. 
     448 * 
    448449 * Returns: 
    449450 *  NZERROR_OK      Success. 
     
    463464 * modified by an application but if it is not explicitly saved it 
    464465 * reverts back to what was in the wallet. 
    465  *  
     466 * 
    466467 * Params: 
    467468 *  osscntxt = OSS context. 
     
    491492 * Retrieves a persona from the wallet based on the index number passed 
    492493 * in.  This persona is a COPY of the one stored in the wallet, therefore 
    493  * it is perfectly fine for the wallet to be closed after this call is  
     494 * it is perfectly fine for the wallet to be closed after this call is 
    494495 * made. 
    495496 * 
     
    497498 * 
    498499 * Params: 
    499  *  osscntxt = OSS context.  
     500 *  osscntxt = OSS context. 
    500501 *  wallet = Wallet. 
    501502 *  index = Which wallet index to remove (first persona is zero). 
     
    510511 * Retrieve a persona based on its name. 
    511512 * 
    512  * Retrieves a persona from the wallet based on the name of the persona.  
     513 * Retrieves a persona from the wallet based on the name of the persona. 
    513514 * This persona is a COPY of the one stored in the wallet, therefore 
    514515 * it is perfectly fine for the wallet to be closed after this call is 
     
    520521 *  osscntxt = OSS context. 
    521522 *  wallet = Wallet. 
    522  *  name = Name of the persona  
     523 *  name = Name of the persona 
    523524 *  persona = Persona found. 
    524525 * 
     
    532533 * 
    533534 * Params: 
    534  *  osscntxt = OSS context.  
     535 *  osscntxt = OSS context. 
    535536 *  persona = Persona. 
    536537 * 
     
    581582 * Retrieve a trusted identity from a persona. 
    582583 * 
    583  * Retrieves a trusted identity from the persona based on the index  
    584  * number passed in.  This identity is a copy of the one stored in  
     584 * Retrieves a trusted identity from the persona based on the index 
     585 * number passed in.  This identity is a copy of the one stored in 
    585586 * the persona, therefore it is perfectly fine to close the persona 
    586587 * after this call is made. 
    587588 * 
    588  * The caller is responsible for freeing the memory of this object  
     589 * The caller is responsible for freeing the memory of this object 
    589590 * by calling nztiAbortIdentity it is no longer needed. 
    590591 * 
    591592 * Params: 
    592  *  osscntxt = OSS context.  
     593 *  osscntxt = OSS context. 
    593594 *  persona = Persona. 
    594595 *  index = Which wallet index to remove (first element is zero). 
     
    604605 * 
    605606 * This function will only work for X.509 based persona which contain 
    606  * a private key.   
    607  * A copy of the private key is returned to the caller so that they do not  
     607 * a private key. 
     608 * A copy of the private key is returned to the caller so that they do not 
    608609 * have to worry about the key changing "underneath them." 
    609610 * Memory will be allocated for the vkey and therefore, the caller 
     
    627628 * 
    628629 * This funiction will only work for X.509 based persona which contain 
    629  * a certificate for the self identity.  
    630  * A copy of the certificate is returned to the caller so that they do not  
     630 * a certificate for the self identity. 
     631 * A copy of the certificate is returned to the caller so that they do not 
    631632 * have to worry about the certificate changing "underneath them." 
    632633 * Memory will be allocated for the cert and therefore, the caller 
     
    730731 * 
    731732 * Memory is allocated for the Identity Description. It 
    732  * is the caller's responsibility to free this memory by calling  
     733 * is the caller's responsibility to free this memory by calling 
    733734 * nztiFreeIdentityDesc. 
    734735 * 
     
    819820 *  persona = Persona. 
    820821 *  identity = Identity. 
    821  *  validated = TRUE if identity was validated.   
     822 *  validated = TRUE if identity was validated. 
    822823 * 
    823824 * Returns: 
     
    838839 *  input = The input. 
    839840 *  tdubuf = TDU buffer. 
    840  *  
     841 * 
    841842 * Returns: 
    842843 *  NZERROR_OK      Success. 
     
    896897 * 
    897898 * Params: 
    898  *  osscntxt = OSS context.  
     899 *  osscntxt = OSS context. 
    899900 *  persona = Persona. 
    900901 *  nrecipients = Number of recipients. 
     
    11081109 * 
    11091110 * Returns: 
    1110  *  
     1111 * 
    11111112 */ 
    11121113extern (C) nzerror nztiGetSecInfo (nzctx* osscntxt, nzttPersona* persona, text** dname, ub4* dnamelen, text** issuername, ub4*, ub1**, ub4*); 
     
    11221123 * 
    11231124 * Returns: 
    1124  *  
     1125 * 
    11251126 */ 
    11261127extern (C) nzerror nztiGetDName (nzctx* osscntxt, nzttIdentity* identity, text** dn, ub4* dnlen); 
     
    11361137 * 
    11371138 * Returns: 
    1138  *  
     1139 * 
    11391140 */ 
    11401141extern (C) nzerror nztiGetIssuerName (nzctx* osscntxt, nzttIdentity* identity, text** issuername, ub4* issuernamelen); 
     
    11521153 * 
    11531154 * Returns: 
    1154  *  
     1155 * 
    11551156 */ 
    11561157extern (C) nzerror nztgch_GetCertHash (nzctx* osscntxt, nzttIdentity* identity, ub1** certHash, ub4* hashLen); 
     
    11641165 * 
    11651166 * Returns: 
    1166  *  
     1167 * 
    11671168 */ 
    11681169extern (C) nzerror nztdbuf_DestroyBuf (nzctx* osscntxt, dvoid** buf); 
     
    11781179 * 
    11791180 * Returns: 
    1180  *  
     1181 * 
    11811182 */ 
    11821183extern (C) nzerror nztGetCertChain (nzctx* osscntxt, nzttWallet* ); 
     
    12341235 *  targetIdentity = Target identity. 
    12351236 *  sourceIdentity = Source identity. 
    1236  *   
     1237 * 
    12371238 * Returns: 
    12381239 *  NZERROR_OK      Success. 
     
    12481249 *  target_ipriv = Target identityPrivate. 
    12491250 *  source_ipriv = Source identityPrivate. 
    1250  *  
     1251 * 
    12511252 * Returns: 
    12521253 *  NZERROR_OK      Success. 
     
    12921293 *  start_time = Start time of the certificate. 
    12931294 *  end_time = End time of the certificate. 
    1294  *  
     1295 * 
    12951296 * Returns: 
    12961297 *  NZERROR_OK      Success. 
     
    13811382 * 
    13821383 * Params: 
    1383  *  osscntxt = OSS context.  
     1384 *  osscntxt = OSS context. 
    13841385 *  persona = Persona. 
    13851386 *  wallet = Wallet. 
     
    14541455 *  osscntxt = Success. 
    14551456 *  identity = Trusted Identity. 
    1456  *  persona = Persona.     
     1457 *  persona = Persona. 
    14571458 * 
    14581459 * Returns: 
     
    15121513 * 
    15131514 * Params: 
    1514  *  osscntxt = OSS context.  
     1515 *  osscntxt = OSS context. 
    15151516 *  identity = Identity. 
    15161517 * 
     
    18241825 *  An unknown parameter is missing from the documentation. 
    18251826 */ 
    1826 extern (C) nzerror nztGetVersion (nzctx*, nzttIdentity*, nzstrc*);  
     1827extern (C) nzerror nztGetVersion (nzctx*, nzttIdentity*, nzstrc*); 
    18271828 
    18281829/** 
     
    18491850 */ 
    18501851extern (C) nzerror nztSearchNZDefault (nzctx*, boolean*); 
     1852 
     1853} 
  • trunk/bbconv/dbi/oracle/imp/oci.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.oci; 
     15 
     16 
     17version (dbi_oracle) { 
     18 
     19version (Windows) { 
     20    pragma (lib, "oci.lib"); 
     21} else version (linux) { 
     22    pragma (lib, "liboci.a"); 
     23} else version (Posix) { 
     24    pragma (lib, "liboci.a"); 
     25} else version (darwin) { 
     26    pragma (msg, "You will need to manually link in the Oracle library."); 
     27} else { 
     28    pragma (msg, "You will need to manually link in the Oracle library."); 
     29} 
    1630 
    1731public import   dbi.oracle.imp.nzerror, 
     
    269283const uint OCI_ATTR_RESERVED_2      = 147;      /// Reserved. 
    270284 
    271    
     285 
    272286const uint OCI_ATTR_SUBSCR_RECPT    = 148;      /// Recepient of subscription. 
    273287const uint OCI_ATTR_SUBSCR_RECPTPROTO   = 149;      /// Protocol for recepient. 
     
    371385 
    372386const uint OCI_ATTR_CHNF_TABLENAMES = 401;      /// Out: array of table names. 
    373 const uint OCI_ATTR_CHNF_ROWIDS     = 402;      /// In: rowids needed.  
    374 const uint OCI_ATTR_CHNF_OPERATIONS = 403;      /// In: notification operation filter.  
     387const uint OCI_ATTR_CHNF_ROWIDS     = 402;      /// In: rowids needed. 
     388const uint OCI_ATTR_CHNF_OPERATIONS = 403;      /// In: notification operation filter. 
    375389const uint OCI_ATTR_CHNF_CHANGELAG  = 404;      /// Txn lag between notifications. 
    376390 
     
    448462const uint OCI_SUCCESS          = 0;        /// Maps to SQL_SUCCESS of SAG CLI. 
    449463const uint OCI_SUCCESS_WITH_INFO    = 1;        /// Maps to SQL_SUCCESS_WITH_INFO. 
    450 const uint OCI_RESERVED_FOR_INT_USE = 200;      /// Reserved.  
     464const uint OCI_RESERVED_FOR_INT_USE = 200;      /// Reserved. 
    451465const uint OCI_NO_DATA          = 100;      /// Maps to SQL_NO_DATA. 
    452466const int OCI_ERROR         = -1;       /// Maps to SQL_ERROR. 
     
    834848const uint OCI_ATTR_DISTINGUISHED_NAME  = 300;      /// Use DN as user name. 
    835849const uint OCI_ATTR_KERBEROS_TICKET = 301;      /// Kerberos ticket as cred.. 
    836   
     850 
    837851const uint OCI_ATTR_ORA_DEBUG_JDWP  = 302;      /// ORA_DEBUG_JDWP attribute. 
    838852 
     
    14241438 * The offset in the lob data.  The offset is specified in terms of bytes for 
    14251439 * BLOBs and BFILes.  Character offsets are used for CLOBs, NCLOBs. 
    1426  * The maximum size of internal lob data is 4 gigabytes.  FILE LOB  
     1440 * The maximum size of internal lob data is 4 gigabytes.  FILE LOB 
    14271441 * size is limited by the operating system. 
    14281442 */ 
     
    14321446 * OCI Lob Length (of lob data). 
    14331447 * 
    1434  * Specifies the length of lob data in bytes for BLOBs and BFILes and in  
     1448 * Specifies the length of lob data in bytes for BLOBs and BFILes and in 
    14351449 * characters for CLOBs, NCLOBs.  The maximum length of internal lob 
    14361450 * data is 4 gigabytes.  The length of FILE LOBs is limited only by the 
     
    14441458 * The mode specifies the planned operations that will be performed on the 
    14451459 * FILE lob data.  The FILE lob can be opened in read-only mode only. 
    1446  *  
     1460 * 
    14471461 * In the future, we may include read/write, append and truncate modes.  Append 
    14481462 * is equivalent to read/write mode except that the FILE is positioned for 
     
    16841698const uint OCI_MAJOR_VERSION        = 10;       /// Major release version. 
    16851699const uint OCI_MINOR_VERSION        = 2;        /// Minor release version. 
     1700 
     1701} 
  • trunk/bbconv/dbi/oracle/imp/oci1.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.oci1; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.ociap; 
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.ociap, dbi.oracle.imp.oratypes; 
    1819 
    1920/** 
     
    223224const uint OCI_EXTRACT_TYPE_INTEGER = 3;        /// Key type is integer. 
    224225const uint OCI_EXTRACT_TYPE_OCINUM  = 4;        /// Key type is ocinum. 
     226 
     227} 
  • trunk/bbconv/dbi/oracle/imp/oci8dp.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.oci8dp; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.ocidfn, dbi.oracle.imp.oci; 
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.ocidfn, dbi.oracle.imp.oci, dbi.oracle.imp.oratypes; 
    1819 
    1920/** 
     
    241242 
    242243/** 
    243  *  
     244 * 
    244245 * 
    245246 * Params: 
     
    251252 */ 
    252253extern (C) sword OCIDirPathStreamReset (OCIDirPathStream* dpstr, OCIError* errhp); 
     254 
     255} 
  • trunk/bbconv/dbi/oracle/imp/ociap.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.ociap; 
    1615 
    17 private import std.c.stdarg; 
     16version (dbi_oracle) { 
     17 
     18version (Phobos) { 
     19    private import std.c.stdarg : va_list; 
     20} else { 
     21    private import tango.stdc.stdarg : va_list; 
     22
    1823private import dbi.oracle.imp.oratypes, dbi.oracle.imp.ocidfn, dbi.oracle.imp.nzt, dbi.oracle.imp.oci, dbi.oracle.imp.ort, dbi.oracle.imp.orl, dbi.oracle.imp.oro, dbi.oracle.imp.oci1; 
    1924 
     
    2126                              DESCRIPTION 
    2227****************************************************************************** 
    23 Note: the descriptions of the functions are alphabetically arranged. Please  
    24 maintain the arrangement when adding a new function description. The actual  
    25 prototypes are below this comment section and do not follow any alphabetical  
    26 ordering.  
     28Note: the descriptions of the functions are alphabetically arranged. Please 
     29maintain the arrangement when adding a new function description. The actual 
     30prototypes are below this comment section and do not follow any alphabetical 
     31ordering. 
    2732 
    2833 
     
    3338OCI Attribute Get 
    3439Purpose 
    35 This call is used to get a particular attribute of a handle.  
     40This call is used to get a particular attribute of a handle. 
    3641Syntax 
    3742sword OCIAttrGet ( CONST dvoid    *trgthndlp, 
     
    4348Comments 
    4449This call is used to get a particular attribute of a handle. 
    45 See Appendix B,  "Handle Attributes",  for a list of handle types and their  
     50See Appendix B,  "Handle Attributes",  for a list of handle types and their 
    4651readable attributes. 
    4752Parameters 
    48 trgthndlp (IN) - is the pointer to a handle type.  
    49 trghndltyp (IN) - is the handle type.  
    50 attributep (OUT) - is a pointer to the storage for an attribute value. The  
    51 attribute value is filled in.  
    52 sizep (OUT) - is the size of the attribute value.  
    53 This can be passed in as NULL for most parameters as the size is well known.  
    54 For text* parameters, a pointer to a ub4 must be passed in to get the length  
    55 of the string.  
     53trgthndlp (IN) - is the pointer to a handle type. 
     54trghndltyp (IN) - is the handle type. 
     55attributep (OUT) - is a pointer to the storage for an attribute value. The 
     56attribute value is filled in. 
     57sizep (OUT) - is the size of the attribute value. 
     58This can be passed in as NULL for most parameters as the size is well known. 
     59For text* parameters, a pointer to a ub4 must be passed in to get the length 
     60of the string. 
    5661attrtype (IN) - is the type of attribute. 
    57 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     62errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    5863diagnostic information in the event of an error. 
    5964Related Functions 
     
    6772OCI Attribute Set 
    6873Purpose 
    69 This call is used to set a particular attribute of a handle or a descriptor.  
     74This call is used to set a particular attribute of a handle or a descriptor. 
    7075Syntax 
    7176sword OCIAttrSet ( dvoid       *trgthndlp, 
     
    7681                 OCIError    *errhp ); 
    7782Comments 
    78 This call is used to set a particular attribute of a handle or a descriptor.  
     83This call is used to set a particular attribute of a handle or a descriptor. 
    7984See Appendix B for a list of handle types and their writeable attributes. 
    8085Parameters 
    81 trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets  
    82 modified.  
    83 trghndltyp (IN/OUT) - is the handle type.  
    84 attributep (IN) - a pointer to an attribute value.  
    85 The attribute value is copied into the target handle. If the attribute value  
     86trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets 
     87modified. 
     88trghndltyp (IN/OUT) - is the handle type. 
     89attributep (IN) - a pointer to an attribute value. 
     90The attribute value is copied into the target handle. If the attribute value 
    8691is a pointer, then only the pointer is copied, not the contents of the pointer. 
    87 size (IN) - is the size of an attribute value. This can be passed in as 0 for  
     92size (IN) - is the size of an attribute value. This can be passed in as 0 for 
    8893most attributes as the size is already known by the OCI library. For text* 
    89 attributes, a ub4 must be passed in set to the length of the string.  
     94attributes, a ub4 must be passed in set to the length of the string. 
    9095attrtype (IN) - the type of attribute being set. 
    91 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    92 diagnostic information in the event of an error.  
     96errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     97diagnostic information in the event of an error. 
    9398Related Functions 
    9499OCIAttrGet() 
     
    108113sword OCIBindArrayOfStruct ( OCIBind     *bindp, 
    109114                           OCIError    *errhp, 
    110                            ub4         pvskip,  
    111                            ub4         indskip,  
    112                            ub4         alskip,  
     115                           ub4         pvskip, 
     116                           ub4         indskip, 
     117                           ub4         alskip, 
    113118                           ub4         rcskip ); 
    114119Comments 
    115120This call sets up the skip parameters necessary for a static array bind. 
    116 This call follows a call to OCIBindByName() or OCIBindByPos(). The bind  
    117 handle returned by that initial bind call is used as a parameter for the  
     121This call follows a call to OCIBindByName() or OCIBindByPos(). The bind 
     122handle returned by that initial bind call is used as a parameter for the 
    118123OCIBindArrayOfStruct() call. 
    119 For information about skip parameters, see the section "Arrays of Structures"  
     124For information about skip parameters, see the section "Arrays of Structures" 
    120125on page 4-16. 
    121126Parameters 
    122 bindp (IN) - the handle to a bind structure.  
    123 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     127bindp (IN) - the handle to a bind structure. 
     128errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    124129diagnostic information in the event of an error. 
    125 pvskip (IN) - skip parameter for the next data value.  
    126 indskip (IN) - skip parameter for the next indicator value or structure.  
    127 alskip (IN) - skip parameter for the next actual length value.  
    128 rcskip (IN) - skip parameter for the next column-level return code value.  
     130pvskip (IN) - skip parameter for the next data value. 
     131indskip (IN) - skip parameter for the next indicator value or structure. 
     132alskip (IN) - skip parameter for the next actual length value. 
     133rcskip (IN) - skip parameter for the next column-level return code value. 
    129134Related Functions 
    130135OCIAttrGet() 
     
    137142OCI Bind by Name 
    138143Purpose 
    139 Creates an association between a program variable and a placeholder in a SQL  
     144Creates an association between a program variable and a placeholder in a SQL 
    140145statement or PL/SQL block. 
    141146Syntax 
    142147sword OCIBindByName ( 
    143               OCIStmt       *stmtp,  
     148              OCIStmt       *stmtp, 
    144149              OCIBind       **bindp, 
    145150              OCIError      *errhp, 
     
    153158              ub2           *rcodep, 
    154159              ub4           maxarr_len, 
    155               ub4           *curelep,  
    156               ub4           mode );  
     160              ub4           *curelep, 
     161              ub4           mode ); 
    157162Description 
    158 This call is used to perform a basic bind operation. The bind creates an  
    159 association between the address of a program variable and a placeholder in a  
    160 SQL statement or PL/SQL block. The bind call also specifies the type of data  
    161 which is being bound, and may also indicate the method by which data will be  
     163This call is used to perform a basic bind operation. The bind creates an 
     164association between the address of a program variable and a placeholder in a 
     165SQL statement or PL/SQL block. The bind call also specifies the type of data 
     166which is being bound, and may also indicate the method by which data will be 
    162167provided at runtime. 
    163 This function also implicitly allocates the bind handle indicated by the bindp  
     168This function also implicitly allocates the bind handle indicated by the bindp 
    164169parameter. 
    165 Data in an OCI application can be bound to placeholders statically or  
    166 dynamically. Binding is static when all the IN bind data and the OUT bind  
    167 buffers are well-defined just before the execute. Binding is dynamic when the  
    168 IN bind data and the OUT bind buffers are provided by the application on  
    169 demand at execute time to the client library. Dynamic binding is indicated by  
     170Data in an OCI application can be bound to placeholders statically or 
     171dynamically. Binding is static when all the IN bind data and the OUT bind 
     172buffers are well-defined just before the execute. Binding is dynamic when the 
     173IN bind data and the OUT bind buffers are provided by the application on 
     174demand at execute time to the client library. Dynamic binding is indicated by 
    170175setting the mode parameter of this call to OCI_DATA_AT_EXEC. 
    171 Related Functions: For more information about dynamic binding, see  
    172 the section "Runtime Data Allocation and Piecewise Operations" on  
     176Related Functions: For more information about dynamic binding, see 
     177the section "Runtime Data Allocation and Piecewise Operations" on 
    173178page 5-16. 
    174 Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle,  
    175 which is implicitly allocated by the bind call A separate bind handle is  
     179Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
     180which is implicitly allocated by the bind call A separate bind handle is 
    176181allocated for each placeholder the application is binding. 
    177 Additional bind calls may be required to specify particular attributes  
    178 necessary when binding certain data types or handling input data in certain  
     182Additional bind calls may be required to specify particular attributes 
     183necessary when binding certain data types or handling input data in certain 
    179184ways: 
    180 If arrays of structures are being utilized, OCIBindArrayOfStruct() must  
     185If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
    181186be called to set up the necessary skip parameters. 
    182 If data is being provided dynamically at runtime, and the application  
    183 will be using user-defined callback functions, OCIBindDynamic() must  
     187If data is being provided dynamically at runtime, and the application 
     188will be using user-defined callback functions, OCIBindDynamic() must 
    184189be called to register the callbacks. 
    185 If a named data type is being bound, OCIBindObject() must be called to  
     190If a named data type is being bound, OCIBindObject() must be called to 
    186191specify additional necessary information. 
    187192Parameters 
    188 stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement  
     193stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
    189194being processed. 
    190 bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly  
    191 allocated by this call.  The bind handle  maintains all the bind information  
    192 for this particular input value. The handle is feed implicitly when the  
     195bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
     196allocated by this call.  The bind handle  maintains all the bind information 
     197for this particular input value. The handle is feed implicitly when the 
    193198statement handle is deallocated. 
    194 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    195 diagnostic information in the event of an error.  
    196 placeholder (IN) - the placeholder attributes are specified by name if  
     199errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     200diagnostic information in the event of an error. 
     201placeholder (IN) - the placeholder attributes are specified by name if 
    197202ocibindn() is being called. 
    198203placeh_len (IN) - the length of the placeholder name specified in placeholder. 
    199 valuep (IN/OUT) - a pointer to a data value or an array of data values of the  
    200 type specified in the dty parameter. An array of data values can be specified  
    201 for mapping into a PL/SQL table or for providing data for SQL multiple-row  
    202 operations. When an array of bind values is provided, this is called an array  
    203 bind in OCI terms. Additional attributes of the array bind (not bind to a  
    204 column of ARRAY type) are set up in OCIBindArrayOfStruct() call.  
    205 For a REF, named data type  bind, the valuep parameter is used only for IN  
    206 bind data. The pointers to OUT buffers are set in the pgvpp parameter  
    207 initialized by OCIBindObject(). For named data type and REF binds, the bind  
    208 values are unpickled into the Object Cache. The OCI object navigational calls  
     204valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
     205type specified in the dty parameter. An array of data values can be specified 
     206for mapping into a PL/SQL table or for providing data for SQL multiple-row 
     207operations. When an array of bind values is provided, this is called an array 
     208bind in OCI terms. Additional attributes of the array bind (not bind to a 
     209column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
     210For a REF, named data type  bind, the valuep parameter is used only for IN 
     211bind data. The pointers to OUT buffers are set in the pgvpp parameter 
     212initialized by OCIBindObject(). For named data type and REF binds, the bind 
     213values are unpickled into the Object Cache. The OCI object navigational calls 
    209214can then be used to navigate the objects and the refs in the Object Cache. 
    210 If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep  
    211 is ignored for all data types. OCIBindArrayOfStruct() cannot be used and  
    212 OCIBindDynamic() must be invoked to provide callback functions if desired.  
     215If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
     216is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
     217OCIBindDynamic() must be invoked to provide callback functions if desired. 
    213218value_sz (IN) - the size of a data value. In the case of an array bind, this is 
    214 the maximum size of any element possible with the actual sizes being specified  
    215 in the alenp parameter.  
    216 If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum  
     219the maximum size of any element possible with the actual sizes being specified 
     220in the alenp parameter. 
     221If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
    217222size of the data that can be ever provided at runtime for data types other than 
    218 named data types or REFs.  
    219 dty (IN) - the data type of the value(s) being bound. Named data types  
    220 (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been  
    221 initialized in object mode. For named data types, or REFs, additional calls  
     223named data types or REFs. 
     224dty (IN) - the data type of the value(s) being bound. Named data types 
     225(SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
     226initialized in object mode. For named data types, or REFs, additional calls 
    222227must be made with the bind handle to set up the datatype-specific attributes. 
    223 indp (IN/OUT) - pointer to an indicator variable or array. For scalar data  
    224 types, this is a pointer to sb2 or an array of sb2s. For named data types,  
    225 this pointer is ignored and the actual pointer to the indicator structure or  
    226 an array of indicator structures is initialized by OCIBindObject().  
     228indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
     229types, this is a pointer to sb2 or an array of sb2s. For named data types, 
     230this pointer is ignored and the actual pointer to the indicator structure or 
     231an array of indicator structures is initialized by OCIBindObject(). 
    227232Ignored for dynamic binds. 
    228 See the section "Indicator Variables" on page 2-43 for more information about  
     233See the section "Indicator Variables" on page 2-43 for more information about 
    229234indicator variables. 
    230 alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each  
    231 element in alenp is the length of the data in the corresponding element in the  
    232 bind value array before and after the execute. This parameter is ignored for  
     235alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
     236element in alenp is the length of the data in the corresponding element in the 
     237bind value array before and after the execute. This parameter is ignored for 
    233238dynamic binds. 
    234 rcodep (OUT) - pointer to array of column level return codes. This parameter  
     239rcodep (OUT) - pointer to array of column level return codes. This parameter 
    235240is ignored for dynamic binds. 
    236 maxarr_len (IN) - the maximum possible number of elements of type dty in a  
    237 PL/SQL binds. This parameter is not required for non-PL/SQL binds. If  
    238 maxarr_len is non-zero, then either OCIBindDynamic() or  
    239 OCIBindArrayOfStruct() can be invoked to set up additional bind attributes.  
    240 curelep(IN/OUT) - a pointer to the actual number of elements. This parameter  
     241maxarr_len (IN) - the maximum possible number of elements of type dty in a 
     242PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
     243maxarr_len is non-zero, then either OCIBindDynamic() or 
     244OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
     245curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
    241246is only required for PL/SQL binds. 
    242247mode (IN) - the valid modes for this parameter are: 
    243248OCI_DEFAULT. This is default mode. 
    244 OCI_DATA_AT_EXEC. When this mode is selected, the value_sz  
    245 parameter defines the maximum size of the data that can be ever  
    246 provided at runtime. The application must be ready to provide the OCI  
    247 library runtime IN data buffers at any time and any number of times.  
     249OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
     250parameter defines the maximum size of the data that can be ever 
     251provided at runtime. The application must be ready to provide the OCI 
     252library runtime IN data buffers at any time and any number of times. 
    248253Runtime data is provided in one of the two ways: 
    249 callbacks using a user-defined function which must be registered  
    250 with a subsequent call to OCIBindDynamic().  
    251 a polling mechanism using calls supplied by the OCI. This mode  
     254callbacks using a user-defined function which must be registered 
     255with a subsequent call to OCIBindDynamic(). 
     256a polling mechanism using calls supplied by the OCI. This mode 
    252257is assumed if no callbacks are defined. 
    253 For more information about using the OCI_DATA_AT_EXEC mode, see  
    254 the section "Runtime Data Allocation and Piecewise Operations" on  
     258For more information about using the OCI_DATA_AT_EXEC mode, see 
     259the section "Runtime Data Allocation and Piecewise Operations" on 
    255260page 5-16. 
    256 When the allocated buffers are not required any more, they should be  
    257 freed by the client.  
     261When the allocated buffers are not required any more, they should be 
     262freed by the client. 
    258263Related Functions 
    259264OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet() 
     
    268273OCI Bind by Position 
    269274Purpose 
    270 Creates an association between a program variable and a placeholder in a SQL  
     275Creates an association between a program variable and a placeholder in a SQL 
    271276statement or PL/SQL block. 
    272277Syntax 
    273 sword OCIBindByPos (  
    274               OCIStmt      *stmtp,  
     278sword OCIBindByPos ( 
     279              OCIStmt      *stmtp, 
    275280              OCIBind      **bindp, 
    276281              OCIError     *errhp, 
     
    283288              ub2          *rcodep, 
    284289              ub4          maxarr_len, 
    285               ub4          *curelep,  
     290              ub4          *curelep, 
    286291              ub4          mode); 
    287292 
    288293Description 
    289 This call is used to perform a basic bind operation. The bind creates an  
    290 association between the address of a program variable and a placeholder in a  
    291 SQL statement or PL/SQL block. The bind call also specifies the type of data  
    292 which is being bound, and may also indicate the method by which data will be  
     294This call is used to perform a basic bind operation. The bind creates an 
     295association between the address of a program variable and a placeholder in a 
     296SQL statement or PL/SQL block. The bind call also specifies the type of data 
     297which is being bound, and may also indicate the method by which data will be 
    293298provided at runtime. 
    294 This function also implicitly allocates the bind handle indicated by the bindp  
     299This function also implicitly allocates the bind handle indicated by the bindp 
    295300parameter. 
    296 Data in an OCI application can be bound to placeholders statically or  
    297 dynamically. Binding is static when all the IN bind data and the OUT bind  
    298 buffers are well-defined just before the execute. Binding is dynamic when the  
    299 IN bind data and the OUT bind buffers are provided by the application on  
    300 demand at execute time to the client library. Dynamic binding is indicated by  
     301Data in an OCI application can be bound to placeholders statically or 
     302dynamically. Binding is static when all the IN bind data and the OUT bind 
     303buffers are well-defined just before the execute. Binding is dynamic when the 
     304IN bind data and the OUT bind buffers are provided by the application on 
     305demand at execute time to the client library. Dynamic binding is indicated by 
    301306setting the mode parameter of this call to OCI_DATA_AT_EXEC. 
    302 Related Functions: For more information about dynamic binding, see  
    303 the section "Runtime Data Allocation and Piecewise Operations" on  
     307Related Functions: For more information about dynamic binding, see 
     308the section "Runtime Data Allocation and Piecewise Operations" on 
    304309page 5-16 
    305 Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle,  
    306 which is implicitly allocated by the bind call A separate bind handle is  
     310Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
     311which is implicitly allocated by the bind call A separate bind handle is 
    307312allocated for each placeholder the application is binding. 
    308 Additional bind calls may be required to specify particular attributes  
    309 necessary when binding certain data types or handling input data in certain  
     313Additional bind calls may be required to specify particular attributes 
     314necessary when binding certain data types or handling input data in certain 
    310315ways: 
    311 If arrays of structures are being utilized, OCIBindArrayOfStruct() must  
     316If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
    312317be called to set up the necessary skip parameters. 
    313 If data is being provided dynamically at runtime, and the application  
    314 will be using user-defined callback functions, OCIBindDynamic() must  
     318If data is being provided dynamically at runtime, and the application 
     319will be using user-defined callback functions, OCIBindDynamic() must 
    315320be called to register the callbacks. 
    316 If a named data type is being bound, OCIBindObject() must be called to  
     321If a named data type is being bound, OCIBindObject() must be called to 
    317322specify additional necessary information. 
    318323Parameters 
    319 stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement  
     324stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
    320325being processed. 
    321 bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly  
    322 allocated by this call.  The bind handle  maintains all the bind information  
    323 for this particular input value. The handle is feed implicitly when the  
     326bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
     327allocated by this call.  The bind handle  maintains all the bind information 
     328for this particular input value. The handle is feed implicitly when the 
    324329statement handle is deallocated. 
    325 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    326 diagnostic information in the event of an error.  
    327 position (IN) - the placeholder attributes are specified by position if  
     330errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     331diagnostic information in the event of an error. 
     332position (IN) - the placeholder attributes are specified by position if 
    328333ocibindp() is being called. 
    329 valuep (IN/OUT) - a pointer to a data value or an array of data values of the  
    330 type specified in the dty parameter. An array of data values can be specified  
    331 for mapping into a PL/SQL table or for providing data for SQL multiple-row  
    332 operations. When an array of bind values is provided, this is called an array  
    333 bind in OCI terms. Additional attributes of the array bind (not bind to a  
    334 column of ARRAY type) are set up in OCIBindArrayOfStruct() call.  
    335 For a REF, named data type  bind, the valuep parameter is used only for IN  
    336 bind data. The pointers to OUT buffers are set in the pgvpp parameter  
    337 initialized by OCIBindObject(). For named data type and REF binds, the bind  
    338 values are unpickled into the Object Cache. The OCI object navigational calls  
     334valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
     335type specified in the dty parameter. An array of data values can be specified 
     336for mapping into a PL/SQL table or for providing data for SQL multiple-row 
     337operations. When an array of bind values is provided, this is called an array 
     338bind in OCI terms. Additional attributes of the array bind (not bind to a 
     339column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
     340For a REF, named data type  bind, the valuep parameter is used only for IN 
     341bind data. The pointers to OUT buffers are set in the pgvpp parameter 
     342initialized by OCIBindObject(). For named data type and REF binds, the bind 
     343values are unpickled into the Object Cache. The OCI object navigational calls 
    339344can then be used to navigate the objects and the refs in the Object Cache. 
    340 If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep  
    341 is ignored for all data types. OCIBindArrayOfStruct() cannot be used and  
    342 OCIBindDynamic() must be invoked to provide callback functions if desired.  
     345If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
     346is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
     347OCIBindDynamic() must be invoked to provide callback functions if desired. 
    343348value_sz (IN) - the size of a data value. In the case of an array bind, this is 
    344349the maximum size of any element possible with the actual sizes being specified 
    345 in the alenp parameter.  
    346 If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum  
     350in the alenp parameter. 
     351If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
    347352size of the data that can be ever provided at runtime for data types other than 
    348 named data types or REFs.  
    349 dty (IN) - the data type of the value(s) being bound. Named data types  
    350 (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been  
    351 initialized in object mode. For named data types, or REFs, additional calls  
     353named data types or REFs. 
     354dty (IN) - the data type of the value(s) being bound. Named data types 
     355(SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
     356initialized in object mode. For named data types, or REFs, additional calls 
    352357must be made with the bind handle to set up the datatype-specific attributes. 
    353 indp (IN/OUT) - pointer to an indicator variable or array. For scalar data  
    354 types, this is a pointer to sb2 or an array of sb2s. For named data types,  
    355 this pointer is ignored and the actual pointer to the indicator structure or  
    356 an array of indicator structures is initialized by OCIBindObject(). Ignored  
     358indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
     359types, this is a pointer to sb2 or an array of sb2s. For named data types, 
     360this pointer is ignored and the actual pointer to the indicator structure or 
     361an array of indicator structures is initialized by OCIBindObject(). Ignored 
    357362for dynamic binds. 
    358 See the section "Indicator Variables" on page 2-43 for more information about  
     363See the section "Indicator Variables" on page 2-43 for more information about 
    359364indicator variables. 
    360 alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each  
    361 element in alenp is the length of the data in the corresponding element in the  
    362 bind value array before and after the execute. This parameter is ignored for  
     365alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
     366element in alenp is the length of the data in the corresponding element in the 
     367bind value array before and after the execute. This parameter is ignored for 
    363368dynamic binds. 
    364 rcodep (OUT) - pointer to array of column level return codes. This parameter  
     369rcodep (OUT) - pointer to array of column level return codes. This parameter 
    365370is ignored for dynamic binds. 
    366 maxarr_len (IN) - the maximum possible number of elements of type dty in a  
    367 PL/SQL binds. This parameter is not required for non-PL/SQL binds. If  
    368 maxarr_len is non-zero, then either OCIBindDynamic() or  
    369 OCIBindArrayOfStruct() can be invoked to set up additional bind attributes.  
    370 curelep(IN/OUT) - a pointer to the actual number of elements. This parameter  
     371maxarr_len (IN) - the maximum possible number of elements of type dty in a 
     372PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
     373maxarr_len is non-zero, then either OCIBindDynamic() or 
     374OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
     375curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
    371376is only required for PL/SQL binds. 
    372377mode (IN) - the valid modes for this parameter are: 
    373378OCI_DEFAULT. This is default mode. 
    374 OCI_DATA_AT_EXEC. When this mode is selected, the value_sz  
    375 parameter defines the maximum size of the data that can be ever  
    376 provided at runtime. The application must be ready to provide the OCI  
    377 library runtime IN data buffers at any time and any number of times.  
     379OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
     380parameter defines the maximum size of the data that can be ever 
     381provided at runtime. The application must be ready to provide the OCI 
     382library runtime IN data buffers at any time and any number of times. 
    378383Runtime data is provided in one of the two ways: 
    379 callbacks using a user-defined function which must be registered  
    380 with a subsequent call to OCIBindDynamic() .  
    381 a polling mechanism using calls supplied by the OCI. This mode  
     384callbacks using a user-defined function which must be registered 
     385with a subsequent call to OCIBindDynamic() . 
     386a polling mechanism using calls supplied by the OCI. This mode 
    382387is assumed if no callbacks are defined. 
    383 For more information about using the OCI_DATA_AT_EXEC mode, see  
    384 the section "Runtime Data Allocation and Piecewise Operations" on  
     388For more information about using the OCI_DATA_AT_EXEC mode, see 
     389the section "Runtime Data Allocation and Piecewise Operations" on 
    385390page 5-16. 
    386 When the allocated buffers are not required any more, they should be  
    387 freed by the client.  
     391When the allocated buffers are not required any more, they should be 
     392freed by the client. 
    388393Related Functions 
    389394OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet() 
     
    397402OCI Bind Dynamic Attributes 
    398403Purpose 
    399 This call is used to register user callbacks for dynamic data allocation.  
     404This call is used to register user callbacks for dynamic data allocation. 
    400405Syntax 
    401406sword OCIBindDynamic( OCIBind     *bindp, 
    402407                    OCIError    *errhp, 
    403                     dvoid       *ictxp,  
     408                    dvoid       *ictxp, 
    404409                    OCICallbackInBind         (icbfp)( 
    405410                                dvoid            *ictxp, 
    406411                                OCIBind          *bindp, 
    407                                 ub4              iter,  
    408                                 ub4              index,  
     412                                ub4              iter, 
     413                                ub4              index, 
    409414                                dvoid            **bufpp, 
    410415                                ub4              *alenp, 
    411                                 ub1              *piecep,  
     416                                ub1              *piecep, 
    412417                                dvoid            **indp ), 
    413418                    dvoid       *octxp, 
     
    415420                                dvoid            *octxp, 
    416421                                OCIBind          *bindp, 
    417                                 ub4              iter,  
    418                                 ub4              index,  
    419                                 dvoid            **bufp,  
     422                                ub4              iter, 
     423                                ub4              index, 
     424                                dvoid            **bufp, 
    420425                                ub4              **alenpp, 
    421426                                ub1              *piecep, 
    422                                 dvoid            **indpp,  
     427                                dvoid            **indpp, 
    423428                                ub2              **rcodepp)   ); 
    424429Comments 
    425 This call is used to register user-defined callback functions for providing  
    426 data for an UPDATE or INSERT if OCI_DATA_AT_EXEC mode was specified in a  
    427 previous call to OCIBindByName() or OCIBindByPos().  
    428 The callback function pointers must return OCI_CONTINUE if it the call is  
    429 successful. Any return code other than OCI_CONTINUE signals that the client  
     430This call is used to register user-defined callback functions for providing 
     431data for an UPDATE or INSERT if OCI_DATA_AT_EXEC mode was specified in a 
     432previous call to OCIBindByName() or OCIBindByPos(). 
     433The callback function pointers must return OCI_CONTINUE if it the call is 
     434successful. Any return code other than OCI_CONTINUE signals that the client 
    430435wishes to abort processing immediately. 
    431 For more information about the OCI_DATA_AT_EXEC mode, see the section  
     436For more information about the OCI_DATA_AT_EXEC mode, see the section 
    432437"Runtime Data Allocation and Piecewise Operations" on page 5-16. 
    433438Parameters 
    434 bindp (IN/OUT) - a bind handle returned by a call to OCIBindByName() or  
    435 OCIBindByPos().  
    436 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    437 diagnostic information in the event of an error.  
    438 ictxp (IN) - the context pointer required by the call back function icbfp.  
    439 icbfp (IN) - the callback function which returns a pointer to the IN bind  
    440 value or piece at run time. The callback takes in the following parameters.  
    441 ictxp (IN/OUT) - the context pointer for this callback function.  
    442 bindp (IN) - the bind handle passed in to uniquely identify this bind  
    443 variable.  
    444 iter (IN) - 1-based execute iteration value.  
    445 index (IN) - index of the current array, for an array bind. 1 based not  
    446 greater than curele parameter of the bind call.  
    447 index (IN) - index of the current array, for an array bind. This parameter  
    448 is 1-based, and may not be greater than curele parameter of the bind call.  
    449 bufpp (OUT) - the pointer to the buffer.  
    450 piecep (OUT) - which piece of the bind value. This can be one of the  
    451 following values - OCI_ONE_PIECE, OCI_FIRST_PIECE,  
     439bindp (IN/OUT) - a bind handle returned by a call to OCIBindByName() or 
     440OCIBindByPos(). 
     441errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     442diagnostic information in the event of an error. 
     443ictxp (IN) - the context pointer required by the call back function icbfp. 
     444icbfp (IN) - the callback function which returns a pointer to the IN bind 
     445value or piece at run time. The callback takes in the following parameters. 
     446ictxp (IN/OUT) - the context pointer for this callback function. 
     447bindp (IN) - the bind handle passed in to uniquely identify this bind 
     448variable. 
     449iter (IN) - 1-based execute iteration value. 
     450index (IN) - index of the current array, for an array bind. 1 based not 
     451greater than curele parameter of the bind call. 
     452index (IN) - index of the current array, for an array bind. This parameter 
     453is 1-based, and may not be greater than curele parameter of the bind call. 
     454bufpp (OUT) - the pointer to the buffer. 
     455piecep (OUT) - which piece of the bind value. This can be one of the 
     456following values - OCI_ONE_PIECE, OCI_FIRST_PIECE, 
    452457OCI_NEXT_PIECE and OCI_LAST_PIECE. 
    453 indp (OUT) - contains the indicator value. This is apointer to either an  
    454 sb2 value or a pointer to an indicator structure for binding named data  
    455 types.  
    456 indszp (OUT) - contains the indicator value size. A pointer containing  
    457 the size of either an sb2 or an indicator structure pointer.  
    458 octxp (IN) - the context pointer required by the callback function ocbfp.  
    459 ocbfp (IN) - the callback function which returns a pointer to the OUT bind  
    460 value or piece at run time. The callback takes in the following parameters.  
    461 octxp (IN/OUT) - the context pointer for this call back function.  
    462 bindp (IN) - the bind handle passed in to uniquely identify this bind  
    463 variable.  
    464 iter (IN) - 1-based execute iteration value.  
    465 index (IN) - index of the current array, for an array bind. This parameter  
    466 is 1-based, and must not be greater than curele parameter of the bind call.  
    467 bufpp (OUT) - a pointer to a buffer to write the bind value/piece.  
    468 buflp (OUT) - returns the buffer size.  
    469 alenpp (OUT) - a pointer to a storage for OCI to fill in the size of the bind  
    470 value/piece after it has been read.  
    471 piecep (IN/OUT) - which piece of the bind value. It will be set by the  
    472 library to be one of the following values - OCI_ONE_PIECE or  
    473 OCI_NEXT_PIECE. The callback function can leave it unchanged or set  
    474 it to OCI_FIRST_PIECE or OCI_LAST_PIECE. By default -  
    475 OCI_ONE_PIECE.  
    476 indpp (OUT) - returns a pointer to contain the indicator value which  
    477 either an sb2 value or a pointer to an indicator structure for named data  
    478 types.  
    479 indszpp (OUT) - returns a pointer to return the size of the indicator  
    480 value which is either size of an sb2 or size of an indicator structure.  
    481 rcodepp (OUT) - returns a pointer to contains the return code.  
     458indp (OUT) - contains the indicator value. This is apointer to either an 
     459sb2 value or a pointer to an indicator structure for binding named data 
     460types. 
     461indszp (OUT) - contains the indicator value size. A pointer containing 
     462the size of either an sb2 or an indicator structure pointer. 
     463octxp (IN) - the context pointer required by the callback function ocbfp. 
     464ocbfp (IN) - the callback function which returns a pointer to the OUT bind 
     465value or piece at run time. The callback takes in the following parameters. 
     466octxp (IN/OUT) - the context pointer for this call back function. 
     467bindp (IN) - the bind handle passed in to uniquely identify this bind 
     468variable. 
     469iter (IN) - 1-based execute iteration value. 
     470index (IN) - index of the current array, for an array bind. This parameter 
     471is 1-based, and must not be greater than curele parameter of the bind call. 
     472bufpp (OUT) - a pointer to a buffer to write the bind value/piece. 
     473buflp (OUT) - returns the buffer size. 
     474alenpp (OUT) - a pointer to a storage for OCI to fill in the size of the bind 
     475value/piece after it has been read. 
     476piecep (IN/OUT) - which piece of the bind value. It will be set by the 
     477library to be one of the following values - OCI_ONE_PIECE or 
     478OCI_NEXT_PIECE. The callback function can leave it unchanged or set 
     479it to OCI_FIRST_PIECE or OCI_LAST_PIECE. By default - 
     480OCI_ONE_PIECE. 
     481indpp (OUT) - returns a pointer to contain the indicator value which 
     482either an sb2 value or a pointer to an indicator structure for named data 
     483types. 
     484indszpp (OUT) - returns a pointer to return the size of the indicator 
     485value which is either size of an sb2 or size of an indicator structure. 
     486rcodepp (OUT) - returns a pointer to contains the return code. 
    482487Related Functions 
    483488OCIAttrGet() 
     
    491496OCI Bind Object 
    492497Purpose 
    493 This function sets up additional attributes which are required for a named  
     498This function sets up additional attributes which are required for a named 
    494499data type (object)  bind. 
    495500Syntax 
    496501sword OCIBindObject ( OCIBind          *bindp, 
    497                     OCIError         *errhp,  
     502                    OCIError         *errhp, 
    498503                    CONST OCIType    *type, 
    499                     dvoid            **pgvpp,  
    500                     ub4              *pvszsp,  
    501                     dvoid            **indpp,  
     504                    dvoid            **pgvpp, 
     505                    ub4              *pvszsp, 
     506                    dvoid            **indpp, 
    502507                    ub4              *indszp, ); 
    503508Comments 
    504 This function sets up additional attributes which binding a named data type  
    505 or a REF. An error will be returned if this function is called when the OCI  
    506 environment has been initialized in non-object mode.  
    507 This call takes as a paramter a type descriptor object (TDO) of datatype  
    508 OCIType for the named data type being defined.  The TDO can be retrieved  
     509This function sets up additional attributes which binding a named data type 
     510or a REF. An error will be returned if this function is called when the OCI 
     511environment has been initialized in non-object mode. 
     512This call takes as a paramter a type descriptor object (TDO) of datatype 
     513OCIType for the named data type being defined.  The TDO can be retrieved 
    509514with a call to OCITypeByName(). 
    510 If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the  
    511 pointers to the IN buffers are obtained either using the callback icbfp  
    512 registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call.  
    513 The buffers are dynamically allocated for the OUT data and the pointers to  
    514 these buffers are returned either by calling ocbfp() registered by the  
    515 OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed  
    516 in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned  
    517 OCI_NEED_DATA. The memory of these client library- allocated buffers must be  
     515If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the 
     516pointers to the IN buffers are obtained either using the callback icbfp 
     517registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call. 
     518The buffers are dynamically allocated for the OUT data and the pointers to 
     519these buffers are returned either by calling ocbfp() registered by the 
     520OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed 
     521in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned 
     522OCI_NEED_DATA. The memory of these client library- allocated buffers must be 
    518523freed when not in use anymore by using the OCIObjectFreee() call. 
    519524Parameters 
    520 bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName()  
    521 or OCIBindByPos().  
    522 errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     525bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName() 
     526or OCIBindByPos(). 
     527errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    523528diagnostic information in the event of an error. 
    524 type ( IN) - points to the TDO which describes the type of the program  
     529type ( IN) - points to the TDO which describes the type of the program 
    525530variable being bound. Retrieved by calling OCITypeByName(). 
    526 pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an  
    527 array, pgvpp points to an array of pointers. When the bind variable is also an  
    528 OUT variable, the OUT Named Data Type value or REF is allocated  
     531pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an 
     532array, pgvpp points to an array of pointers. When the bind variable is also an 
     533OUT variable, the OUT Named Data Type value or REF is allocated 
    529534(unpickled) in the Object Cache, and a pointer to the value or REF is returned, 
    530 At the end of execute, when all OUT values have been received, pgvpp points  
    531 to an array of pointer(s) to these newly allocated named data types in the  
    532 object cache.  
    533 pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named  
    534 Data Type buffers are requested at runtime. For static array binds, skip  
    535 factors may be specified using the OCIBindArrayOfStruct() call. The skip  
    536 factors are used to compute the address of the next pointer to the value, the  
     535At the end of execute, when all OUT values have been received, pgvpp points 
     536to an array of pointer(s) to these newly allocated named data types in the 
     537object cache. 
     538pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named 
     539Data Type buffers are requested at runtime. For static array binds, skip 
     540factors may be specified using the OCIBindArrayOfStruct() call. The skip 
     541factors are used to compute the address of the next pointer to the value, the 
    537542indicator structure and their sizes. 
    538 pvszsp ( IN/OUT) - points to the size of the program variable. The size of the  
    539 named data type is not required on input. For an array, pvszsp is an array of  
    540 ub4s. On return, for OUT bind variables, this points to size(s) of the Named  
    541 Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC  
     543pvszsp ( IN/OUT) - points to the size of the program variable. The size of the 
     544named data type is not required on input. For an array, pvszsp is an array of 
     545ub4s. On return, for OUT bind variables, this points to size(s) of the Named 
     546Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC 
    542547mode is set. Then the size of the buffer is taken at runtime. 
    543 indpp ( IN/OUT) - points to a pointer to the program variable buffer  
    544 containing the parallel indicator structure. For an array, points to an array  
    545 of pointers. When the bind variable is also an OUT bind variable, memory is  
    546 allocated in the object cache, to store the unpickled OUT indicator values. At  
    547 the end of the execute when all OUT values have been received, indpp points  
    548 to the pointer(s) to these newly allocated indicator structure(s).  
    549 indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator  
     548indpp ( IN/OUT) - points to a pointer to the program variable buffer 
     549containing the parallel indicator structure. For an array, points to an array 
     550of pointers. When the bind variable is also an OUT bind variable, memory is 
     551allocated in the object cache, to store the unpickled OUT indicator values. At 
     552the end of the execute when all OUT values have been received, indpp points 
     553to the pointer(s) to these newly allocated indicator structure(s). 
     554indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
    550555is requested at runtime. 
    551 indszp ( IN/OUT) - points to the size of the IN indicator structure program  
    552 variable. For an array, it is an array of sb2s. On return for OUT bind  
     556indszp ( IN/OUT) - points to the size of the IN indicator structure program 
     557variable. For an array, it is an array of sb2s. On return for OUT bind 
    553558variables, this points to size(s) of the received OUT indicator structures. 
    554 indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator  
     559indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
    555560size is requested at runtime. 
    556561Related Functions 
     
    566571OCI Break 
    567572Purpose 
    568 This call performs an immediate (asynchronous) abort of any currently  
     573This call performs an immediate (asynchronous) abort of any currently 
    569574executing OCI function that is associated with a server . 
    570575Syntax 
     
    572577                 OCIError   *errhp); 
    573578Comments 
    574 This call performs an immediate (asynchronous) abort of any currently  
    575 executing OCI function that is associated with a server. It is normally used  
     579This call performs an immediate (asynchronous) abort of any currently 
     580executing OCI function that is associated with a server. It is normally used 
    576581to stop a long-running OCI call being processed on the server. 
    577 This call can take either the service context handle or the server context  
     582This call can take either the service context handle or the server context 
    578583handle as a parameter to identify the function to be aborted. 
    579584Parameters 
    580585hndlp (IN) - the service context handle or the server context handle. 
    581 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     586errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    582587diagnostic information in the event of an error. 
    583588Related Functions 
     
    592597Syntax: 
    593598OCIConnectionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp, 
    594                          OraText **poolName, sb4 *poolNameLen,  
     599                         OraText **poolName, sb4 *poolNameLen, 
    595600                         CONST Oratext *dblink, sb4 dblinkLen, 
    596601                         ub4 connMin, ub4 connMax, ub4 connIncr, 
    597602                         CONST OraText *poolUsername, sb4 poolUserLen, 
    598                          CONST OraText *poolPassword, sb4 poolPassLen,  
     603                         CONST OraText *poolPassword, sb4 poolPassLen, 
    599604                         ub4 mode) 
    600605Comments: 
     
    607612errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet(). 
    608613poolhp (IN/OUT) - An uninitialiazed pool handle. 
    609 poolName (OUT) - The connection pool name.  
    610 poolNameLen (OUT) - The length of the connection pool name  
     614poolName (OUT) - The connection pool name. 
     615poolNameLen (OUT) - The length of the connection pool name 
    611616dblink (IN/OUT) - Specifies the database(server) to connect. This will also 
    612617                  be used as the default pool name. 
     
    630635poolPassLen (IN) - This represents the length of pool_password. 
    631636 
    632 mode (IN) - The modes supported are OCI_DEFAULT and  
    633 OCI_CPOOL_REINITIALIZE  
     637mode (IN) - The modes supported are OCI_DEFAULT and 
     638OCI_CPOOL_REINITIALIZE 
    634639 
    635640Related Functions 
     
    663668----------------------------------------------------------------------------- 
    664669----------------------------OCISessionPoolCreate----------------------------- 
    665 Name:  
     670Name: 
    666671OCISessionPoolCreate 
    667672 
     
    670675 
    671676Syntax: 
    672 sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISpool *spoolhp,  
    673                       OraText **poolName, ub4 *poolNameLen,  
     677sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISpool *spoolhp, 
     678                      OraText **poolName, ub4 *poolNameLen, 
    674679                      CONST OraText *connStr, ub4 connStrLen, 
    675680                      ub4 sessMin, ub4 sessMax, ub4 sessIncr, 
     
    805810           specified. In this case, the session is labelled with this tag and 
    806811           returned to the pool. If this is NULL, then the session is untagged. 
    807 tag_len (IN) - Length of the tag. This is ignored unless mode  
     812tag_len (IN) - Length of the tag. This is ignored unless mode 
    808813               OCI_RLS_SPOOL_RETAG is set. 
    809814mode (IN) - The supported modes are OCI_DEFAULT, OCI_RLS_SPOOL_DROPSESS, 
    810815            OCI_RLS_SPOOL_RETAG. The last 2 are only valid for Session Pooling. 
    811816            When OCI_RLS_SPOOL_DROPSESS is specified, the session 
    812             will be removed from the session pool. If OCI_RLS_SPOOL_RETAG  
    813             is set, the tag on the session will be altered. If this mode is  
     817            will be removed from the session pool. If OCI_RLS_SPOOL_RETAG 
     818            is set, the tag on the session will be altered. If this mode is 
    814819            not set, the tag and tag_len parameters will be ignored. 
    815820 
     
    822827----------------------------------------------------------------------------- 
    823828------------------------------OCIDateTimeAssign -------------------------- 
    824 sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from,  
     829sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 
    825830                        OCIDateTime *to); 
    826831NAME: OCIDateTimeAssign - OCIDateTime Assignment 
     
    838843 
    839844------------------------------OCIDateTimeCheck---------------------------- 
    840 sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date,  
     845sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
    841846                 ub4 *valid ); 
    842847NAME: OCIDateTimeCheck - OCIDateTime CHecK if the given date is valid 
    843848PARAMETERS: 
    844 hndl (IN) - Session/Env handle.  
     849hndl (IN) - Session/Env handle. 
    845850err (IN/OUT) - error handle. If there is an error, it is 
    846851                recorded in 'err' and this function returns OCI_ERROR. 
     
    848853                OCIErrorGet(). 
    849854date (IN) - date to be checked 
    850 valid (OUT) -  returns zero for a valid date, otherwise  
     855valid (OUT) -  returns zero for a valid date, otherwise 
    851856                the ORed combination of all error bits specified below: 
    852857   Macro name                   Bit number      Error 
     
    884889 
    885890------------------------------- OCIDateTimeCompare---------------------------- 
    886 sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1,  
     891sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1, 
    887892                     CONST OCIDateTime *date2,  sword *result ); 
    888893NAME: OCIDateTimeCompare - OCIDateTime CoMPare dates 
    889894PARAMETERS: 
    890 hndl (IN) - Session/Env handle.  
     895hndl (IN) - Session/Env handle. 
    891896err (IN/OUT) - error handle. If there is an error, it is 
    892897                recorded in 'err' and this function returns OCI_ERROR. 
     
    894899                OCIErrorGet(). 
    895900date1, date2 (IN) - dates to be compared 
    896 result (OUT) - comparison result, 0 if equal, -1 if date1 < date2,  
     901result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
    897902                1 if date1 > date2 
    898903DESCRIPTION: 
    899 The function OCIDateCompare compares two dates. It returns -1 if  
    900 date1 is smaller than date2, 0 if they are equal, and 1 if date1 is  
     904The function OCIDateCompare compares two dates. It returns -1 if 
     905date1 is smaller than date2, 0 if they are equal, and 1 if date1 is 
    901906greater than date2. 
    902907RETURNS: 
     
    908913 
    909914------------------------------OCIDateTimeConvert---------------------- 
    910 sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate,  
     915sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate, 
    911916                                OCIDateTime *outdate); 
    912917NAME: OCIDateTimeConvert - Conversion between different DATETIME types 
    913918PARAMETERS: 
    914 hndl (IN) - Session/Env handle.  
     919hndl (IN) - Session/Env handle. 
    915920err (IN/OUT) - error handle. If there is an error, it is 
    916921                recorded in 'err' and this function returns OCI_ERROR. 
     
    918923                OCIErrorGet(). 
    919924indate (IN) - pointer to input date 
    920 outdate (OUT) - pointer to output datetime  
     925outdate (OUT) - pointer to output datetime 
    921926DESCRIPTION: Converts one datetime type to another. The result type is 
    922927       the type of the 'outdate' descriptor. 
     
    926931        OCI_ERROR if 
    927932            conversion not possible. 
    928     
     933 
    929934---------------------------- OCIDateTimeFromText----------------------- 
    930 sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str,  
     935sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str, 
    931936             size_t d_str_length, CONST OraText *fmt, ub1 fmt_length, 
    932937             CONST OraText *lang_name, size_t lang_length, OCIDateTime *date ); 
    933938NAME: OCIDateTimeFromText - OCIDateTime convert String FROM Date 
    934939PARAMETERS: 
    935 hndl (IN) - Session/Env handle. If Session Handle is passed, the  
     940hndl (IN) - Session/Env handle. If Session Handle is passed, the 
    936941                    conversion takes place in session NLS_LANGUAGE and 
    937942                    session NLS_CALENDAR, otherwise the default is used. 
     
    949954lang_name (IN) - language in which the names and abbreviations of 
    950955                days and months are specified, if null i.e. (OraText *)0, 
    951                 the default language of session is used,  
     956                the default language of session is used, 
    952957lang_length (IN) - length of the 'lang_name' parameter 
    953958date (OUT) - given string converted to date 
    954959DESCRIPTION: 
    955         Converts the given string to Oracle datetime type set in the  
    956         OCIDateTime descriptor according to the specified format. Refer to  
    957         "TO_DATE" conversion function described in "Oracle SQL Language  
     960        Converts the given string to Oracle datetime type set in the 
     961        OCIDateTime descriptor according to the specified format. Refer to 
     962        "TO_DATE" conversion function described in "Oracle SQL Language 
    958963        Reference Manual" for a description of format. 
    959964RETURNS: 
     
    966971 
    967972--------------------------- OCIDateTimeGetDate------------------------- 
    968 sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date,  
     973sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 
    969974                           sb2 *year, ub1 *month, ub1 *day ); 
    970 NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day)   
    971                                 portion of DATETIME.  
     975NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day) 
     976                                portion of DATETIME. 
    972977PARAMETERS: 
    973 hndl (IN) - Session/Env handle.  
     978hndl (IN) - Session/Env handle. 
    974979err (IN/OUT) - error handle. If there is an error, it is 
    975980                recorded in 'err' and this function returns OCI_ERROR. 
    976981                The error recorded in 'err' can be retrieved by calling 
    977982                OCIErrorGet(). 
    978 datetime (IN) - Pointer to OCIDateTime  
     983datetime (IN) - Pointer to OCIDateTime 
    979984year      (OUT) - year value 
    980985month     (OUT) - month value 
     
    984989sword OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime, 
    985990                 ub1 *hour, ub1 *minute, ub1 *sec, ub4 *fsec); 
    986 NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second,  
    987                         fractional second)  of DATETIME.  
     991NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, 
     992                        fractional second)  of DATETIME. 
    988993PARAMETERS: 
    989 hndl (IN) - Session/Env handle.  
     994hndl (IN) - Session/Env handle. 
    990995err (IN/OUT) - error handle. If there is an error, it is 
    991996                recorded in 'err' and this function returns OCI_ERROR. 
    992997                The error recorded in 'err' can be retrieved by calling 
    993998                OCIErrorGet(). 
    994 datetime (IN) - Pointer to OCIDateTime  
     999datetime (IN) - Pointer to OCIDateTime 
    9951000hour      (OUT) - hour value 
    9961001minute       (OUT) - minute value 
     
    9991004 
    10001005--------------------------- OCIDateTimeGetTimeZoneOffset ---------------------- 
    1001 sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST  
     1006sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST 
    10021007              OCIDateTime *datetime,sb1 *hour,sb1  *minute); 
    10031008 
    1004 NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute)   
    1005                          portion of DATETIME.  
     1009NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute) 
     1010                         portion of DATETIME. 
    10061011PARAMETERS: 
    1007 hndl (IN) - Session/Env handle.  
     1012hndl (IN) - Session/Env handle. 
    10081013err (IN/OUT) - error handle. If there is an error, it is 
    10091014                recorded in 'err' and this function returns OCI_ERROR. 
    10101015                The error recorded in 'err' can be retrieved by calling 
    10111016                OCIErrorGet(). 
    1012 datetime (IN) - Pointer to OCIDateTime  
     1017datetime (IN) - Pointer to OCIDateTime 
    10131018hour      (OUT) - TimeZone Hour value 
    10141019minute     (OUT) - TimeZone Minute value 
    10151020 
    10161021--------------------------- OCIDateTimeSysTimeStamp--------------------- 
    1017 sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err,  
     1022sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err, 
    10181023              OCIDateTime *sys_date ); 
    1019   
    1020 NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with  
     1024 
     1025NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with 
    10211026                      timezone 
    10221027PARAMETERS: 
    1023 hndl (IN) - Session/Env handle.  
     1028hndl (IN) - Session/Env handle. 
    10241029err (IN/OUT) - error handle. If there is an error, it is 
    10251030                recorded in 'err' and this function returns OCI_ERROR. 
     
    10271032                OCIErrorGet(). 
    10281033sys_date (OUT) - Pointer to output timestamp 
    1029   
    1030 DESCRIPTION:  
     1034 
     1035DESCRIPTION: 
    10311036        Gets the system current date and time as a timestamp with timezone 
    10321037RETURNS: 
     
    10461051                OCIErrorGet(). 
    10471052datetime (IN) - pointer to input datetime 
    1048 inter    (IN) - pointer to interval  
    1049 outdatetime (IN) - pointer to output datetime. The output datetime  
     1053inter    (IN) - pointer to interval 
     1054outdatetime (IN) - pointer to output datetime. The output datetime 
    10501055                                will be of same type as input datetime 
    1051 DESCRIPTION:  
     1056DESCRIPTION: 
    10521057        Adds an interval to a datetime to produce a resulting datetime 
    10531058RETURNS: 
     
    10631068NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetime 
    10641069PARAMETERS: 
    1065 hndl (IN) - Session/Env handle.  
     1070hndl (IN) - Session/Env handle. 
    10661071err (IN/OUT) - error handle. If there is an error, it is 
    10671072                recorded in 'err' and this function returns OCI_ERROR. 
     
    10691074                OCIErrorGet(). 
    10701075datetime (IN) - pointer to input datetime 
    1071 inter    (IN) - pointer to interval  
    1072 outdatetime (IN) - pointer to output datetime. The output datetime  
     1076inter    (IN) - pointer to interval 
     1077outdatetime (IN) - pointer to output datetime. The output datetime 
    10731078                                will be of same type as input datetime 
    1074 DESCRIPTION:  
     1079DESCRIPTION: 
    10751080        Subtracts an interval from a datetime and stores the result in a 
    10761081        datetime 
     
    10901095       fields for the OCIDateTime descriptor types are used. 
    10911096PARAMETERS: 
    1092         hndl (IN) - Session/Env handle.  
     1097        hndl (IN) - Session/Env handle. 
    10931098        err (IN/OUT) - error handle. If there is an error, it is 
    10941099                recorded in 'err' and this function returns OCI_ERROR. 
    10951100                The error recorded in 'err' can be retrieved by calling 
    10961101                OCIErrorGet(). 
    1097         datetime (IN) - Pointer to OCIDateTime  
     1102        datetime (IN) - Pointer to OCIDateTime 
    10981103        year      (IN) - year value 
    10991104        month     (IN) - month value 
    1100         day       (IN) - day value         
     1105        day       (IN) - day value 
    11011106        hour      (IN) - hour value 
    11021107        min       (IN) - minute value 
     
    11181123 
    11191124------------------------------OCIDateTimeSubtract----------------------- 
    1120 sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1,  
     1125sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 
    11211126                OCIDateTime *indate2, OCIInterval *inter); 
    11221127NAME: OCIDateTimeSubtract - subtracts two datetimes to return an interval 
    11231128PARAMETERS: 
    1124 hndl (IN) - Session/Env handle.  
     1129hndl (IN) - Session/Env handle. 
    11251130err (IN/OUT) - error handle. If there is an error, it is 
    11261131                recorded in 'err' and this function returns OCI_ERROR. 
     
    11301135indate2(IN) - pointer to minuend 
    11311136inter  (OUT) - pointer to output interval 
    1132 DESCRIPTION:  
    1133         Takes two datetimes as input and stores their difference in an  
     1137DESCRIPTION: 
     1138        Takes two datetimes as input and stores their difference in an 
    11341139        interval. The type of the interval is the type of the 'inter' 
    11351140        descriptor. 
     
    11411146 
    11421147--------------------------- OCIDateTimeToText-------------------------- 
    1143 sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date,  
    1144                         CONST OraText *fmt, ub1 fmt_length, ub1 fsprec,  
    1145                         CONST OraText *lang_name, size_t lang_length,  
     1148sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
     1149                        CONST OraText *fmt, ub1 fmt_length, ub1 fsprec, 
     1150                        CONST OraText *lang_name, size_t lang_length, 
    11461151                        ub4 *buf_size, OraText *buf ); 
    1147 NAME: OCIDateTimeToText - OCIDateTime convert date TO String  
     1152NAME: OCIDateTimeToText - OCIDateTime convert date TO String 
    11481153PARAMETERS: 
    1149 hndl (IN) - Session/Env handle. If Session Handle is passed, the  
     1154hndl (IN) - Session/Env handle. If Session Handle is passed, the 
    11501155                    conversion takes place in session NLS_LANGUAGE and 
    11511156                    session NLS_CALENDAR, otherwise the default is used. 
     
    11611166fsprec (IN) - specifies the fractional second precision in which the 
    11621167               fractional seconds is returned. 
    1163 lang_name (IN) - specifies the language in which the names and  
     1168lang_name (IN) - specifies the language in which the names and 
    11641169                abbreviations of months and days are returned; 
    1165                 default language of session is used if 'lang_name'  
     1170                default language of session is used if 'lang_name' 
    11661171                is null i.e. (OraText *)0 
    11671172lang_length (IN) - length of the 'nls_params' parameter 
     
    11851190 
    11861191----------------------------OCIDateTimeGetTimeZoneName------------------------ 
    1187 sword OCIDateTimeGetTimeZoneName(dvoid *hndl,  
     1192sword OCIDateTimeGetTimeZoneName(dvoid *hndl, 
    11881193                                 OCIError *err, 
    11891194                                 CONST OCIDateTime *datetime, 
     
    12021207DESCRIPTION: 
    12031208        Returns either the timezone region name or the absolute hour and minute 
    1204         offset. If the DateTime was created with a region id then the region  
    1205         name will be returned in the buf.  If the region id is zero, then the  
     1209        offset. If the DateTime was created with a region id then the region 
     1210        name will be returned in the buf.  If the region id is zero, then the 
    12061211        hour and minute offset is returned as "[-]HH:MM". 
    12071212RETURNS: 
     
    12111216         buffer too small 
    12121217         error retrieving timezone data 
    1213          invalid region  
     1218         invalid region 
    12141219         invalid LdiDateTime type 
    12151220 
    12161221---------------------------------OCIDateTimeToArray---------------------------- 
    1217 sword OCIDateTimeToArray(dvoid *hndl,  
     1222sword OCIDateTimeToArray(dvoid *hndl, 
    12181223                         OCIError *err, 
    12191224                         CONST OCIDateTime *datetime, 
     
    12411246         buffer too small 
    12421247         error retrieving timezone data 
    1243          invalid region  
     1248         invalid region 
    12441249         invalid LdiDateTime type 
    12451250 
    12461251--------------------------------OCIDateTimeFromArray--------------------------- 
    1247 sword OCIDateTimeFromArray(dvoid *hndl,  
     1252sword OCIDateTimeFromArray(dvoid *hndl, 
    12481253                         OCIError *err, 
    12491254                         ub1 *inarray, 
     
    12681273fsprec (IN)    - fractionl seconds digits of precision (0-9). 
    12691274DESCRIPTION: 
    1270         Returns a pointer to an OCIDateTime of type type converted from  
     1275        Returns a pointer to an OCIDateTime of type type converted from 
    12711276        the inarray. 
    12721277RETURNS: 
     
    12761281         buffer too small 
    12771282         error retrieving timezone data 
    1278          invalid region  
     1283         invalid region 
    12791284         invalid LdiDateTime type 
    12801285 
     
    12841289 
    12851290Purpose 
    1286 Converts physical/logical (universal) ROWID to chracter extended (Base 64)  
    1287 representation into user provided buffer outbfp of length outbflp. After  
    1288 execution outbflp contains amount of bytes converted.In case of truncation  
     1291Converts physical/logical (universal) ROWID to chracter extended (Base 64) 
     1292representation into user provided buffer outbfp of length outbflp. After 
     1293execution outbflp contains amount of bytes converted.In case of truncation 
    12891294error, outbflp contains required size to make this conversion successful 
    12901295and returns ORA-1405. 
    12911296 
    12921297Syntax 
    1293 sword OCIRowidToChar( OCIRowid *rowidDesc,  
    1294                       OraText *outbfp,  
    1295                       ub2 *outbflp,  
     1298sword OCIRowidToChar( OCIRowid *rowidDesc, 
     1299                      OraText *outbfp, 
     1300                      ub2 *outbflp, 
    12961301                      OCIError *errhp) 
    12971302 
     
    12991304After this conversion, ROWID in character format can be bound using 
    13001305OCIBindByPos or OCIBindByName call and used to query a row at a 
    1301 desired ROWID.  
     1306desired ROWID. 
    13021307 
    13031308Parameters 
    13041309rowidDesc (IN)   - rowid DESCriptor which is allocated from OCIDescritorAlloc 
    13051310                   and populated by a prior SQL statement execution 
    1306 outbfp (OUT)     - pointer to the buffer where converted rowid in character  
     1311outbfp (OUT)     - pointer to the buffer where converted rowid in character 
    13071312                   representation is stored after successful execution. 
    13081313outbflp (IN/OUT) - pointer to output buffer length variable. 
    13091314                   Before execution (IN mode) *outbflp contains the size of 
    13101315                   outbfp, after execution (OUT mode) *outbflp contains amount 
    1311                    of bytes converted. In an event of truncation during  
     1316                   of bytes converted. In an event of truncation during 
    13121317                   conversion *outbflp contains the required length to make 
    13131318                   conversion successful. 
     
    13261331sword OCIDefineArrayOfStruct ( OCIDefine   *defnp, 
    13271332                             OCIError    *errhp, 
    1328                              ub4         pvskip,  
    1329                              ub4         indskip,  
     1333                             ub4         pvskip, 
     1334                             ub4         indskip, 
    13301335                             ub4         rlskip, 
    13311336                             ub4         rcskip ); 
    13321337Comments 
    1333 This call specifies additional attributes necessary for an array define,  
     1338This call specifies additional attributes necessary for an array define, 
    13341339used in an array of structures (multi-row, multi-column) fetch. 
    1335 For more information about skip parameters, see the section "Skip Parameters"  
     1340For more information about skip parameters, see the section "Skip Parameters" 
    13361341on page 4-17. 
    13371342Parameters 
    1338 defnp (IN) - the handle to the define structure which was returned by a call  
     1343defnp (IN) - the handle to the define structure which was returned by a call 
    13391344to OCIDefineByPos(). 
    1340 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     1345errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    13411346diagnostic information in the event of an error. 
    13421347pvskip (IN) - skip parameter for the next data value. 
    1343 indskip (IN) - skip parameter for the next indicator location.  
     1348indskip (IN) - skip parameter for the next indicator location. 
    13441349rlskip (IN) - skip parameter for the next return length value. 
    13451350rcskip (IN) - skip parameter for the next return code. 
     
    13551360OCI Define By Position 
    13561361Purpose 
    1357 Associates an item in a select-list with the type and output data buffer.  
    1358 Syntax 
    1359 sb4 OCIDefineByPos (  
    1360               OCIStmt     *stmtp,  
     1362Associates an item in a select-list with the type and output data buffer. 
     1363Syntax 
     1364sb4 OCIDefineByPos ( 
     1365              OCIStmt     *stmtp, 
    13611366              OCIDefine   **defnp, 
    13621367              OCIError    *errhp, 
     
    13701375              ub4         mode ); 
    13711376Comments 
    1372 This call defines an output buffer which will receive data retreived from  
    1373 Oracle. The define is a local step which is necessary when a SELECT statement  
     1377This call defines an output buffer which will receive data retreived from 
     1378Oracle. The define is a local step which is necessary when a SELECT statement 
    13741379returns data to your OCI application. 
    13751380This call also implicitly allocates the define handle for the select-list item. 
    1376 Defining attributes of a column for a fetch is done in one or more calls. The  
    1377 first call is to OCIDefineByPos(), which defines the minimal attributes  
    1378 required to specify the fetch.  
    1379 This call takes as a parameter a define handle, which must have been  
     1381Defining attributes of a column for a fetch is done in one or more calls. The 
     1382first call is to OCIDefineByPos(), which defines the minimal attributes 
     1383required to specify the fetch. 
     1384This call takes as a parameter a define handle, which must have been 
    13801385previously allocated with a call to OCIHandleAlloc(). 
    1381 Following the call to OCIDefineByPos() additional define calls may be  
     1386Following the call to OCIDefineByPos() additional define calls may be 
    13821387necessary for certain data types or fetch modes: 
    1383 A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters  
     1388A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters 
    13841389for an array fetch of multiple columns. 
    1385 A call to OCIDefineObject() is necessary to set up the appropriate  
    1386 attributes of a named data type fetch. In this case the data buffer pointer  
     1390A call to OCIDefineObject() is necessary to set up the appropriate 
     1391attributes of a named data type fetch. In this case the data buffer pointer 
    13871392in ocidefn() is ignored. 
    1388 Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called  
    1389 after ocidefn() in order to fetch multiple rows with a column of named  
     1393Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called 
     1394after ocidefn() in order to fetch multiple rows with a column of named 
    13901395data types. 
    1391 For a LOB define, the buffer pointer must be a lob locator of type  
    1392 OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not  
    1393 LOB values, are always returned for a LOB column. LOB values can then be  
     1396For a LOB define, the buffer pointer must be a lob locator of type 
     1397OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not 
     1398LOB values, are always returned for a LOB column. LOB values can then be 
    13941399fetched using OCI LOB calls on the fetched locator. 
    1395 For NCHAR (fixed and varying length), the buffer pointer must point to an  
    1396 array of bytes sufficient for holding the required NCHAR characters.  
    1397 Nested table columns are defined and fetched like any other named data type.  
    1398 If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client  
     1400For NCHAR (fixed and varying length), the buffer pointer must point to an 
     1401array of bytes sufficient for holding the required NCHAR characters. 
     1402Nested table columns are defined and fetched like any other named data type. 
     1403If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client 
    13991404application can fetch data dynamically at runtime. 
    14001405Runtime data can be provided in one of two ways: 
    1401 callbacks using a user-defined function which must be registered with a  
    1402 subsequent call to OCIDefineDynamic(). When the client library needs a  
    1403 buffer to return the fetched data, the callback will be invoked and the  
    1404 runtime buffers provided will return a piece or the whole data.  
    1405 a polling mechanism using calls supplied by the OCI. This mode is  
    1406 assumed if no callbacks are defined. In this case, the fetch call returns the  
    1407 OCI_NEED_DATA error code, and a piecewise polling method is used  
     1406callbacks using a user-defined function which must be registered with a 
     1407subsequent call to OCIDefineDynamic(). When the client library needs a 
     1408buffer to return the fetched data, the callback will be invoked and the 
     1409runtime buffers provided will return a piece or the whole data. 
     1410a polling mechanism using calls supplied by the OCI. This mode is 
     1411assumed if no callbacks are defined. In this case, the fetch call returns the 
     1412OCI_NEED_DATA error code, and a piecewise polling method is used 
    14081413to provide the data. 
    1409 Related Functions: For more information about using the  
    1410 OCI_DYNAMIC_FETCH mode, see the section "Runtime Data  
     1414Related Functions: For more information about using the 
     1415OCI_DYNAMIC_FETCH mode, see the section "Runtime Data 
    14111416Allocation and Piecewise Operations" on page 5-16 of Volume 1.. 
    1412 For more information about the define step, see the section "Defining"  
     1417For more information about the define step, see the section "Defining" 
    14131418on page 2-30. 
    14141419Parameters 
    14151420stmtp (IN) - a handle to the requested SQL query operation. 
    1416 defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly  
    1417 allocated by this call.  This handle is used to  store the define information  
     1421defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly 
     1422allocated by this call.  This handle is used to  store the define information 
    14181423for this column. 
    1419 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     1424errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    14201425diagnostic information in the event of an error. 
    1421 position (IN) - the position of this value in the select list. Positions are  
    1422 1-based and are numbered from left to right. For example, in the SELECT  
     1426position (IN) - the position of this value in the select list. Positions are 
     14271-based and are numbered from left to right. For example, in the SELECT 
    14231428statement 
    14241429SELECT empno, ssn, mgrno FROM employees; 
    14251430empno is at position 1, ssn is at position 2, and mgrno is at position 3. 
    1426 valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type  
    1427 specified in the dty parameter. A number of buffers can be specified when  
     1431valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type 
     1432specified in the dty parameter. A number of buffers can be specified when 
    14281433results for more than one row are desired in a single fetch call. 
    1429 value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored  
    1430 internally in VARCHAR2 format, the number of characters desired, if different  
    1431 from the buffer size in bytes, may be additionally specified by the using  
    1432 OCIAttrSet().  
    1433 In an NLS conversion environment, a truncation error will be generated if the  
    1434 number of bytes specified is insufficient to handle the number of characters  
     1434value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored 
     1435internally in VARCHAR2 format, the number of characters desired, if different 
     1436from the buffer size in bytes, may be additionally specified by the using 
     1437OCIAttrSet(). 
     1438In an NLS conversion environment, a truncation error will be generated if the 
     1439number of bytes specified is insufficient to handle the number of characters 
    14351440desired. 
    1436 dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF)  
    1437 are valid only if the environment has been intialized with in object mode.  
    1438 indp - pointer to an indicator variable or array. For scalar data types,  
    1439 pointer to sb2 or an array of sb2s. Ignored for named data types. For named  
    1440 data types, a pointer to a named data type indicator structure or an array of  
    1441 named data type indicator structures is associated by a subsequent  
    1442 OCIDefineObject() call.  
    1443 See the section "Indicator Variables" on page 2-43 for more information about  
     1441dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF) 
     1442are valid only if the environment has been intialized with in object mode. 
     1443indp - pointer to an indicator variable or array. For scalar data types, 
     1444pointer to sb2 or an array of sb2s. Ignored for named data types. For named 
     1445data types, a pointer to a named data type indicator structure or an array of 
     1446named data type indicator structures is associated by a subsequent 
     1447OCIDefineObject() call. 
     1448See the section "Indicator Variables" on page 2-43 for more information about 
    14441449indicator variables. 
    1445 rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in  
    1446 rlenp is the length of the data in the corresponding element in the row after  
    1447 the fetch.  
     1450rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in 
     1451rlenp is the length of the data in the corresponding element in the row after 
     1452the fetch. 
    14481453rcodep (OUT) - pointer to array of column-level return codes 
    14491454mode (IN) - the valid modes are: 
    14501455OCI_DEFAULT. This is the default mode. 
    1451 OCI_DYNAMIC_FETCH. For applications requiring dynamically  
    1452 allocated data at the time of fetch, this mode must be used. The user may  
    1453 additionally call OCIDefineDynamic() to set up a callback function that  
    1454 will be invoked to receive the dynamically allocated buffers and to set  
    1455 up the memory allocate/free callbacks and the context for the callbacks.  
    1456 valuep and value_sz are ignored in this mode.  
     1456OCI_DYNAMIC_FETCH. For applications requiring dynamically 
     1457allocated data at the time of fetch, this mode must be used. The user may 
     1458additionally call OCIDefineDynamic() to set up a callback function that 
     1459will be invoked to receive the dynamically allocated buffers and to set 
     1460up the memory allocate/free callbacks and the context for the callbacks. 
     1461valuep and value_sz are ignored in this mode. 
    14571462Related Functions 
    14581463OCIDefineArrayOfStruct(), OCIDefineDynamic(), OCIDefineObject() 
     
    14651470OCI Define Dynamic Fetch Attributes 
    14661471Purpose 
    1467 This call is used to set the additional attributes required if the  
    1468 OCI_DYNAMIC_FETCH mode was selected in OCIDefineByPos().  
     1472This call is used to set the additional attributes required if the 
     1473OCI_DYNAMIC_FETCH mode was selected in OCIDefineByPos(). 
    14691474Syntax 
    14701475sword OCIDefineDynamic( OCIDefine   *defnp, 
    14711476                      OCIError    *errhp, 
    1472                       dvoid       *octxp,  
     1477                      dvoid       *octxp, 
    14731478                      OCICallbackDefine (ocbfp)( 
    14741479                                  dvoid             *octxp, 
    14751480                                  OCIDefine         *defnp, 
    1476                                   ub4               iter,  
     1481                                  ub4               iter, 
    14771482                                  dvoid             **bufpp, 
    14781483                                  ub4               **alenpp, 
     
    14811486                                  ub2               **rcodep)  ); 
    14821487Comments 
    1483 This call is used to set the additional attributes required if the  
    1484 OCI_DYNAMIC_FETCH mode has been selected in a call to  
    1485 OCIDefineByPos().  
    1486 When the OCI_DYNAMIC_FETCH mode is selected, buffers will be  
    1487 dynamically allocated for REF, and named data type, values to receive the  
    1488 data. The pointers to these buffers will be returned.  
    1489 If OCI_DYNAMIC_FETCH mode was selected, and the call to  
    1490 OCIDefineDynamic() is skipped, then the application can fetch data piecewise  
     1488This call is used to set the additional attributes required if the 
     1489OCI_DYNAMIC_FETCH mode has been selected in a call to 
     1490OCIDefineByPos(). 
     1491When the OCI_DYNAMIC_FETCH mode is selected, buffers will be 
     1492dynamically allocated for REF, and named data type, values to receive the 
     1493data. The pointers to these buffers will be returned. 
     1494If OCI_DYNAMIC_FETCH mode was selected, and the call to 
     1495OCIDefineDynamic() is skipped, then the application can fetch data piecewise 
    14911496using OCI calls. 
    1492 For more information about OCI_DYNAMIC_FETCH mode, see the section  
     1497For more information about OCI_DYNAMIC_FETCH mode, see the section 
    14931498"Runtime Data Allocation and Piecewise Operations" on page 5-16. 
    14941499Parameters 
    1495 defnp (IN/OUT) - the handle to a define structure returned by a call to  
     1500defnp (IN/OUT) - the handle to a define structure returned by a call to 
    14961501OCIDefineByPos(). 
    1497 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    1498 diagnostic information in the event of an error.  
    1499 octxp (IN) - points to a context for the callback function.  
    1500 ocbfp (IN) - points to a callback function. This is invoked at runtime to get  
    1501 a pointer to the buffer into which the fetched data or a piece of it will be  
    1502 retreived. The callback also specifies the indicator, the return code and the  
    1503 lengths of the data piece and indicator. The callback has the following  
     1502errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     1503diagnostic information in the event of an error. 
     1504octxp (IN) - points to a context for the callback function. 
     1505ocbfp (IN) - points to a callback function. This is invoked at runtime to get 
     1506a pointer to the buffer into which the fetched data or a piece of it will be 
     1507retreived. The callback also specifies the indicator, the return code and the 
     1508lengths of the data piece and indicator. The callback has the following 
    15041509parameters: 
    1505 octxp (IN) - a context pointer passed as an argument to all the callback  
     1510octxp (IN) - a context pointer passed as an argument to all the callback 
    15061511functions. 
    15071512defnp (IN) - the define handle. 
    15081513iter (IN) - which row of this current fetch. 
    1509 bufpp (OUT) - returns a pointer to a buffer to store the column value, ie.  
     1514bufpp (OUT) - returns a pointer to a buffer to store the column value, ie. 
    15101515*bufp points to some appropriate storage for the column value. 
    1511 alenpp (OUT) - returns a pointer to the length of the buffer. *alenpp  
    1512 contains the size of the buffer after return from callback. Gets set to  
     1516alenpp (OUT) - returns a pointer to the length of the buffer. *alenpp 
     1517contains the size of the buffer after return from callback. Gets set to 
    15131518actual data size after fetch. 
    15141519piecep (IN/OUT) - returns a piece value, as follows: 
    1515 The IN value can be OCI_ONE_PIECE, OCI_FIRST_PIECE or  
     1520The IN value can be OCI_ONE_PIECE, OCI_FIRST_PIECE or 
    15161521OCI_NEXT_PIECE. 
    1517 The OUT value can be OCI_ONE_PIECE if the IN value was  
     1522The OUT value can be OCI_ONE_PIECE if the IN value was 
    15181523OCI_ONE_PIECE. 
    1519 The OUT value can be OCI_ONE_PIECE or OCI_FIRST_PIECE if  
     1524The OUT value can be OCI_ONE_PIECE or OCI_FIRST_PIECE if 
    15201525the IN value was OCI_FIRST_PIECE. 
    1521 The OUT value can only be OCI_NEXT_PIECE or  
    1522 OCI_LAST_PIECE if the IN value was OCI_NEXT_PIECE.  
     1526The OUT value can only be OCI_NEXT_PIECE or 
     1527OCI_LAST_PIECE if the IN value was OCI_NEXT_PIECE. 
    15231528indpp (IN) - indicator variable pointer 
    15241529rcodep (IN) - return code variable pointer 
     
    15391544                      OCIError        *errhp, 
    15401545                      CONST OCIType   *type, 
    1541                       dvoid           **pgvpp,  
    1542                       ub4             *pvszsp,  
    1543                       dvoid           **indpp,  
     1546                      dvoid           **pgvpp, 
     1547                      ub4             *pvszsp, 
     1548                      dvoid           **indpp, 
    15441549                      ub4             *indszp ); 
    15451550Comments 
    15461551This call sets up additional attributes necessary for a Named Data Type define. 
    1547 An error will be returned if this function is called when the OCI environment  
     1552An error will be returned if this function is called when the OCI environment 
    15481553has been initialized in non-Object mode. 
    1549 This call takes as a paramter a type descriptor object (TDO) of datatype  
    1550 OCIType for the named data type being defined.  The TDO can be retrieved  
     1554This call takes as a paramter a type descriptor object (TDO) of datatype 
     1555OCIType for the named data type being defined.  The TDO can be retrieved 
    15511556with a call to OCITypeByName(). 
    1552 See the description of OCIInitialize() on page 13 - 43 for more information  
     1557See the description of OCIInitialize() on page 13 - 43 for more information 
    15531558about initializing the OCI process environment. 
    15541559Parameters 
    1555 defnp (IN/OUT) - a define handle previously allocated in a call to  
    1556 OCIDefineByPos().  
    1557 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     1560defnp (IN/OUT) - a define handle previously allocated in a call to 
     1561OCIDefineByPos(). 
     1562errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    15581563diagnostic information in the event of an error. 
    1559 type (IN, optional) - points to the Type Descriptor Object (TDO) which  
    1560 describes the type of the program variable. Only used for program variables  
    1561 of type SQLT_NTY. This parameter is optional, and may be passed as NULL  
     1564type (IN, optional) - points to the Type Descriptor Object (TDO) which 
     1565describes the type of the program variable. Only used for program variables 
     1566of type SQLT_NTY. This parameter is optional, and may be passed as NULL 
    15621567if it is not being used. 
    1563 pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an  
    1564 array, pgvpp points to an array of pointers. Memory for the fetched named data  
    1565 type instance(s) is dynamically allocated in the object cache. At the end of  
    1566 the fetch when all the values have been received, pgvpp points to the  
    1567 pointer(s) to these newly allocated named data type instance(s). The  
    1568 application must call OCIObjectMarkDel() to deallocate the named data type  
    1569 instance(s) when they are no longer needed.  
    1570 pvszsp (IN/OUT) - points to the size of the program variable. For an array, it  
    1571 is an array of ub4s. On return points to the size(s) of unpickled fetched  
     1568pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an 
     1569array, pgvpp points to an array of pointers. Memory for the fetched named data 
     1570type instance(s) is dynamically allocated in the object cache. At the end of 
     1571the fetch when all the values have been received, pgvpp points to the 
     1572pointer(s) to these newly allocated named data type instance(s). The 
     1573application must call OCIObjectMarkDel() to deallocate the named data type 
     1574instance(s) when they are no longer needed. 
     1575pvszsp (IN/OUT) - points to the size of the program variable. For an array, it 
     1576is an array of ub4s. On return points to the size(s) of unpickled fetched 
    15721577values. 
    1573 indpp (IN/OUT) - points to a pointer to the program variable buffer  
    1574 containing the parallel indicator structure. For an array, points to an array  
    1575 of pointers. Memory is allocated to store the indicator structures in the  
    1576 object cache. At the end of the fetch when all values have been received,  
     1578indpp (IN/OUT) - points to a pointer to the program variable buffer 
     1579containing the parallel indicator structure. For an array, points to an array 
     1580of pointers. Memory is allocated to store the indicator structures in the 
     1581object cache. At the end of the fetch when all values have been received, 
    15771582indpp points to the pointer(s) to these newly allocated indicator structure(s). 
    1578 indszp (IN/OUT) - points to the size(s) of the indicator structure program  
     1583indszp (IN/OUT) - points to the size(s) of the indicator structure program 
    15791584variable. For an array, it is an array of ub4s. On return points to the size(s) 
    15801585of the unpickled fetched indicator values. 
     
    15881593OCI Get DESCriptor or lob locator 
    15891594Purpose 
    1590 Allocates storage to hold certain data types. The descriptors can be used as  
     1595Allocates storage to hold certain data types. The descriptors can be used as 
    15911596bind or define variables. 
    15921597Syntax 
    15931598sword OCIDescAlloc ( CONST dvoid   *parenth, 
    1594                    dvoid         **descpp,  
     1599                   dvoid         **descpp, 
    15951600                   ub4           type, 
    15961601                   size_t        xtramem_sz, 
    15971602                   dvoid         **usrmempp); 
    15981603Comments 
    1599 Returns a pointer to an allocated and initialized structure, corresponding to  
    1600 the type specified in type. A non-NULL descriptor or LOB locator is returned  
     1604Returns a pointer to an allocated and initialized structure, corresponding to 
     1605the type specified in type. A non-NULL descriptor or LOB locator is returned 
    16011606on success. No diagnostics are available on error. 
    1602 This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if  
    1603 an out-of-memory error occurs.  
    1604 Parameters 
    1605 parenth (IN) - an environment handle.  
    1606 descpp (OUT) - returns a descriptor or LOB locator of desired type.  
    1607 type (IN) - specifies the type of descriptor or LOB locator to be allocated.  
     1607This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if 
     1608an out-of-memory error occurs. 
     1609Parameters 
     1610parenth (IN) - an environment handle. 
     1611descpp (OUT) - returns a descriptor or LOB locator of desired type. 
     1612type (IN) - specifies the type of descriptor or LOB locator to be allocated. 
    16081613The specific types are: 
    1609 OCI_DTYPE_SNAP - specifies generation of snapshot descriptor of C  
     1614OCI_DTYPE_SNAP - specifies generation of snapshot descriptor of C 
    16101615type - OCISnapshot 
    1611 OCI_DTYPE_LOB - specifies generation of a LOB data type locator of C  
     1616OCI_DTYPE_LOB - specifies generation of a LOB data type locator of C 
    16121617type - OCILobLocator 
    1613 OCI_DTYPE_RSET - specifies generation of a descriptor of C type  
    1614 OCIResult that references a result set (a number of rows as a result of a  
    1615 query). This descriptor is bound to a bind variable of data type  
    1616 SQLT_RSET (result set). The descriptor has to be converted into a  
    1617 statement handle using a function - OCIResultSetToStmt() - which can  
    1618 then be passed to OCIDefineByPos() and OCIStmtFetch() to retrieve the  
     1618OCI_DTYPE_RSET - specifies generation of a descriptor of C type 
     1619OCIResult that references a result set (a number of rows as a result of a 
     1620query). This descriptor is bound to a bind variable of data type 
     1621SQLT_RSET (result set). The descriptor has to be converted into a 
     1622statement handle using a function - OCIResultSetToStmt() - which can 
     1623then be passed to OCIDefineByPos() and OCIStmtFetch() to retrieve the 
    16191624rows of the result set. 
    1620 OCI_DTYPE_ROWID - specifies generation of a ROWID descriptor of C  
     1625OCI_DTYPE_ROWID - specifies generation of a ROWID descriptor of C 
    16211626type OCIRowid. 
    1622 OCI_DTYPE_COMPLEXOBJECTCOMP - specifies generation of a  
    1623 complex object retrieval descriptor of C type  
     1627OCI_DTYPE_COMPLEXOBJECTCOMP - specifies generation of a 
     1628complex object retrieval descriptor of C type 
    16241629OCIComplexObjectComp. 
    1625 xtramemsz (IN) - specifies an amount of user memory to be allocated for use  
    1626 by the application.  
    1627 usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz  
    1628 allocated by the call for the user.  
     1630xtramemsz (IN) - specifies an amount of user memory to be allocated for use 
     1631by the application. 
     1632usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
     1633allocated by the call for the user. 
    16291634Related Functions 
    16301635OCIDescFree() 
     
    16431648Comments 
    16441649This call frees up storage associated with the descriptor, corresponding to the 
    1645 type specified in type. Returns OCI_SUCCESS or OCI_INVALID_HANDLE.  
    1646 All descriptors must be explicitly deallocated. OCI will not deallocate a  
     1650type specified in type. Returns OCI_SUCCESS or OCI_INVALID_HANDLE. 
     1651All descriptors must be explicitly deallocated. OCI will not deallocate a 
    16471652descriptor if the environment handle is deallocated. 
    16481653Parameters 
    1649 descp (IN) - an allocated descriptor.  
    1650 type (IN) - specifies the type of storage to be freed. The specific types are:  
     1654descp (IN) - an allocated descriptor. 
     1655type (IN) - specifies the type of storage to be freed. The specific types are: 
    16511656OCI_DTYPE_SNAP - snapshot descriptor 
    16521657OCI_DTYPE_LOB - a LOB data type descriptor 
    1653 OCI_DTYPE_RSET - a descriptor that references a result set (a number  
     1658OCI_DTYPE_RSET - a descriptor that references a result set (a number 
    16541659of rows as a result of a query). 
    16551660OCI_DTYPE_ROWID - a ROWID descriptor 
    1656 OCI_DTYPE_COMPLEXOBJECTCOMP - a complex object retrieval  
     1661OCI_DTYPE_COMPLEXOBJECTCOMP - a complex object retrieval 
    16571662descriptor 
    16581663Related Functions 
     
    16771682Comments 
    16781683This is a generic describe call that describes existing schema objects: tables, 
    1679 views, synonyms, procedures, functions, packages, sequences, and types. As a  
    1680 result of this call, the describe handle is populated with the object-specific  
     1684views, synonyms, procedures, functions, packages, sequences, and types. As a 
     1685result of this call, the describe handle is populated with the object-specific 
    16811686attributes which can be obtained through an OCIAttrGet() call. 
    1682 An OCIParamGet() on the describe handle returns a parameter descriptor for a  
    1683 specified position. Parameter positions begin with 1. Calling OCIAttrGet() on  
    1684 the parameter descriptor returns the specific attributes of a stored procedure  
    1685 or function parameter or a table column descriptor as the case may be.  
    1686 These subsequent calls do not need an extra round trip to the server because  
    1687 the entire schema object description cached on the client side by  
    1688 OCIDescribeAny(). Calling OCIAttrGet() on the describe handle can also return  
     1687An OCIParamGet() on the describe handle returns a parameter descriptor for a 
     1688specified position. Parameter positions begin with 1. Calling OCIAttrGet() on 
     1689the parameter descriptor returns the specific attributes of a stored procedure 
     1690or function parameter or a table column descriptor as the case may be. 
     1691These subsequent calls do not need an extra round trip to the server because 
     1692the entire schema object description cached on the client side by 
     1693OCIDescribeAny(). Calling OCIAttrGet() on the describe handle can also return 
    16891694the total number of positions. 
    1690 See the section "Describing" on page 2-33 for more information about describe  
     1695See the section "Describing" on page 2-33 for more information about describe 
    16911696operations. 
    16921697Parameters 
    16931698TO BE UPDATED 
    16941699svchp (IN/OUT) - a service context handle. 
    1695 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     1700errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    16961701diagnostic information in the event of an error. 
    1697 objptr (IN) - the name of the object (a null-terminated string) to be  
    1698 described. Only procedure or function names are valid when connected to an  
     1702objptr (IN) - the name of the object (a null-terminated string) to be 
     1703described. Only procedure or function names are valid when connected to an 
    16991704Oracle7 Server. 
    17001705objptr_len (IN) - the length of the string. Must be non-zero. 
     
    17021707info_level (IN) - reserved for future extensions. Pass OCI_DEFAULT. 
    17031708objtype (IN/OUT) - object type. 
    1704 dschp (IN/OUT) - a describe handle that is populated with describe  
     1709dschp (IN/OUT) - a describe handle that is populated with describe 
    17051710information about the object after the call. 
    17061711Related Functions 
     
    17171722the OCIInitialize and OCIEnvInit calls. 
    17181723Syntax 
    1719 sword OCIEnvCreate  ( OCIEnv        **envhpp,  
    1720                       ub4           mode,  
    1721                       CONST dvoid   *ctxp,  
    1722                       CONST dvoid   *(*malocfp)  
    1723                                     (dvoid *ctxp,  
    1724                                         size_t size),  
    1725                       CONST dvoid   *(*ralocfp)  
    1726                                     (dvoid *ctxp,  
    1727                                        dvoid *memptr,  
    1728                                        size_t newsize),  
    1729                       CONST void    (*mfreefp)  
    1730                                     ( dvoid *ctxp,  
     1724sword OCIEnvCreate  ( OCIEnv        **envhpp, 
     1725                      ub4           mode, 
     1726                      CONST dvoid   *ctxp, 
     1727                      CONST dvoid   *(*malocfp) 
     1728                                    (dvoid *ctxp, 
     1729                                        size_t size), 
     1730                      CONST dvoid   *(*ralocfp) 
     1731                                    (dvoid *ctxp, 
     1732                                       dvoid *memptr, 
     1733                                       size_t newsize), 
     1734                      CONST void    (*mfreefp) 
     1735                                    ( dvoid *ctxp, 
    17311736                                       dvoid *memptr)) 
    17321737                      size_t    xtramemsz, 
    17331738                      dvoid     **usrmempp ); 
    1734   
     1739 
    17351740Comments 
    17361741This call creates an environment for all the OCI calls using the modes 
     
    17381743OCIInitialize and OCIEnvInit. This function returns an environment handle 
    17391744which is then used by the remaining OCI functions. There can be multiple 
    1740 environments in OCI each with its own environment modes.  This function  
     1745environments in OCI each with its own environment modes.  This function 
    17411746also performs any process level initialization if required by any mode. 
    17421747For example if the user wants to initialize an environment as OCI_THREADED, 
    17431748then all libraries that are used by OCI are also initialized in the 
    1744 threaded mode.  
     1749threaded mode. 
    17451750 
    17461751This call should be invoked before anny other OCI call and should be used 
    17471752instead of the OCIInitialize and OCIEnvInit calls. This is the recommended 
    17481753call, although OCIInitialize and OCIEnvInit calls will still be supported 
    1749 for backward compatibility.  
    1750   
    1751 envpp (OUT) - a pointer to a handle to the environment.  
     1754for backward compatibility. 
     1755 
     1756envpp (OUT) - a pointer to a handle to the environment. 
    17521757mode (IN) - specifies initialization of the mode. The valid modes are: 
    17531758OCI_DEFAULT - default mode. 
    1754 OCI_THREADED - threaded environment. In this mode, internal data  
    1755 structures are protected from concurrent accesses by multiple threads.  
    1756 OCI_OBJECT - will use navigational object interface.  
    1757 ctxp (IN) - user defined context for the memory call back routines.  
    1758 malocfp (IN) - user-defined memory allocation function. If mode is  
     1759OCI_THREADED - threaded environment. In this mode, internal data 
     1760structures are protected from concurrent accesses by multiple threads. 
     1761OCI_OBJECT - will use navigational object interface. 
     1762ctxp (IN) - user defined context for the memory call back routines. 
     1763malocfp (IN) - user-defined memory allocation function. If mode is 
    17591764OCI_THREADED, this memory allocation routine must be thread safe. 
    17601765ctxp - context pointer for the user-defined memory allocation function. 
    1761 size - size of memory to be allocated by the user-defined memory  
     1766size - size of memory to be allocated by the user-defined memory 
    17621767allocation function 
    1763 ralocfp (IN) - user-defined memory re-allocation function. If mode is  
     1768ralocfp (IN) - user-defined memory re-allocation function. If mode is 
    17641769OCI_THREADED, this memory allocation routine must be thread safe. 
    1765 ctxp - context pointer for the user-defined memory reallocation  
     1770ctxp - context pointer for the user-defined memory reallocation 
    17661771function. 
    17671772memp - pointer to memory block 
    17681773newsize - new size of memory to be allocated 
    1769 mfreefp (IN) - user-defined memory free function. If mode is  
     1774mfreefp (IN) - user-defined memory free function. If mode is 
    17701775OCI_THREADED, this memory free routine must be thread safe. 
    17711776ctxp - context pointer for the user-defined memory free function. 
    17721777memptr - pointer to memory to be freed 
    1773 xtramemsz (IN) - specifies the amount of user memory to be allocated.  
    1774 usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz  
     1778xtramemsz (IN) - specifies the amount of user memory to be allocated. 
     1779usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
    17751780allocated by the call for the user. 
    17761781 
     
    18101815be used to replace the ones specified in NLS_LANG or NLS_NCHAR. Moreover, 
    18111816OCI_UTF16ID is allowed to be set as charset and ncharset. 
    1812 On the other hand, OCI_UTF16 mode is deprecated with this function.  
    1813 Applications can achieve the same effects by setting  
     1817On the other hand, OCI_UTF16 mode is deprecated with this function. 
     1818Applications can achieve the same effects by setting 
    18141819both charset and ncharset as OCI_UTF16ID. 
    18151820 
     
    18261831                 dvoid     **usrmempp ); 
    18271832Comments 
    1828 Initializes the OCI environment handle. No changes are done on an initialized  
    1829 handle. If OCI_ERROR or OCI_SUCCESS_WITH_INFO is returned, the  
    1830 environment handle can be used to obtain ORACLE specific errors and  
     1833Initializes the OCI environment handle. No changes are done on an initialized 
     1834handle. If OCI_ERROR or OCI_SUCCESS_WITH_INFO is returned, the 
     1835environment handle can be used to obtain ORACLE specific errors and 
    18311836diagnostics. 
    18321837This call is processed locally, without a server round-trip. 
    18331838Parameters 
    1834 envpp (OUT) - a pointer to a handle to the environment.  
    1835 mode (IN) - specifies initialization of an environment mode. The only valid  
     1839envpp (OUT) - a pointer to a handle to the environment. 
     1840mode (IN) - specifies initialization of an environment mode. The only valid 
    18361841mode is OCI_DEFAULT for default mode 
    1837 xtramemsz (IN) - specifies the amount of user memory to be allocated.  
    1838 usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz  
     1842xtramemsz (IN) - specifies the amount of user memory to be allocated. 
     1843usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
    18391844allocated by the call for the user. 
    18401845Example 
    1841 See the description of OCISessionBegin() on page 13-84 for an example showing  
    1842 the use of OCIEnvInit().  
     1846See the description of OCISessionBegin() on page 13-84 for an example showing 
     1847the use of OCIEnvInit(). 
    18431848Related Functions 
    18441849 
     
    18521857Returns an error message in the buffer provided and an ORACLE error. 
    18531858Syntax 
    1854 sword OCIErrorGet ( dvoid      *hndlp,  
     1859sword OCIErrorGet ( dvoid      *hndlp, 
    18551860                  ub4        recordno, 
    18561861                  OraText       *sqlstate, 
    1857                   ub4        *errcodep,  
     1862                  ub4        *errcodep, 
    18581863                  OraText       *bufp, 
    18591864                  ub4        bufsiz, 
    18601865                  ub4        type ); 
    18611866Comments 
    1862 Returns an error message in the buffer provided and an ORACLE error.  
    1863 Currently does not support SQL state. This call can be called a multiple  
     1867Returns an error message in the buffer provided and an ORACLE error. 
     1868Currently does not support SQL state. This call can be called a multiple 
    18641869number of times if there are more than one diagnostic record for an error. 
    18651870The error handle is originally allocated with a call to OCIHandleAlloc(). 
    18661871Parameters 
    1867 hndlp (IN) - the error handle, in most cases, or the environment handle (for  
     1872hndlp (IN) - the error handle, in most cases, or the environment handle (for 
    18681873errors on OCIEnvInit(), OCIHandleAlloc()). 
    1869 recordno (IN) - indicates the status record from which the application seeks  
    1870 info. Starts from 1.  
     1874recordno (IN) - indicates the status record from which the application seeks 
     1875info. Starts from 1. 
    18711876sqlstate (OUT) - Not supported in Version 8.0. 
    18721877errcodep (OUT) - an ORACLE Error is returned. 
     
    18791884OCIExtractInit 
    18801885Name 
    1881 OCI Extract Initialize  
    1882 Purpose 
    1883 This function initializes the parameter manager.  
     1886OCI Extract Initialize 
     1887Purpose 
     1888This function initializes the parameter manager. 
    18841889Syntax 
    18851890sword OCIExtractInit(dvoid *hndl, OCIError *err); 
    18861891Comments 
    1887 It must be called before calling any other parameter manager routine. The NLS  
    1888 information is stored inside the parameter manager context and used in  
     1892It must be called before calling any other parameter manager routine. The NLS 
     1893information is stored inside the parameter manager context and used in 
    18891894subsequent calls to OCIExtract routines. 
    18901895Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR 
    18911896Parameters 
    18921897hndl (IN/OUT) - The OCI environment or session handle. 
    1893 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    1894                err and this function returns OCI_ERROR. Diagnostic information  
     1898err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     1899               err and this function returns OCI_ERROR. Diagnostic information 
    18951900               can be obtained by calling OCIErrorGet(). 
    18961901Related Functions 
     
    19011906OCI Extract Terminate 
    19021907Purpose 
    1903 This function releases all dynamically allocated storage and may perform  
     1908This function releases all dynamically allocated storage and may perform 
    19041909other internal bookkeeping functions. 
    19051910Syntax 
     
    19101915Parameters 
    19111916hndl (IN/OUT) - The OCI environment or session handle. 
    1912 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    1913                err and this function returns OCI_ERROR. Diagnostic information  
     1917err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     1918               err and this function returns OCI_ERROR. Diagnostic information 
    19141919               can be obtained by calling OCIErrorGet(). 
    19151920Related Functions 
     
    19201925OCI Extract Reset 
    19211926Purpose 
    1922 The memory currently used for parameter storage, key definition storage, and  
     1927The memory currently used for parameter storage, key definition storage, and 
    19231928parameter value lists is freed and the structure is reinitialized. 
    19241929Syntax 
     
    19281933Parameters 
    19291934hndl (IN/OUT) - The OCI environment or session handle. 
    1930 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    1931                err and this function returns OCI_ERROR. Diagnostic information  
     1935err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     1936               err and this function returns OCI_ERROR. Diagnostic information 
    19321937               can be obtained by calling OCIErrorGet(). 
    19331938Related Functions 
     
    19411946sword OCIExtractSetNumKeys(dvoid *hndl, OCIError *err, uword numkeys); 
    19421947Comments 
    1943 This routine must be called prior to the first call of OCIExtractSetKey().   
     1948This routine must be called prior to the first call of OCIExtractSetKey(). 
    19441949Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR 
    19451950Parameters 
    19461951hndl (IN/OUT) - The OCI environment or session handle. 
    1947 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    1948                err and this function returns OCI_ERROR. Diagnostic information  
     1952err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     1953               err and this function returns OCI_ERROR. Diagnostic information 
    19491954               can be obtained by calling OCIErrorGet(). 
    1950 numkeys (IN) - The number of keys that will be registered with  
     1955numkeys (IN) - The number of keys that will be registered with 
    19511956               OCIExtractSetKey(). 
    19521957Related Functions 
     
    19591964Registers information about a key with the parameter manager. 
    19601965Syntax 
    1961 sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name,  
     1966sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name, 
    19621967                       ub1 type, ub4 flag, CONST dvoid *defval, 
    19631968                       CONST sb4 *intrange, CONST OraText *CONST *strlist); 
    19641969Comments 
    1965 This routine must be called after calling OCIExtractSetKey() and before  
    1966 calling OCIExtractFromFile() or OCIExtractFromStr().   
     1970This routine must be called after calling OCIExtractSetKey() and before 
     1971calling OCIExtractFromFile() or OCIExtractFromStr(). 
    19671972Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR 
    19681973Parameters 
    19691974hndl (IN/OUT) - The OCI environment or session handle. 
    1970 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    1971                err and this function returns OCI_ERROR. Diagnostic information  
     1975err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     1976               err and this function returns OCI_ERROR. Diagnostic information 
    19721977               can be obtained by calling OCIErrorGet(). 
    19731978name (IN) - The name of the key. 
    1974 type (IN) - The type of the key (OCI_EXTRACT_TYPE_INTEGER,  
    1975             OCI_EXTRACT_TYPE_OCINUM, OCI_EXTRACT_TYPE_STRING, or  
     1979type (IN) - The type of the key (OCI_EXTRACT_TYPE_INTEGER, 
     1980            OCI_EXTRACT_TYPE_OCINUM, OCI_EXTRACT_TYPE_STRING, or 
    19761981            OCI_EXTRACT_TYPE_BOOLEAN). 
    1977 flag (IN) - Set to OCI_EXTRACT_MULTIPLE if the key can take multiple values  
     1982flag (IN) - Set to OCI_EXTRACT_MULTIPLE if the key can take multiple values 
    19781983            or 0 otherwise. 
    1979 defval (IN) - Set to the default value for the key.  May be NULL if there is  
    1980                no default.  A string default must be a (text*) type, an  
    1981                integer default must be an (sb4*) type, and a boolean default  
     1984defval (IN) - Set to the default value for the key.  May be NULL if there is 
     1985               no default.  A string default must be a (text*) type, an 
     1986               integer default must be an (sb4*) type, and a boolean default 
    19821987               must be a (ub1*) type. 
    1983 intrange (IN) - Starting and ending values for the allowable range of integer  
    1984                 values.  May be NULL if the key is not an integer type or if  
     1988intrange (IN) - Starting and ending values for the allowable range of integer 
     1989                values.  May be NULL if the key is not an integer type or if 
    19851990                all integer values are acceptable. 
    1986 strlist (IN) - List of all acceptable text strings for the key.  May be NULL  
    1987                if the key is not a string type or if all text values are  
     1991strlist (IN) - List of all acceptable text strings for the key.  May be NULL 
     1992               if the key is not a string type or if all text values are 
    19881993               acceptable. 
    19891994Related Functions 
     
    19941999OCI Extract parameters From File 
    19952000Purpose 
    1996 The keys and their values in the given file are processed.  
    1997 Syntax 
    1998 sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag,  
     2001The keys and their values in the given file are processed. 
     2002Syntax 
     2003sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag, 
    19992004                         OraText *filename); 
    20002005Comments 
     
    20022007Parameters 
    20032008hndl (IN/OUT) - The OCI environment or session handle. 
    2004 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    2005                err and this function returns OCI_ERROR. Diagnostic information  
     2009err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     2010               err and this function returns OCI_ERROR. Diagnostic information 
    20062011               can be obtained by calling OCIErrorGet(). 
    2007 flag (IN) - Zero or has one or more of the following bits set:  
    2008            OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or  
    2009            OCI_EXTRACT_APPEND_VALUES.  
     2012flag (IN) - Zero or has one or more of the following bits set: 
     2013           OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
     2014           OCI_EXTRACT_APPEND_VALUES. 
    20102015filename (IN) - Null-terminated filename string. 
    20112016Related Functions 
     
    20152020OCI Extract parameters From String 
    20162021Purpose 
    2017 The keys and their values in the given string are processed.  
     2022The keys and their values in the given string are processed. 
    20182023Syntax 
    20192024sword OCIExtractFromStr(dvoid *hndl, OCIError *err, ub4 flag, OraText *input); 
     
    20222027Parameters 
    20232028hndl (IN/OUT) - The OCI environment or session handle. 
    2024 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    2025                err and this function returns OCI_ERROR. Diagnostic information  
     2029err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     2030               err and this function returns OCI_ERROR. Diagnostic information 
    20262031               can be obtained by calling OCIErrorGet(). 
    2027 flag (IN) - Zero or has one or more of the following bits set:  
    2028            OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or  
    2029            OCI_EXTRACT_APPEND_VALUES.  
     2032flag (IN) - Zero or has one or more of the following bits set: 
     2033           OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
     2034           OCI_EXTRACT_APPEND_VALUES. 
    20302035input (IN) - Null-terminated input string. 
    20312036Related Functions 
     
    20372042Gets the integer value for the specified key. 
    20382043Syntax 
    2039 sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname,  
     2044sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname, 
    20402045                      uword valno, sb4 *retval); 
    20412046Comments 
    20422047The valno'th value (starting with 0) is returned. 
    2043 Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR.  
     2048Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
    20442049OCI_NO_DATA means that there is no valno'th value for this key. 
    20452050Parameters 
    20462051hndl (IN) - The OCI environment or session handle. 
    2047 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    2048                err and this function returns OCI_ERROR. Diagnostic information  
     2052err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     2053               err and this function returns OCI_ERROR. Diagnostic information 
    20492054               can be obtained by calling OCIErrorGet(). 
    20502055keyname (IN) - Key name. 
     
    20572062OCI Extract To Boolean 
    20582063Purpose 
    2059 Gets the boolean value for the specified key.  
    2060 Syntax 
    2061 sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname,  
     2064Gets the boolean value for the specified key. 
     2065Syntax 
     2066sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname, 
    20622067                       uword valno, ub1 *retval); 
    20632068Comments 
    20642069The valno'th value (starting with 0) is returned. 
    2065 Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR.  
     2070Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
    20662071OCI_NO_DATA means that there is no valno'th value for this key. 
    20672072Parameters 
    20682073hndl (IN) - The OCI environment or session handle. 
    2069 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    2070                err and this function returns OCI_ERROR. Diagnostic information  
     2074err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     2075               err and this function returns OCI_ERROR. Diagnostic information 
    20712076               can be obtained by calling OCIErrorGet(). 
    20722077keyname (IN) - Key name. 
     
    20812086Gets the string value for the specified key. 
    20822087Syntax 
    2083 sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname,  
     2088sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname, 
    20842089                      uword valno, OraText *retval, uword buflen); 
    20852090Comments 
    20862091The valno'th value (starting with 0) is returned. 
    2087 Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR.  
     2092Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
    20882093OCI_NO_DATA means that there is no valno'th value for this key. 
    20892094Parameters 
    20902095hndl (IN) - The OCI environment or session handle. 
    2091 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    2092                err and this function returns OCI_ERROR. Diagnostic information  
     2096err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     2097               err and this function returns OCI_ERROR. Diagnostic information 
    20932098               can be obtained by calling OCIErrorGet(). 
    20942099keyname (IN) - Key name. 
     
    21062111Gets the OCINumber value for the specified key. 
    21072112Syntax 
    2108 sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname,  
     2113sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname, 
    21092114                         uword valno, OCINumber *retval); 
    21102115Comments 
    21112116The valno'th value (starting with 0) is returned. 
    2112 Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR.  
     2117Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
    21132118OCI_NO_DATA means that there is no valno'th value for this key. 
    21142119Parameters 
    21152120hndl (IN) - The OCI environment or session handle. 
    2116 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    2117                err and this function returns OCI_ERROR. Diagnostic information  
     2121err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     2122               err and this function returns OCI_ERROR. Diagnostic information 
    21182123               can be obtained by calling OCIErrorGet(). 
    21192124keyname (IN) - Key name. 
     
    21262131OCI Extract To parameter List 
    21272132Purpose 
    2128 Generates a list of parameters from the parameter structures that are stored  
    2129 in memory.  
     2133Generates a list of parameters from the parameter structures that are stored 
     2134in memory. 
    21302135Syntax 
    21312136sword OCIExtractToList(dvoid *hndl, OCIError *err, uword *numkeys); 
     
    21352140Parameters 
    21362141hndl (IN) - The OCI environment or session handle. 
    2137 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    2138                err and this function returns OCI_ERROR. Diagnostic information  
     2142err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     2143               err and this function returns OCI_ERROR. Diagnostic information 
    21392144               can be obtained by calling OCIErrorGet(). 
    21402145numkeys (OUT) - Number of distinct keys stored in memory. 
     
    21482153Generates a list of values for the a parameter in the parameter list. 
    21492154Syntax 
    2150 sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index,  
    2151                          OraText *name, ub1 *type, uword *numvals,  
     2155sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index, 
     2156                         OraText *name, ub1 *type, uword *numvals, 
    21522157                         dvoid*** values); 
    21532158Comments 
    2154 Parameters are specified by an index. OCIExtractToList() must be called prior  
    2155 to calling this routine to generate the parameter list from the parameter  
    2156 structures that are stored in memory.  
     2159Parameters are specified by an index. OCIExtractToList() must be called prior 
     2160to calling this routine to generate the parameter list from the parameter 
     2161structures that are stored in memory. 
    21572162Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR 
    21582163Parameters 
    21592164hndl (IN) - The OCI environment or session handle. 
    2160 err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    2161                err and this function returns OCI_ERROR. Diagnostic information  
     2165err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     2166               err and this function returns OCI_ERROR. Diagnostic information 
    21622167               can be obtained by calling OCIErrorGet(). 
    21632168name (OUT) - Name of the key for the current parameter. 
    2164 type (OUT) - Type of the current parameter (OCI_EXTRACT_TYPE_STRING,  
    2165              OCI_EXTRACT_TYPE_INTEGER, OCI_EXTRACT_TYPE_OCINUM, or  
     2169type (OUT) - Type of the current parameter (OCI_EXTRACT_TYPE_STRING, 
     2170             OCI_EXTRACT_TYPE_INTEGER, OCI_EXTRACT_TYPE_OCINUM, or 
    21662171             OCI_EXTRACT_TYPE_BOOLEAN) 
    21672172numvals (OUT) - Number of values for this parameter. 
     
    21722177 
    21732178************************  OCIFileClose() *********************************** 
    2174   
     2179 
    21752180Name 
    21762181 OCIFileClose - Oracle Call Interface FILE i/o CLOSE 
     
    21802185 
    21812186Syntax 
    2182  sword OCIFileClose ( dvoid             *hndl,  
     2187 sword OCIFileClose ( dvoid             *hndl, 
    21832188                      OCIError          *err, 
    21842189                      OCIFileObject     *filep ) 
     
    21862191Comments 
    21872192 This function will close a previously opened file. If the function succeeds 
    2188  then OCI_SUCCESS will be returned, else OCI_ERROR.  
    2189   
     2193 then OCI_SUCCESS will be returned, else OCI_ERROR. 
     2194 
    21902195Parameters 
    21912196 hndl  (IN) - the OCI environment or session handle. 
     
    21942199 
    21952200Related Functions 
    2196  OCIFileOpen.   
     2201 OCIFileOpen. 
    21972202 
    21982203 
     
    22072212 
    22082213Syntax 
    2209  sword OCIFileExists ( dvoid           *hndl,  
    2210                       OCIError         *err,  
     2214 sword OCIFileExists ( dvoid           *hndl, 
     2215                      OCIError         *err, 
    22112216                      OraText          *filename, 
    22122217                      OraText          *path, 
     
    22172222 be set to FALSE. 
    22182223 The function will return OCI_ERROR if any error is encountered, else 
    2219  it will return OCI_ERROR.  
     2224 it will return OCI_ERROR. 
    22202225 
    22212226Parameters 
     
    22282233Related Functions. 
    22292234 None. 
    2230       
     2235 
    22312236 
    22322237 **************************** OCIFileFlush() ****************************** 
     
    22402245 
    22412246Syntax 
    2242  sword OCIFileFlush ( dvoid             *hndl,  
     2247 sword OCIFileFlush ( dvoid             *hndl, 
    22432248                      OCIError          *err, 
    22442249                      OCIFileObject     *filep ) 
     
    22482253 it will return OCI_ERROR. 
    22492254 
    2250 Parameters  
     2255Parameters 
    22512256 hndl (IN) - the OCI environment or session handle. 
    22522257 err (OUT) - the OCI error handle 
     
    22672272 
    22682273Syntax 
    2269  OCIFileGetLength(dvoid           *hndl,  
     2274 OCIFileGetLength(dvoid           *hndl, 
    22702275                  OCIError        *err, 
    22712276                  OraText         *filename, 
     
    22772282 The function will return OCI_ERROR if any error is encountered, else 
    22782283 it will return OCI_ERROR. 
    2279   
     2284 
    22802285Parameters 
    22812286 hndl (IN) - the OCI environment or session handle. 
    2282  err (OUT) - the OCI error handle.  If  there is an error, it is recorded  
    2283  in err and this function returns OCI_ERROR.  Diagnostic information can be  
     2287 err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
     2288 in err and this function returns OCI_ERROR.  Diagnostic information can be 
    22842289 obtained by calling OCIErrorGet(). 
    22852290 filename (IN) - file name. 
     
    22942299 
    22952300******************************** OCIFileInit() ***************************** 
    2296     
     2301 
    22972302Name 
    22982303 OCIFileInit - Oracle Call Interface FILE i/o INITialize 
     
    23022307 
    23032308Syntax 
    2304  sword OCIFileInit ( dvoid *hndl,  
     2309 sword OCIFileInit ( dvoid *hndl, 
    23052310                     OCIError *err) 
    23062311 
     
    23102315 The function will return OCI_ERROR if any error is encountered, else 
    23112316 it will return OCI_ERROR. 
    2312   
     2317 
    23132318Parameters 
    23142319 hndl(IN) - OCI environment or session handle. 
     
    23172322Related Functions 
    23182323 OCIFileTerm 
    2319       
     2324 
    23202325 
    23212326 
     
    23292334 
    23302335Syntax 
    2331  sword OCIFileOpen ( dvoid               *hndl,  
     2336 sword OCIFileOpen ( dvoid               *hndl, 
    23322337                     OCIError            *err, 
    23332338                     OCIFileObject      **filep, 
     
    23352340                     OraText             *path, 
    23362341                     ub4                  mode, 
    2337                      ub4                  create,  
     2342                     ub4                  create, 
    23382343                     ub4                  type ) 
    23392344 
    23402345Comments 
    23412346 OCIFileOpen returns a handle to the open file in filep if the file is 
    2342  successfully opened.  
     2347 successfully opened. 
    23432348 If one wants to use the standard file objects (stdin, stdout & stderr) 
    2344  then OCIFileOpen whould be called with the type filed containing the  
    2345  appropriate type (see the parameter type). If any of the standard files  
     2349 then OCIFileOpen whould be called with the type filed containing the 
     2350 appropriate type (see the parameter type). If any of the standard files 
    23462351 are specified then filename, path, mode and create are ignored. 
    23472352 The function will return OCI_ERROR if any error is encountered, else 
     
    23502355Parameters 
    23512356 hndl (OUT) - the OCI environment or session handle. 
    2352  err (OUT) - the OCI error handle.  If  there is an error, it is recorded  
    2353  in err and this function returns OCI_ERROR.  Diagnostic information can be  
     2357 err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
     2358 in err and this function returns OCI_ERROR.  Diagnostic information can be 
    23542359 obtained by calling OCIErrorGet(). 
    23552360 filep (OUT) - the file object to be returned. 
     
    23592364 OCI_FILE_WRITEONLY, OCI_FILE_READ_WRITE). 
    23602365 create - should the file be created if it does not exist. Valid values 
    2361  are:  
    2362      OCI_FILE_TRUNCATE - create a file regardless of whether or not it exists.  
     2366 are: 
     2367     OCI_FILE_TRUNCATE - create a file regardless of whether or not it exists. 
    23632368                        If the file already exists overwrite it. 
    23642369     OCI_FILE_EXIST - open it if it exists, else fail. 
    23652370     OCI_FILE_EXCL - fail if the file exists, else create. 
    23662371     OCI_FILE_CREATE - open the file if it exists, and create it if it doesn't. 
    2367      OCI_FILE_APPEND - set the file pointer to the end of the file prior to  
     2372     OCI_FILE_APPEND - set the file pointer to the end of the file prior to 
    23682373                      writing(this flag can be OR'ed with OCI_FILE_EXIST or 
    23692374                      OCI_FILE_CREATE). 
    2370 type - file type. Valid values are OCI_FILE_TEXT, OCI_FILE_BIN,  
     2375type - file type. Valid values are OCI_FILE_TEXT, OCI_FILE_BIN, 
    23712376       OCI_FILE_STDIN, OCI_FILE_STDOUT and OCI_FILE_STDERR. 
    23722377       If any of the standard files are specified then filename, path, mode 
     
    23792384 
    23802385************************** OCIFileRead() ************************************ 
    2381     
     2386 
    23822387Name 
    23832388 OCIFileRead - Oracle Call Interface FILE i/o READ 
     
    23872392 
    23882393Syntax 
    2389  sword OCIFileRead ( dvoid            *hndl,  
     2394 sword OCIFileRead ( dvoid            *hndl, 
    23902395                     OCIError         *err, 
    23912396                     OCIFileObject    *filep, 
     
    24032408Parameters 
    24042409 hndl (IN) - the OCI environment or session handle. 
    2405  err (OUT) - the OCI error handle.  If  there is an error, it is recorded  
    2406  in err and this function returns OCI_ERROR.  Diagnostic information can be  
     2410 err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
     2411 in err and this function returns OCI_ERROR.  Diagnostic information can be 
    24072412 obtained by calling OCIErrorGet(). 
    24082413 filep (IN/OUT) - a File Object that uniquely references the file. 
    2409  bufp (IN) - the pointer to a buffer into which the data will be read. The  
    2410  length of the allocated memory is assumed to be bufl.  
    2411  bufl - the length of the buffer in bytes.  
     2414 bufp (IN) - the pointer to a buffer into which the data will be read. The 
     2415 length of the allocated memory is assumed to be bufl. 
     2416 bufl - the length of the buffer in bytes. 
    24122417 bytesread (OUT) - the number of bytes read. 
    24132418 
     
    24262431 
    24272432Syntax 
    2428  sword OCIFileSeek ( dvoid           *hndl,  
    2429                      OCIError        *err,   
     2433 sword OCIFileSeek ( dvoid           *hndl, 
     2434                     OCIError        *err, 
    24302435                     OCIFileObject   *filep, 
    24312436                     uword            origin, 
     
    24392444Parameters 
    24402445 hndl (IN) - the OCI environment or session handle. 
    2441  err (OUT) - the OCI error handle.  If  there is an error, it is recorded  
    2442  in err and this function returns OCI_ERROR.  Diagnostic information can be  
     2446 err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
     2447 in err and this function returns OCI_ERROR.  Diagnostic information can be 
    24432448 obtained by calling OCIErrorGet(). 
    24442449 filep (IN/OUT) - a file handle that uniquely references the file. 
    2445  origin - The starting point we want to seek from. NOTE: The starting  
    2446  point may be OCI_FILE_SEEK_BEGINNING (beginning), OCI_FILE_SEEK_CURRENT  
    2447  (current position), or OCI_FILE_SEEK_END (end of file).  
    2448  offset - The number of bytes from the origin we want to start reading from.  
    2449  dir - The direction we want to go from the origin. NOTE: The direction  
    2450  can be either OCI_FILE_FORWARD or OCI_FILE_BACKWARD.  
    2451   
     2450 origin - The starting point we want to seek from. NOTE: The starting 
     2451 point may be OCI_FILE_SEEK_BEGINNING (beginning), OCI_FILE_SEEK_CURRENT 
     2452 (current position), or OCI_FILE_SEEK_END (end of file). 
     2453 offset - The number of bytes from the origin we want to start reading from. 
     2454 dir - The direction we want to go from the origin. NOTE: The direction 
     2455 can be either OCI_FILE_FORWARD or OCI_FILE_BACKWARD. 
     2456 
    24522457Related Function 
    24532458 OCIFileOpen, OCIFileRead, OCIFileWrite 
     
    24642469 
    24652470Syntax 
    2466  sword OCIFileTerm ( dvoid *hndl,  
     2471 sword OCIFileTerm ( dvoid *hndl, 
    24672472                     OCIError *err ) 
    24682473 
     
    24712476 The function will return OCI_ERROR if any error is encountered, else 
    24722477 it will return OCI_ERROR. 
    2473   
     2478 
    24742479Parameters 
    24752480 hndl(IN) - OCI environment or session handle. 
    2476  err(OUT) - OCI error structure.  
    2477    
    2478 Related Functions  
    2479  OCIFileInit    
    2480   
    2481  
    2482 ********************************* OCIFileWrite() ****************************  
    2483  
    2484 Name  
     2481 err(OUT) - OCI error structure. 
     2482 
     2483Related Functions 
     2484 OCIFileInit 
     2485 
     2486 
     2487********************************* OCIFileWrite() **************************** 
     2488 
     2489Name 
    24852490 OCIFileWrite - Oracle Call Interface FILE i/o WRITE 
    24862491 
     
    24892494 
    24902495Syntax 
    2491  sword OCIFileWrite ( dvoid            *hndl,  
    2492                       OCIError         *err,   
     2496 sword OCIFileWrite ( dvoid            *hndl, 
     2497                      OCIError         *err, 
    24932498                      OCIFileObject    *filep, 
    2494                       dvoid            *bufp,  
     2499                      dvoid            *bufp, 
    24952500                      ub4               buflen 
    24962501                      ub4              *byteswritten ) 
     
    25032508Parameters 
    25042509 hndl (IN) - the OCI environment or session handle. 
    2505  err (OUT) - the OCI error handle.  If  there is an error, it is recorded  
    2506  in err and this function returns OCI_ERROR.  Diagnostic information can be  
     2510 err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
     2511 in err and this function returns OCI_ERROR.  Diagnostic information can be 
    25072512 obtained by calling OCIErrorGet(). 
    25082513 filep (IN/OUT) - a file handle that uniquely references the file. 
    2509  bufp (IN) - the pointer to a buffer from which the data will be written.  
     2514 bufp (IN) - the pointer to a buffer from which the data will be written. 
    25102515 The length of the allocated memory is assumed to be the value passed 
    2511  in bufl.  
     2516 in bufl. 
    25122517 bufl - the length of the buffer in bytes. 
    25132518 byteswritten (OUT) - the number of bytes written. 
    2514   
    2515 Related Functions 
    2516  OCIFileOpen, OCIFileSeek, OCIFileRead  
    2517  
    2518  
    2519  
    2520  
    2521  
    2522 OCIHandleAlloc()  
     2519 
     2520Related Functions 
     2521 OCIFileOpen, OCIFileSeek, OCIFileRead 
     2522 
     2523 
     2524 
     2525 
     2526 
     2527OCIHandleAlloc() 
    25232528Name 
    25242529OCI Get HaNDLe 
     
    25272532Syntax 
    25282533sword OCIHandleAlloc ( CONST dvoid   *parenth, 
    2529                      dvoid         **hndlpp,  
    2530                      ub4           type,  
     2534                     dvoid         **hndlpp, 
     2535                     ub4           type, 
    25312536                     size_t        xtramem_sz, 
    25322537                     dvoid         **usrmempp); 
    25332538Comments 
    2534 Returns a pointer to an allocated and initialized structure, corresponding to  
    2535 the type specified in type. A non-NULL handle is returned on success. Bind  
     2539Returns a pointer to an allocated and initialized structure, corresponding to 
     2540the type specified in type. A non-NULL handle is returned on success. Bind 
    25362541handle and define handles are allocated with respect to a statement handle. All 
    2537 other handles are allocated with respect to an environment handle which is  
     2542other handles are allocated with respect to an environment handle which is 
    25382543passed in as a parent handle. 
    2539 No diagnostics are available on error. This call returns OCI_SUCCESS if  
     2544No diagnostics are available on error. This call returns OCI_SUCCESS if 
    25402545successful, or OCI_INVALID_HANDLE if an out-of-memory error occurs. 
    2541 Handles must be allocated using OCIHandleAlloc() before they can be passed  
     2546Handles must be allocated using OCIHandleAlloc() before they can be passed 
    25422547into an OCI call. 
    25432548Parameters 
    2544 parenth (IN) - an environment or a statement handle.  
    2545 hndlpp (OUT) - returns a handle to a handle type.  
    2546 type (IN) - specifies the type of handle to be allocated. The specific types  
    2547 are:  
    2548 OCI_HTYPE_ERROR - specifies generation of an error report handle of  
     2549parenth (IN) - an environment or a statement handle. 
     2550hndlpp (OUT) - returns a handle to a handle type. 
     2551type (IN) - specifies the type of handle to be allocated. The specific types 
     2552are: 
     2553OCI_HTYPE_ERROR - specifies generation of an error report handle of 
    25492554C type OCIError 
    2550 OCI_HTYPE_SVCCTX - specifies generation of a service context handle  
     2555OCI_HTYPE_SVCCTX - specifies generation of a service context handle 
    25512556of C type OCISvcCtx 
    2552 OCI_HTYPE_STMT - specifies generation of a statement (application  
     2557OCI_HTYPE_STMT - specifies generation of a statement (application 
    25532558request) handle of C type OCIStmt 
    2554 OCI_HTYPE_BIND - specifies generation of a bind information handle  
     2559OCI_HTYPE_BIND - specifies generation of a bind information handle 
    25552560of C type OCIBind 
    2556 OCI_HTYPE_DEFINE - specifies generation of a column definition  
     2561OCI_HTYPE_DEFINE - specifies generation of a column definition 
    25572562handle of C type OCIDefine 
    2558 OCI_HTYPE_DESCRIBE  - specifies generation of a select list  
     2563OCI_HTYPE_DESCRIBE  - specifies generation of a select list 
    25592564description handle of C type OCIDesc 
    2560 OCI_HTYPE_SERVER - specifies generation of a server context handle  
     2565OCI_HTYPE_SERVER - specifies generation of a server context handle 
    25612566of C type OCIServer 
    2562 OCI_HTYPE_SESSION - specifies generation of an authentication  
     2567OCI_HTYPE_SESSION - specifies generation of an authentication 
    25632568context handle of C type OCISession 
    25642569OCI_HTYPE_TRANS - specifies generation of a transaction context 
    25652570handle of C type OCITrans 
    2566 OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex  
     2571OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex 
    25672572object retrieval handle of C type OCIComplexObject 
    2568 OCI_HTYPE_SECURITY - specifies generation of a security handle of C  
     2573OCI_HTYPE_SECURITY - specifies generation of a security handle of C 
    25692574type OCISecurity 
    25702575xtramem_sz (IN) - specifies an amount of user memory to be allocated. 
    2571 usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz  
    2572 allocated by the call for the user.  
     2576usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
     2577allocated by the call for the user. 
    25732578Related Functions 
    25742579OCIHandleFree() 
     
    25852590                    ub4       type); 
    25862591Comments 
    2587 This call frees up storage associated with a handle, corresponding to the type  
     2592This call frees up storage associated with a handle, corresponding to the type 
    25882593specified in the type parameter. 
    25892594This call returns either OCI_SUCCESS or OCI_INVALID_HANDLE. 
    2590 All handles must be explicitly deallocated. OCI will not deallocate a child  
     2595All handles must be explicitly deallocated. OCI will not deallocate a child 
    25912596handle if the parent is deallocated. 
    25922597Parameters 
    25932598hndlp (IN) - an opaque pointer to some storage. 
    2594 type (IN) - specifies the type of storage to be allocated. The specific types  
     2599type (IN) - specifies the type of storage to be allocated. The specific types 
    25952600are: 
    25962601OCI_HTYPE_ENV - an environment handle 
     
    26192624Syntax 
    26202625sword OCIInitialize ( ub4           mode, 
    2621                     CONST dvoid   *ctxp,  
    2622                     CONST dvoid   *(*malocfp)  
     2626                    CONST dvoid   *ctxp, 
     2627                    CONST dvoid   *(*malocfp) 
    26232628                                  ( dvoid *ctxp, 
    26242629                                    size_t size ), 
     
    26322637Comments 
    26332638This call initializes the OCI process environment. 
    2634 OCIInitialize() must be invoked before any other OCI call.  
     2639OCIInitialize() must be invoked before any other OCI call. 
    26352640Parameters 
    26362641mode (IN) - specifies initialization of the mode. The valid modes are: 
    26372642OCI_DEFAULT - default mode. 
    2638 OCI_THREADED - threaded environment. In this mode, internal data  
    2639 structures are protected from concurrent accesses by multiple threads.  
    2640 OCI_OBJECT - will use navigational object interface.  
    2641 ctxp (IN) - user defined context for the memory call back routines.  
    2642 malocfp (IN) - user-defined memory allocation function. If mode is  
     2643OCI_THREADED - threaded environment. In this mode, internal data 
     2644structures are protected from concurrent accesses by multiple threads. 
     2645OCI_OBJECT - will use navigational object interface. 
     2646ctxp (IN) - user defined context for the memory call back routines. 
     2647malocfp (IN) - user-defined memory allocation function. If mode is 
    26432648OCI_THREADED, this memory allocation routine must be thread safe. 
    26442649ctxp - context pointer for the user-defined memory allocation function. 
    2645 size - size of memory to be allocated by the user-defined memory  
     2650size - size of memory to be allocated by the user-defined memory 
    26462651allocation function 
    2647 ralocfp (IN) - user-defined memory re-allocation function. If mode is  
     2652ralocfp (IN) - user-defined memory re-allocation function. If mode is 
    26482653OCI_THREADED, this memory allocation routine must be thread safe. 
    2649 ctxp - context pointer for the user-defined memory reallocation  
     2654ctxp - context pointer for the user-defined memory reallocation 
    26502655function. 
    26512656memp - pointer to memory block 
    26522657newsize - new size of memory to be allocated 
    2653 mfreefp (IN) - user-defined memory free function. If mode is  
     2658mfreefp (IN) - user-defined memory free function. If mode is 
    26542659OCI_THREADED, this memory free routine must be thread safe. 
    26552660ctxp - context pointer for the user-defined memory free function. 
    26562661memptr - pointer to memory to be freed 
    26572662Example 
    2658 See the description of OCIStmtPrepare() on page 13-96 for an example showing  
     2663See the description of OCIStmtPrepare() on page 13-96 for an example showing 
    26592664the use of OCIInitialize(). 
    26602665Related Functions 
     
    26912696OCI Application context Set 
    26922697Purpose 
    2693 Set an attribute and its value for a particular application context  
     2698Set an attribute and its value for a particular application context 
    26942699     namespace 
    26952700Syntax 
     
    27012706Please note that the information set on the session handle is sent to the server during the next OCIStatementExecute or OCISessionBegin. 
    27022707 
    2703 This information is cleared from the session handle, once the information  
     2708This information is cleared from the session handle, once the information 
    27042709 has been sent over to the server,and should be setup again if needed. 
    27052710 
     
    27162721 
    27172722Returns 
    2718  error if any  
     2723 error if any 
    27192724Example 
    27202725 
     
    27402745                     attributes are cleared 
    27412746 nsptrlen (IN)     - length of the nsptr 
    2742  errhp    (OUT)    - Error from the API  
     2747 errhp    (OUT)    - Error from the API 
    27432748 mode     (IN)     - mode of operation (OCI_DEFAULT) 
    27442749Example 
     
    27492754Related Functions 
    27502755 OCIAppCtxSet 
    2751 ---------------------- OCIIntervalAssign ---------------------------------  
    2752 sword OCIIntervalAssign(dvoid *hndl, OCIError *err,  
     2756---------------------- OCIIntervalAssign --------------------------------- 
     2757sword OCIIntervalAssign(dvoid *hndl, OCIError *err, 
    27532758                    CONST OCIInterval *inpinter, OCIInterval *outinter ); 
    27542759 
     
    27612766                The error recorded in 'err' can be retrieved by calling 
    27622767                OCIErrorGet(). 
    2763     (IN)  inpinter - Input Interval  
    2764     (OUT) outinter - Output Interval  
     2768    (IN)  inpinter - Input Interval 
     2769    (OUT) outinter - Output Interval 
    27652770  RETURNS 
    27662771     OCI_INVALID_HANDLE if 'err' is NULL. 
    27672772     OCI_SUCCESS otherwise 
    27682773 
    2769  ---------------------- OCIIntervalCheck ------------------------------------  
     2774 ---------------------- OCIIntervalCheck ------------------------------------ 
    27702775sword OCIIntervalCheck(dvoid *hndl, OCIError *err, CONST OCIInterval *interval, 
    27712776                         ub4 *valid ); 
     
    27792784                The error recorded in 'err' can be retrieved by calling 
    27802785                OCIErrorGet(). 
    2781     (IN)  interval - Interval to be checked  
     2786    (IN)  interval - Interval to be checked 
    27822787    (OUT) valid     - Zero if the interval is valid, else returns an Ored 
    27832788        combination of the following codes. 
     
    28002805   OCI_INTER_FRACSEC_BELOW_VALID 0x2000        Bad fractional second Low/High 
    28012806 
    2802          
     2807 
    28032808  RETURNS 
    28042809    OCI_SUCCESS if interval is okay 
    28052810    OCI_INVALID_HANDLE if 'err' is NULL. 
    28062811 
    2807  ---------------------- OCIIntervalCompare -----------------------------------  
    2808 sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1,  
     2812 ---------------------- OCIIntervalCompare ----------------------------------- 
     2813sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1, 
    28092814                        OCIInterval *inter2, sword *result ); 
    28102815 
    28112816  DESCRIPTION 
    2812         Compares two intervals, returns 0 if equal, -1 if inter1 < inter2,  
     2817        Compares two intervals, returns 0 if equal, -1 if inter1 < inter2, 
    28132818        1 if inter1 > inter2 
    28142819  PARAMETERS 
    2815      hndl (IN) - Session/Env handle.  
     2820     hndl (IN) - Session/Env handle. 
    28162821     err (IN/OUT) - error handle. If there is an error, it is 
    28172822                recorded in 'err' and this function returns OCI_ERROR. 
    28182823                The error recorded in 'err' can be retrieved by calling 
    28192824                OCIErrorGet(). 
    2820      inter1  (IN)   - Interval to be compared  
    2821      inter2  (IN)   - Interval to be compared  
    2822      result  (OUT)  -   comparison result, 0 if equal, -1 if inter1 < inter2,  
     2825     inter1  (IN)   - Interval to be compared 
     2826     inter2  (IN)   - Interval to be compared 
     2827     result  (OUT)  -   comparison result, 0 if equal, -1 if inter1 < inter2, 
    28232828                        1 if inter1 > inter2 
    28242829 
     
    28262831     OCI_SUCCESS on success 
    28272832     OCI_INVALID_HANDLE if 'err' is NULL. 
    2828      OCI_ERROR if  
     2833     OCI_ERROR if 
    28292834        the two input datetimes are not mutually comparable. 
    28302835 
    2831 ---------------------- OCIIntervalDivide ------------------------------------  
    2832 sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend,  
     2836---------------------- OCIIntervalDivide ------------------------------------ 
     2837sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend, 
    28332838                OCINumber *divisor, OCIInterval *result ); 
    2834   
     2839 
    28352840  DESCRIPTION 
    28362841     Divides an interval by an Oracle Number to produce an interval 
    28372842  PARAMETERS 
    2838         hndl (IN) - Session/Env handle.  
     2843        hndl (IN) - Session/Env handle. 
    28392844     err (IN/OUT) - error handle. If there is an error, it is 
    28402845                recorded in 'err' and this function returns OCI_ERROR. 
    28412846                The error recorded in 'err' can be retrieved by calling 
    28422847                OCIErrorGet(). 
    2843      dividend  (IN)   - Interval to be divided  
    2844      divisor   (IN)   - Oracle Number dividing `dividend'  
    2845      result    (OUT)  - resulting interval (dividend / divisor)  
     2848     dividend  (IN)   - Interval to be divided 
     2849     divisor   (IN)   - Oracle Number dividing `dividend' 
     2850     result    (OUT)  - resulting interval (dividend / divisor) 
    28462851  RETURNS 
    28472852     OCI_SUCCESS on success 
    28482853     OCI_INVALID_HANDLE if 'err' is NULL. 
    28492854 
    2850  ---------------------- OCIIntervalFromNumber --------------------  
    2851 sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err,  
     2855 ---------------------- OCIIntervalFromNumber -------------------- 
     2856sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err, 
    28522857               OCIInterval *inter, OCINumber *number); 
    28532858  DESCRIPTION 
    28542859    Converts an interval to an Oracle Number 
    28552860  PARAMETERS 
    2856      hndl (IN) - Session/Env handle.  
     2861     hndl (IN) - Session/Env handle. 
    28572862    err (IN/OUT) - error handle. If there is an error, it is 
    28582863                recorded in 'err' and this function returns OCI_ERROR. 
    28592864                The error recorded in 'err' can be retrieved by calling 
    28602865                OCIErrorGet(). 
    2861     (OUT)  interval - Interval to be converted  
     2866    (OUT)  interval - Interval to be converted 
    28622867    (IN) number - Oracle number result  (in years for YEARMONTH interval 
    28632868                     and in days for DAYSECOND) 
    28642869  RETURNS 
    2865     OCI_SUCCESS on success  
     2870    OCI_SUCCESS on success 
    28662871    OCI_INVALID_HANDLE if 'err' is NULL. 
    28672872    OCI_ERROR on error. 
     
    28702875    the unit chosen is hours) will be included in the Oracle number produced. 
    28712876    Excess precision will be truncated. 
    2872   
    2873  ---------------------- OCIIntervalFromText ---------------------------------  
    2874 sword OCIIntervalFromText( dvoid *hndl, OCIError *err, CONST OraText *inpstr,  
     2877 
     2878 ---------------------- OCIIntervalFromText --------------------------------- 
     2879sword OCIIntervalFromText( dvoid *hndl, OCIError *err, CONST OraText *inpstr, 
    28752880                size_t str_len, OCIInterval *result ); 
    28762881 
     
    28802885  PARAMETERS 
    28812886 
    2882      hndl (IN) - Session/Env handle.  
     2887     hndl (IN) - Session/Env handle. 
    28832888     err (IN/OUT) - error handle. If there is an error, it is 
    28842889                recorded in 'err' and this function returns OCI_ERROR. 
    28852890                The error recorded in 'err' can be retrieved by calling 
    28862891                OCIErrorGet(). 
    2887     (IN)  inpstr - Input string  
    2888     (IN)  str_len - Length of input string  
    2889     (OUT) result - Resultant interval  
     2892    (IN)  inpstr - Input string 
     2893    (IN)  str_len - Length of input string 
     2894    (OUT) result - Resultant interval 
    28902895  RETURNS 
    28912896    OCI_SUCCESS on success 
     
    29042909 
    29052910 
    2906  ---------------------- OCIIntervalGetDaySecond --------------------  
     2911 ---------------------- OCIIntervalGetDaySecond -------------------- 
    29072912 
    29082913  DESCRIPTION 
     
    29132918                recorded in 'err' and this function returns OCI_ERROR. 
    29142919                The error recorded in 'err' can be retrieved by calling 
    2915                 OCIErrorGet().      
     2920                OCIErrorGet(). 
    29162921        day     (OUT) - number of days 
    29172922        hour    (OUT) - number of hours 
     
    29192924        sec     (OUT) - number of secs 
    29202925        fsec    (OUT) - number of fractional seconds 
    2921         result     (IN)  - resulting interval  
     2926        result     (IN)  - resulting interval 
    29222927  RETURNS 
    29232928        OCI_SUCCESS on success 
     
    29252930 
    29262931 
    2927  ---------------------- OCIIntervalGetYearMonth --------------------  
     2932 ---------------------- OCIIntervalGetYearMonth -------------------- 
    29282933 
    29292934  DESCRIPTION 
     
    29342939                recorded in 'err' and this function returns OCI_ERROR. 
    29352940                The error recorded in 'err' can be retrieved by calling 
    2936                 OCIErrorGet().      
     2941                OCIErrorGet(). 
    29372942        year    (OUT)   - year value 
    29382943        month   (OUT)   - month value 
    2939         result     (IN)  - resulting interval  
     2944        result     (IN)  - resulting interval 
    29402945  RETURNS 
    29412946        OCI_SUCCESS on success 
     
    29452950 
    29462951-------------------------- OCIIntervalAdd ------------------------------ 
    2947 sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1,  
     2952sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1, 
    29482953                        OCIInterval *addend2, OCIInterval *result ); 
    2949 NAME OCIIntervalAdd - Adds two intervals  
     2954NAME OCIIntervalAdd - Adds two intervals 
    29502955PARAMETERS 
    2951 hndl (IN) - Session/Env handle.  
     2956hndl (IN) - Session/Env handle. 
    29522957err (IN/OUT) - error handle. If there is an error, it is 
    29532958                recorded in 'err' and this function returns OCI_ERROR. 
    29542959                The error recorded in 'err' can be retrieved by calling 
    29552960                OCIErrorGet(). 
    2956 addend1  (IN)   - Interval to be added  
    2957 addend2  (IN)   - Interval to be added  
    2958 result   (OUT)  - resulting interval (addend1 + addend2)  
     2961addend1  (IN)   - Interval to be added 
     2962addend2  (IN)   - Interval to be added 
     2963result   (OUT)  - resulting interval (addend1 + addend2) 
    29592964DESCRIPTION 
    29602965     Adds two intervals to produce a resulting interval 
     
    29692974     The two input intervals must be mutually comparable 
    29702975 
    2971  ---------------------- OCIIntervalSubtract -------------------------------  
    2972 sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend,  
     2976 ---------------------- OCIIntervalSubtract ------------------------------- 
     2977sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend, 
    29732978                            OCIInterval *subtrahend, OCIInterval *result ); 
    29742979NAME - OCIIntervalSubtract - subtracts two intervals 
     
    29782983                recorded in 'err' and this function returns OCI_ERROR. 
    29792984                The error recorded in 'err' can be retrieved by calling 
    2980                 OCIErrorGet().      
    2981 minuend    (IN)   - interval to be subtracted from  
    2982 subtrahend (IN)   - interval subtracted from minuend  
    2983 result     (OUT)  - resulting interval (minuend - subtrahend)  
     2985                OCIErrorGet(). 
     2986minuend    (IN)   - interval to be subtracted from 
     2987subtrahend (IN)   - interval subtracted from minuend 
     2988result     (OUT)  - resulting interval (minuend - subtrahend) 
    29842989DESCRIPTION 
    29852990     Subtracts two intervals and stores the result in an interval 
     
    29892994        OCI_ERROR if: 
    29902995           the two input intervals are not mutually comparable. 
    2991            the resulting leading field would go below SB4MINVAL  
     2996           the resulting leading field would go below SB4MINVAL 
    29922997           the resulting leading field would go above SB4MAXVAL 
    29932998 
    2994 ---------------------- OCIIntervalMultiply ---------------------------------  
     2999---------------------- OCIIntervalMultiply --------------------------------- 
    29953000sword OCIIntervalMultiply(dvoid *hndl, OCIError *err, CONST OCIInterval *inter, 
    29963001                        OCINumber *nfactor, OCIInterval *result ); 
     
    29993004     Multiplies an interval by an Oracle Number to produce an interval 
    30003005  PARAMETERS 
    3001         hndl (IN) - Session/Env handle.  
     3006        hndl (IN) - Session/Env handle. 
    30023007     err (IN/OUT) - error handle. If there is an error, it is 
    30033008                recorded in 'err' and this function returns OCI_ERROR. 
    30043009                The error recorded in 'err' can be retrieved by calling 
    30053010                OCIErrorGet(). 
    3006      inter  (IN)   - Interval to be multiplied  
    3007      nfactor  (IN)   - Oracle Number to be multiplied  
    3008      result   (OUT)  - resulting interval (ifactor * nfactor)  
     3011     inter  (IN)   - Interval to be multiplied 
     3012     nfactor  (IN)   - Oracle Number to be multiplied 
     3013     result   (OUT)  - resulting interval (ifactor * nfactor) 
    30093014  RETURNS 
    30103015     OCI_SUCCESS on success 
     
    30153020 
    30163021 
    3017  ---------------------- OCIIntervalSetDaySecond --------------------  
     3022 ---------------------- OCIIntervalSetDaySecond -------------------- 
    30183023 
    30193024  DESCRIPTION 
     
    30243029                recorded in 'err' and this function returns OCI_ERROR. 
    30253030                The error recorded in 'err' can be retrieved by calling 
    3026                 OCIErrorGet().      
     3031                OCIErrorGet(). 
    30273032        day     (IN) - number of days 
    30283033        hour    (IN) - number of hours 
     
    30303035        sec     (IN) - number of secs 
    30313036        fsec    (IN) - number of fractional seconds 
    3032         result     (OUT)  - resulting interval  
     3037        result     (OUT)  - resulting interval 
    30333038  RETURNS 
    30343039        OCI_SUCCESS on success 
     
    30363041 
    30373042 
    3038  ---------------------- OCIIntervalSetYearMonth --------------------  
     3043 ---------------------- OCIIntervalSetYearMonth -------------------- 
    30393044 
    30403045  DESCRIPTION 
     
    30453050                recorded in 'err' and this function returns OCI_ERROR. 
    30463051                The error recorded in 'err' can be retrieved by calling 
    3047                 OCIErrorGet().      
     3052                OCIErrorGet(). 
    30483053        year    (IN)   - year value 
    30493054        month   (IN)   - month value 
    3050         result     (OUT)  - resulting interval  
     3055        result     (OUT)  - resulting interval 
    30513056  RETURNS 
    30523057        OCI_SUCCESS on success 
     
    30613066    Converts an interval to an Oracle Number 
    30623067  PARAMETERS 
    3063      hndl (IN) - Session/Env handle.  
     3068     hndl (IN) - Session/Env handle. 
    30643069    err (IN/OUT) - error handle. If there is an error, it is 
    30653070                recorded in 'err' and this function returns OCI_ERROR. 
    30663071                The error recorded in 'err' can be retrieved by calling 
    30673072                OCIErrorGet(). 
    3068     (IN)  inter - Interval to be converted  
     3073    (IN)  inter - Interval to be converted 
    30693074    (OUT) number - Oracle number result  (in years for YEARMONTH interval 
    30703075                     and in days for DAYSECOND) 
    30713076  RETURNS 
    30723077    OCI_INVALID_HANDLE if 'err' is NULL. 
    3073     OCI_SUCCESS on success  
     3078    OCI_SUCCESS on success 
    30743079  NOTES 
    30753080    Fractional portions of the date (for instance, minutes and seconds if 
    30763081    the unit chosen is hours) will be included in the Oracle number produced. 
    30773082    Excess precision will be truncated. 
    3078   
     3083 
    30793084------------------------------- OCIIntervalToText ------------------------- 
    30803085sword OCIIntervalToText( dvoid *hndl, OCIError *err, CONST OCIInterval *inter, 
    3081                         ub1 lfprec, ub1 fsprec, OraText *buffer,  
     3086                        ub1 lfprec, ub1 fsprec, OraText *buffer, 
    30823087                        size_t buflen, size_t *resultlen ); 
    30833088 
     
    30853090    Given an interval, produces a string representing the interval. 
    30863091  PARAMETERS 
    3087      hndl (IN) - Session/Env handle.  
     3092     hndl (IN) - Session/Env handle. 
    30883093    err (IN/OUT) - error handle. If there is an error, it is 
    30893094                recorded in 'err' and this function returns OCI_ERROR. 
    30903095                The error recorded in 'err' can be retrieved by calling 
    30913096                OCIErrorGet(). 
    3092     (IN)  inter - Interval to be converted  
     3097    (IN)  inter - Interval to be converted 
    30933098    (IN)  lfprec  - Leading field precision. Number of digits used to 
    30943099                represent the leading field. 
    30953100    (IN)  fsprec  - Fractional second precision of the interval. Number of 
    30963101                digits used to represent the fractional seconds. 
    3097     (OUT) buffer - buffer to hold result  
    3098     (IN)  buflen - length of above buffer  
    3099     (OUT) resultlen - length of result placed into buffer  
    3100   
     3102    (OUT) buffer - buffer to hold result 
     3103    (IN)  buflen - length of above buffer 
     3104    (OUT) resultlen - length of result placed into buffer 
     3105 
    31013106  RETURNS 
    31023107    OCI_SUCCESS on success 
    31033108    OCI_INVALID_HANDLE if 'err' is NULL. 
    3104     OCI_ERROR  
     3109    OCI_ERROR 
    31053110        if the buffer is not large enough to hold the result 
    31063111  NOTES 
     
    31103115    DAY-TIME intervals (where optional fields are surrounded by brackets). 
    31113116 
    3112  ---------------------- OCIIntervalFromTZ --------------------  
     3117 ---------------------- OCIIntervalFromTZ -------------------- 
    31133118sword OCIIntervalFromTZ(dvoid *hndl, OCIError *err, CONST oratext *inpstring, 
    31143119                        size_t str_len, OCIInterval *result); 
     
    31263131    inpstring (IN) - pointer to the input string 
    31273132    str_len (IN) - inpstring length 
    3128     result - Output Interval  
     3133    result - Output Interval 
    31293134  RETURNS 
    31303135     OCI_SUCCESS on success 
     
    31373142 
    31383143 ----------------------- OCIKerbAttrSet --------------------- 
    3139 sword OCIKerbAttrSet(OCISession *trgthndlp, ub4 auth_mode,  
    3140                      ub1 *ftgt_ticket, ub4 ftgt_ticket_len,  
    3141                      ub1 *ftgt_sesskey, ub4 ftgt_sesskey_len,  
    3142                      ub2 ftgt_keytype, ub4 ftgt_ticket_flags,  
    3143                      sb4 ftgt_auth_time, sb4 ftgt_start_time,  
    3144                      sb4 ftgt_end_time, sb4 ftgt_renew_time,  
     3144sword OCIKerbAttrSet(OCISession *trgthndlp, ub4 auth_mode, 
     3145                     ub1 *ftgt_ticket, ub4 ftgt_ticket_len, 
     3146                     ub1 *ftgt_sesskey, ub4 ftgt_sesskey_len, 
     3147                     ub2 ftgt_keytype, ub4 ftgt_ticket_flags, 
     3148                     sb4 ftgt_auth_time, sb4 ftgt_start_time, 
     3149                     sb4 ftgt_end_time, sb4 ftgt_renew_time, 
    31453150                     text *ftgt_principal, ub4 ftgt_principal_len, 
    3146                      text *ftgt_realm, ub4 ftgt_realm_len,  
     3151                     text *ftgt_realm, ub4 ftgt_realm_len, 
    31473152                     OCIError *errhp); 
    31483153 
     
    31563161                    be set. Options are: 
    31573162 
    3158                     OCI_KERBCRED_PROXY  
     3163                    OCI_KERBCRED_PROXY 
    31593164                                         - Set Kerberos credentials for use with 
    31603165                                           proxy authentication. 
    3161                     OCI_KERBCRED_CLIENT_IDENTIFIER  
     3166                    OCI_KERBCRED_CLIENT_IDENTIFIER 
    31623167                                         - Set Kerberos credentials for use 
    31633168                                           with secure client identifier. 
     
    31963201                     Lda_Def    *ldap ); 
    31973202Comments 
    3198 Converts a V7 Lda_Def to a V8 service context handle. The action of this call  
    3199 can be reversed by passing the resulting service context handle to the  
     3203Converts a V7 Lda_Def to a V8 service context handle. The action of this call 
     3204can be reversed by passing the resulting service context handle to the 
    32003205OCISvcCtxToLda() function. 
    32013206Parameters 
    3202 svchpp (IN/OUT) - the service context handle.  
    3203 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3207svchpp (IN/OUT) - the service context handle. 
     3208errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    32043209diagnostic information in the event of an error. 
    3205 ldap (IN/OUT) - the V7 logon data area returned by OCISvcCtxToLda() from  
     3210ldap (IN/OUT) - the V7 logon data area returned by OCISvcCtxToLda() from 
    32063211this service context. 
    32073212Related Functions 
     
    32173222 
    32183223Purpose 
    3219 Appends a LOB value at the end of another LOB.  
     3224Appends a LOB value at the end of another LOB. 
    32203225 
    32213226Syntax 
     
    32253230                   OCILobLocator    *src_locp ); 
    32263231Comments 
    3227 Appends a LOB value at the end of LOB. The data is  
    3228 copied from the source to the destination at the end of the destination. The  
    3229 source and the destination must already exist. The destination LOB is  
     3232Appends a LOB value at the end of LOB. The data is 
     3233copied from the source to the destination at the end of the destination. The 
     3234source and the destination must already exist. The destination LOB is 
    32303235extended to accommodate the newly written data. 
    32313236 
    3232 It is an error to extend the destination LOB beyond the maximum length  
    3233 allowed or to try to copy from a NULL LOB.  
    3234  
    3235 Parameters 
    3236 svchp (IN) - the service context handle.  
    3237 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    3238 diagnostic information in the event of an error.  
    3239 dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB.  
    3240 src_locp (IN/OUT) - a locator uniquely referencing the source LOB.  
     3237It is an error to extend the destination LOB beyond the maximum length 
     3238allowed or to try to copy from a NULL LOB. 
     3239 
     3240Parameters 
     3241svchp (IN) - the service context handle. 
     3242errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     3243diagnostic information in the event of an error. 
     3244dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
     3245src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
    32413246 
    32423247Related Functions 
     
    32573262 
    32583263Syntax 
    3259 sword OCILobAssign ( OCIEnv                *envhp,  
    3260                      OCIError              *errhp,  
    3261                      CONST OCILobLocator   *src_locp,  
     3264sword OCILobAssign ( OCIEnv                *envhp, 
     3265                     OCIError              *errhp, 
     3266                     CONST OCILobLocator   *src_locp, 
    32623267                     OCILobLocator         **dst_locpp ); 
    32633268 
    32643269Comments 
    3265 Assign source locator to destination locator.  After the assignment, both  
    3266 locators refer to the same LOB data.  For internal LOBs, the source locator's  
    3267 LOB data gets copied to the destination locator's LOB data only when the  
    3268 destination locator gets stored in the table.  Therefore, issuing a flush of  
    3269 the object containing the destination locator will copy the LOB data. For  
     3270Assign source locator to destination locator.  After the assignment, both 
     3271locators refer to the same LOB data.  For internal LOBs, the source locator's 
     3272LOB data gets copied to the destination locator's LOB data only when the 
     3273destination locator gets stored in the table.  Therefore, issuing a flush of 
     3274the object containing the destination locator will copy the LOB data. For 
    32703275FILEs only the locator that refers to the OS file is copied to the table. The 
    32713276OS file is not copied. 
     
    32763281Parameters 
    32773282envhp (IN/OUT) - OCI environment handle initialized in object mode. 
    3278 errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded  
    3279 in errhp and this function returns OCI_ERROR. Diagnostic information can be  
     3283errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
     3284in errhp and this function returns OCI_ERROR. Diagnostic information can be 
    32803285obtained by calling OCIErrorGet(). 
    32813286src_locp (IN) - LOB locator to copy from. 
    3282 dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space  
     3287dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
    32833288for the OCILobLocator by calling OCIDescriptorAlloc(). 
    32843289 
     
    32993304 
    33003305Syntax 
    3301 sword OCILobCharSetForm ( OCIEnv                    *envhp,  
    3302                           OCIError                  *errhp,  
    3303                           CONST OCILobLocator       *locp,  
     3306sword OCILobCharSetForm ( OCIEnv                    *envhp, 
     3307                          OCIError                  *errhp, 
     3308                          CONST OCILobLocator       *locp, 
    33043309                          ub1                       *csfrm ); 
    33053310 
    33063311Comments 
    3307 Returns the character set form of the input LOB locator in the csfrm output  
    3308 parameter.  
     3312Returns the character set form of the input LOB locator in the csfrm output 
     3313parameter. 
    33093314 
    33103315Parameters 
    33113316envhp (IN/OUT) - OCI environment handle initialized in object mode. 
    3312 errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it  
    3313 is recorded in err and this function returns OCI_ERROR. Diagnostic  
     3317errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
     3318is recorded in err and this function returns OCI_ERROR. Diagnostic 
    33143319information can be obtained by calling OCIErrorGet(). 
    33153320locp (IN) - LOB locator for which to get the character set form. 
    3316 csfrm(OUT) - character set form of the input LOB locator.  If the input  
    3317 locator is for a BLOB or a BFILE, csfrm is set to 0 since there is no concept  
    3318 of a character set for binary LOBs/FILEs.  The caller must allocate space for  
     3321csfrm(OUT) - character set form of the input LOB locator.  If the input 
     3322locator is for a BLOB or a BFILE, csfrm is set to 0 since there is no concept 
     3323of a character set for binary LOBs/FILEs.  The caller must allocate space for 
    33193324the csfrm (ub1) and not write into the space. 
    33203325See also 
     
    33323337 
    33333338Syntax 
    3334 sword OCILobCharSetId ( OCIEnv                    *envhp,  
    3335                         OCIError                  *errhp,  
    3336                         CONST OCILobLocator       *locp,  
     3339sword OCILobCharSetId ( OCIEnv                    *envhp, 
     3340                        OCIError                  *errhp, 
     3341                        CONST OCILobLocator       *locp, 
    33373342                        ub2                       *csid ); 
    33383343 
    33393344Comments 
    3340 Returns the character set ID of the input LOB locator in the cid output  
    3341 parameter.  
     3345Returns the character set ID of the input LOB locator in the cid output 
     3346parameter. 
    33423347 
    33433348Parameters 
    33443349envhp (IN/OUT) - OCI environment handle initialized in object mode. 
    3345 errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it  
    3346 is recorded in err and this function returns OCI_ERROR. Diagnostic  
     3350errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
     3351is recorded in err and this function returns OCI_ERROR. Diagnostic 
    33473352information can be obtained by calling OCIErrorGet(). 
    33483353locp (IN) - LOB locator for which to get the character set ID. 
    3349 csid (OUT) - character set ID of the input LOB locator.  If the input locator  
    3350 is for a BLOB or a BFILE, csid is set to 0 since there is no concept of a  
    3351 character set for binary LOBs/FILEs.  The caller must allocate space for the  
     3354csid (OUT) - character set ID of the input LOB locator.  If the input locator 
     3355is for a BLOB or a BFILE, csid is set to 0 since there is no concept of a 
     3356character set for binary LOBs/FILEs.  The caller must allocate space for the 
    33523357character set id of type ub2 and not write into the space. 
    33533358 
     
    33753380 
    33763381Comments 
    3377 Copies a portion of a LOB value into another LOB as specified. The data  
    3378 is copied from the source to the destination. The source (src_locp) and the  
     3382Copies a portion of a LOB value into another LOB as specified. The data 
     3383is copied from the source to the destination. The source (src_locp) and the 
    33793384destination (dlopb) LOBs must already exist. 
    3380 If the data already exists at the destination's start position, it is  
    3381 overwritten with the source data. If the destination's start position is  
     3385If the data already exists at the destination's start position, it is 
     3386overwritten with the source data. If the destination's start position is 
    33823387beyond the end of the current data, a hole is created from the end of the data 
    3383 to the beginning of the newly written data from the source. The destination  
    3384 LOB is extended to accommodate the newly written data if it extends  
    3385 beyond the current length of the destination LOB.  
    3386 It is an error to extend the destination LOB beyond the maximum length  
     3388to the beginning of the newly written data from the source. The destination 
     3389LOB is extended to accommodate the newly written data if it extends 
     3390beyond the current length of the destination LOB. 
     3391It is an error to extend the destination LOB beyond the maximum length 
    33873392allowed or to try to copy from a NULL LOB. 
    33883393Parameters 
    3389 svchp (IN) - the service context handle.  
    3390 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    3391 diagnostic information in the event of an error.  
    3392 dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB.  
    3393 src_locp (IN/OUT) - a locator uniquely referencing the source LOB.  
     3394svchp (IN) - the service context handle. 
     3395errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     3396diagnostic information in the event of an error. 
     3397dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
     3398src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
    33943399amount (IN) - the number of character or bytes, as appropriate, to be copied. 
    3395 dst_offset (IN) - this is the absolute offset for the destination LOB.  
    3396 For character LOBs it is the number of characters from the beginning of the  
    3397 LOB at which to begin writing. For binary LOBs it is the number of bytes from  
     3400dst_offset (IN) - this is the absolute offset for the destination LOB. 
     3401For character LOBs it is the number of characters from the beginning of the 
     3402LOB at which to begin writing. For binary LOBs it is the number of bytes from 
    33983403the beginning of the lob from which to begin reading. The offset starts at 1. 
    3399 src_offset (IN) - this is the absolute offset for the source LOB.  
    3400 For character LOBs it is the number of characters from the beginning of the  
     3404src_offset (IN) - this is the absolute offset for the source LOB. 
     3405For character LOBs it is the number of characters from the beginning of the 
    34013406LOB, for binary LOBs it is the number of bytes. Starts at 1. 
    34023407 
    3403 See Also  
     3408See Also 
    34043409OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim() 
    34053410 
     
    34243429 
    34253430Comments 
    3426 svchp (IN) - the service context handle.  
    3427 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    3428 diagnostic information in the event of an error.  
     3431svchp (IN) - the service context handle. 
     3432errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     3433diagnostic information in the event of an error. 
    34293434locp (IN/OUT) - a locator which points to the temporary Lob 
    34303435csid (IN) - the character set id 
    34313436csfrm(IN) - the character set form 
    3432 lobtype (IN) - the lob type - one of the three constants OCI_TEMP_BLOB,  
     3437lobtype (IN) - the lob type - one of the three constants OCI_TEMP_BLOB, 
    34333438               OCI_TEMP_CLOB and OCI_TEMP_NCLOB 
    34343439cache(IN)-  TRUE if the temporary LOB goes through the cache; FALSE, if not. 
    3435 duration(IN)- duration of the temporary LOB; Can be a valid duration id or one  
     3440duration(IN)- duration of the temporary LOB; Can be a valid duration id or one 
    34363441              of the values: OCI_DURATION_SESSION, OCI_DURATION_CALL 
    34373442              Note: OCI_DURATION_TRANSACTION is NOT supported in 8.1 
     
    34593464read/written from/to the lob through the input locator, the lob 
    34603465buffering subsystem is *not* used.  Note that this call does *not* 
    3461 implicitly flush the changes made in the buffering subsystem.  The  
     3466implicitly flush the changes made in the buffering subsystem.  The 
    34623467user must explicitly call OCILobFlushBuffer() to do this. 
    34633468 
    34643469Parameters 
    3465 svchp (IN) - the service context handle.  
    3466 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    3467 diagnostic information in the event of an error.  
    3468 locp (IN/OUT) - a locator uniquely referencing the LOB.  
     3470svchp (IN) - the service context handle. 
     3471errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     3472diagnostic information in the event of an error. 
     3473locp (IN/OUT) - a locator uniquely referencing the LOB. 
    34693474 
    34703475Related Functions 
     
    34943499Enable lob buffering for the input locator.  The next time data is 
    34953500read/written from/to the lob through the input locator, the lob 
    3496 buffering subsystem is used.   
    3497  
    3498 Once lob buffering is enabled for a locator, if that locator is passed to  
     3501buffering subsystem is used. 
     3502 
     3503Once lob buffering is enabled for a locator, if that locator is passed to 
    34993504one of the following routines, an error is returned: 
    35003505        OCILobCopy, OCILobAppend, OCILobErase, OCILobGetLength, OCILobTrim 
    35013506 
    35023507Parameters 
    3503 svchp (IN) - the service context handle.  
    3504 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    3505 diagnostic information in the event of an error.  
    3506 locp (IN/OUT) - a locator uniquely referencing the LOB.  
     3508svchp (IN) - the service context handle. 
     3509errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     3510diagnostic information in the event of an error. 
     3511locp (IN/OUT) - a locator uniquely referencing the LOB. 
    35073512 
    35083513Related Functions 
     
    35333538Comments 
    35343539Erases a specified portion of the LOB data starting at a specified offset. 
    3535 The actual number of characters/bytes erased is returned. The actual number  
    3536 of characters/bytes and the requested number of characters/bytes will differ  
    3537 if the end of the LOB data is reached before erasing the requested number of  
     3540The actual number of characters/bytes erased is returned. The actual number 
     3541of characters/bytes and the requested number of characters/bytes will differ 
     3542if the end of the LOB data is reached before erasing the requested number of 
    35383543characters/bytes. 
    3539 If a section of data from the middle of the LOB data is erased, a hole is  
     3544If a section of data from the middle of the LOB data is erased, a hole is 
    35403545created. When data from that hole is read, 0's are returned. If the LOB is 
    35413546NULL, this routine will indicate that 0 characters/bytes were erased. 
     
    35433548Parameters 
    35443549svchp (IN) - the service context handle. 
    3545 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3550errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    35463551diagnostic information in the event of an error. 
    35473552locp (IN/OUT) - the LOB for which to erase a section of data. 
    3548 amount (IN/OUT) - On IN, the number of characters/bytes to erase. On OUT,  
     3553amount (IN/OUT) - On IN, the number of characters/bytes to erase. On OUT, 
    35493554the actual number of characters/bytes erased. 
    3550 offset (IN) - absolute offset from the beginning of the LOB data from which  
     3555offset (IN) - absolute offset from the beginning of the LOB data from which 
    35513556to start erasing data. Starts at 1. 
    35523557 
     
    35733578not opened before using them. A LOB has to be closed before 
    35743579the transaction commits else the transaction is rolled back. 
    3575 Open locators are closed if the transaction aborts. Multiple  
     3580Open locators are closed if the transaction aborts. Multiple 
    35763581users can open the same lob on different locators. 
    35773582Parameters 
    35783583svchp (IN) - the service context handle. 
    3579 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3584errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    35803585diagnostic information in the event of an error. 
    35813586locp (IN/OUT) - locator points to the LOB to be opened 
    35823587mode (IN) - mode in which to open the lob. The valid modes are 
    3583 read-only - OCI_FILE_READONLY, read-write - OCI_FILE_READWRITE  
     3588read-only - OCI_FILE_READONLY, read-write - OCI_FILE_READWRITE 
    35843589 
    35853590OCILobClose() 
     
    35993604Comments 
    36003605It is an error if the lob is not open at this time. All LOBs 
    3601 that have been opened in a transaction have to be closed  
     3606that have been opened in a transaction have to be closed 
    36023607before the transaction commits, else the transaction gets 
    36033608rolled back. 
     
    36053610Parameters 
    36063611svchp (IN) - the service context handle. 
    3607 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3612errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    36083613diagnostic information in the event of an error. 
    36093614locp  (IN)  - A locator that was opened using OCILobOpen() 
     
    36283633Parameters 
    36293634svchp (IN) - the service context handle. 
    3630 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3635errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    36313636diagnostic information in the event of an error. 
    36323637filep (IN/OUT) - a pointer to a FILE locator to be closed. 
     
    36483653 
    36493654Syntax 
    3650 sword OCILobFileCLoseAll ( OCISvcCtx *svchp,  
     3655sword OCILobFileCLoseAll ( OCISvcCtx *svchp, 
    36513656                           OCIError  *errhp ); 
    36523657 
     
    36563661Parameters 
    36573662svchp (IN) - the service context handle. 
    3658 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3663errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    36593664diagnostic information in the event of an error. 
    36603665 
     
    36863691Parameters 
    36873692svchp (IN) - the OCI service context handle. 
    3688 errhp (IN/OUT) - error handle. The OCI error handle. If there is an error,  
    3689 it is recorded in err and this function returns OCI_ERROR. Diagnostic  
     3693errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, 
     3694it is recorded in err and this function returns OCI_ERROR. Diagnostic 
    36903695information can be obtained by calling OCIErrorGet(). 
    36913696filep (IN) - pointer to the FILE locator that refers to the file. 
     
    37083713Syntax 
    37093714sword OCILobFileGetName ( OCIEnv                   *envhp, 
    3710                           OCIError                 *errhp,  
    3711                           CONST OCILobLocator      *filep,  
     3715                          OCIError                 *errhp, 
     3716                          CONST OCILobLocator      *filep, 
    37123717                          OraText                     *dir_alias, 
    3713                           ub2                      *d_length,  
    3714                           OraText                     *filename,  
     3718                          ub2                      *d_length, 
     3719                          OraText                     *filename, 
    37153720                          ub2                      *f_length ); 
    37163721 
    37173722Comments 
    3718 Returns the directory alias and file name associated with this file locator.   
     3723Returns the directory alias and file name associated with this file locator. 
    37193724 
    37203725Parameters 
    37213726envhp (IN/OUT) - OCI environment handle initialized in object mode. 
    3722 errhp (IN/OUT) -The OCI error handle. If there is an error, it is recorded in  
    3723 errhp and this function returns OCI_ERROR. Diagnostic information can be  
     3727errhp (IN/OUT) -The OCI error handle. If there is an error, it is recorded in 
     3728errhp and this function returns OCI_ERROR. Diagnostic information can be 
    37243729obtained by calling OCIErrorGet(). 
    37253730filep (IN) - FILE locator for which to get the directory alias and file name. 
    3726 dir_alias (OUT) - buffer into which the directory alias name is placed. The  
    3727 caller must allocate enough space for the directory alias name and must not  
     3731dir_alias (OUT) - buffer into which the directory alias name is placed. The 
     3732caller must allocate enough space for the directory alias name and must not 
    37283733write into the space. 
    3729 d_length (IN/OUT)                  
     3734d_length (IN/OUT) 
    37303735        - IN: length of the input dir_alias string; 
    37313736        - OUT: length of the returned dir_alias string. 
    3732 filename (OUT) - buffer into which the file name is placed. The caller must  
     3737filename (OUT) - buffer into which the file name is placed. The caller must 
    37333738allocate enough space for the file name and must not write into the space. 
    3734 f_length (IN/OUT)  
     3739f_length (IN/OUT) 
    37353740        - IN: length of the input filename string; 
    37363741         - OUT: lenght of the returned filename string. 
     
    37613766Parameters 
    37623767svchp (IN) - the OCI service context handle. 
    3763 errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it  
    3764 is recorded in err and this function returns OCI_ERROR. Diagnostic  
     3768errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
     3769is recorded in err and this function returns OCI_ERROR. Diagnostic 
    37653770information can be obtained by calling OCIErrorGet(). 
    3766 filep (IN) - pointer to the FILE locator being examined. If the input file  
    3767 locator was never passed to OCILobFileOpen(), the file is considered not to  
    3768 be opened by this locator. However, a different locator may have opened the  
    3769 file. More than one file opens can be performed on the same file using  
     3771filep (IN) - pointer to the FILE locator being examined. If the input file 
     3772locator was never passed to OCILobFileOpen(), the file is considered not to 
     3773be opened by this locator. However, a different locator may have opened the 
     3774file. More than one file opens can be performed on the same file using 
    37703775different locators. 
    3771 flag (OUT) - returns TRUE if the FILE is opened using this locator; FALSE if  
    3772 it is not.  
     3776flag (OUT) - returns TRUE if the FILE is opened using this locator; FALSE if 
     3777it is not. 
    37733778 
    37743779See also 
    3775 OCIErrorGet, OCILobFileOpen, OCILobFileClose, OCILobFileCloseAll, CREATE  
     3780OCIErrorGet, OCILobFileOpen, OCILobFileClose, OCILobFileCloseAll, CREATE 
    37763781DIRECTORY SQL command 
    37773782 
     
    37923797 
    37933798Comments 
    3794 Opens a FILE. The FILE can be opened for read-only access only. FILEs may not  
     3799Opens a FILE. The FILE can be opened for read-only access only. FILEs may not 
    37953800be written to throough ORACLE. 
    37963801 
    3797 Parameters  
    3798 svchp (IN) - the service context handle.  
    3799 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3802Parameters 
     3803svchp (IN) - the service context handle. 
     3804errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    38003805diagnostic information in the event of an error. 
    3801 filep (IN/OUT) - the FILE to open. Error if the locator does not refer to a  
    3802 FILE.  
    3803 mode (IN) - mode in which to open the file. The only valid mode is  
    3804 read-only - OCI_FILE_READONLY.  
     3806filep (IN/OUT) - the FILE to open. Error if the locator does not refer to a 
     3807FILE. 
     3808mode (IN) - mode in which to open the file. The only valid mode is 
     3809read-only - OCI_FILE_READONLY. 
    38053810 
    38063811See Also 
    3807 OCILobFileClose, OCIErrorGet, OCILobFileCloseAll, OCILobFileIsOpen,  
    3808 OCILobFileSetName, CREATE DIRECTORY  
     3812OCILobFileClose, OCIErrorGet, OCILobFileCloseAll, OCILobFileIsOpen, 
     3813OCILobFileSetName, CREATE DIRECTORY 
    38093814 
    38103815 
     
    38243829                          OCILobLocator      **filepp, 
    38253830                          OraText               *dir_alias, 
    3826                           ub2                d_length,  
    3827                           OraText               *filename,  
     3831                          ub2                d_length, 
     3832                          OraText               *filename, 
    38283833                          ub2                f_length ); 
    38293834Comments 
    3830 Sets the directory alias and file name in the LOB file locator.   
     3835Sets the directory alias and file name in the LOB file locator. 
    38313836Parameters 
    38323837envhp (IN/OUT) - OCI environment handle initialized in object mode. 
    3833 errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded  
    3834 in errhp and this function returns OCI_ERROR. Diagnostic information can be  
     3838errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
     3839in errhp and this function returns OCI_ERROR. Diagnostic information can be 
    38353840obtained by calling OCIErrorGet(). 
    38363841filepp (IN/OUT) - FILE locator for which to set the directory alias name. 
    38373842The caller must have already allocated space for the locator by calling 
    38383843OCIDescriptorAlloc(). 
    3839 dir_alias (IN) - buffer that contains the directory alias name to set in the  
     3844dir_alias (IN) - buffer that contains the directory alias name to set in the 
    38403845locator. 
    38413846d_length (IN) - length of the input dir_alias parameter. 
     
    38653870Comments 
    38663871 
    3867 Flushes to the server, changes made to the buffering subsystem that  
    3868 are associated with the lob referenced by the input locator.  This  
    3869 routine will actually write the data in the buffer to the lob in  
    3870 the database.  Lob buffering must have already been enabled for the  
     3872Flushes to the server, changes made to the buffering subsystem that 
     3873are associated with the lob referenced by the input locator.  This 
     3874routine will actually write the data in the buffer to the lob in 
     3875the database.  Lob buffering must have already been enabled for the 
    38713876input lob locator. 
    38723877 
     
    38773882 
    38783883Parameters 
    3879 svchp (IN/OUT) - the service context handle.  
    3880 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    3881 diagnostic information in the event of an error.  
    3882 locp (IN/OUT) - a locator uniquely referencing the LOB.  
     3884svchp (IN/OUT) - the service context handle. 
     3885errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     3886diagnostic information in the event of an error. 
     3887locp (IN/OUT) - a locator uniquely referencing the LOB. 
    38833888flag    (IN)     - to indicate if the buffer resources need to be freed 
    38843889                   after a flush. Default value is OCI_LOB_BUFFER_NOFREE. 
     
    39113916 
    39123917Parameters 
    3913 svchp (IN/OUT) - the service context handle.  
    3914 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    3915 diagnostic information in the event of an error.  
     3918svchp (IN/OUT) - the service context handle. 
     3919errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     3920diagnostic information in the event of an error. 
    39163921locp (IN/OUT) - a locator uniquely referencing the LOB 
    39173922 
     
    39293934LOB data layer when accessing/modifying the LOB value. Part of the chunk is 
    39303935used to store system-related information and the rest stores the LOB value. 
    3931 This function returns the amount of space used in the LOB chunk to store  
     3936This function returns the amount of space used in the LOB chunk to store 
    39323937the LOB value. 
    39333938 
     
    39403945Comments 
    39413946 Performance will be improved if the user issues read/write 
    3942 requests using a multiple of this chunk size. For writes, there is an added  
     3947requests using a multiple of this chunk size. For writes, there is an added 
    39433948benefit since LOB chunks are versioned and, if all writes are done on chunk 
    3944 basis, no extra/excess versioning is done nor duplicated. Users could batch  
     3949basis, no extra/excess versioning is done nor duplicated. Users could batch 
    39453950up the write until they have enough for a chunk instead of issuing several 
    39463951write calls for the same chunk. 
     
    39483953Parameters 
    39493954svchp (IN) - the service context handle. 
    3950 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3955errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    39513956diagnostic information in the event of an error. 
    39523957locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal 
    3953 LOBs, this locator must be a locator that was obtained from the server  
     3958LOBs, this locator must be a locator that was obtained from the server 
    39543959specified by svchp. For FILEs, this locator can be initialized by a Select or 
    39553960OCILobFileSetName. 
    3956 chunksizep (OUT) - On output, it is the length of the LOB if not NULL - for  
    3957 character LOBs it is the number of characters, for binary LOBs it is the  
     3961chunksizep (OUT) - On output, it is the length of the LOB if not NULL - for 
     3962character LOBs it is the number of characters, for binary LOBs it is the 
    39583963number of bytes in the LOB. 
    39593964 
     
    39663971 
    39673972Purpose 
    3968 Gets the length of a LOB/FILE.  
     3973Gets the length of a LOB/FILE. 
    39693974 
    39703975Syntax 
     
    39753980 
    39763981Comments 
    3977 Gets the length of a LOB/FILE. If the LOB/FILE is NULL, the length is  
     3982Gets the length of a LOB/FILE. If the LOB/FILE is NULL, the length is 
    39783983undefined. 
    39793984 
    39803985Parameters 
    39813986svchp (IN) - the service context handle. 
    3982 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     3987errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    39833988diagnostic information in the event of an error. 
    39843989locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal 
    3985 LOBs, this locator must be a locator that was obtained from the server  
     3990LOBs, this locator must be a locator that was obtained from the server 
    39863991specified by svchp. For FILEs, this locator can be initialized by a Select or 
    39873992OCILobFileSetName. 
    3988 lenp (OUT) - On output, it is the length of the LOB if not NULL - for  
    3989 character LOBs it is the number of characters, for binary LOBs it is the  
     3993lenp (OUT) - On output, it is the length of the LOB if not NULL - for 
     3994character LOBs it is the number of characters, for binary LOBs it is the 
    39903995number of bytes in the LOB. 
    39913996 
     
    40114016 
    40124017Comments 
    4013 Compares the given LOB locators for equality.  Two LOB locators are equal if  
     4018Compares the given LOB locators for equality.  Two LOB locators are equal if 
    40144019and only if they both refer to the same LOB data. 
    40154020Two NULL locators are considered not equal by this function. 
     
    40364041Comments 
    40374042   Checks if the LOB locator was opened before. flag is set to TRUE 
    4038    if opened; FALSE otherwise  
    4039  
    4040  
    4041 Parameters 
    4042 svchp (IN) - the service context handle.  
    4043 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4044 diagnostic information in the event of an error.  
     4043   if opened; FALSE otherwise 
     4044 
     4045 
     4046Parameters 
     4047svchp (IN) - the service context handle. 
     4048errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4049diagnostic information in the event of an error. 
    40454050locp (IN) - the locator to test for temporary LOB 
    40464051flag(OUT) - TRUE, if the LOB locator points to is open 
     
    40684073 
    40694074Parameters 
    4070 envhp (IN) - the environment handle.  
    4071 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4072 diagnostic information in the event of an error.  
     4075envhp (IN) - the environment handle. 
     4076errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4077diagnostic information in the event of an error. 
    40734078locp (IN) - the locator to test for temporary LOB 
    40744079is_temporary(OUT) - TRUE, if the LOB locator points to a temporary LOB; 
     
    40974102 
    40984103Comments 
    4099 Loads/copies a portion or all of a file value into an internal LOB as  
    4100 specified.  The data is copied from the source file to the destination  
    4101 internal LOB (BLOB/CLOB).  No character set conversions are performed  
     4104Loads/copies a portion or all of a file value into an internal LOB as 
     4105specified.  The data is copied from the source file to the destination 
     4106internal LOB (BLOB/CLOB).  No character set conversions are performed 
    41024107when copying the bfile data to a clob/nclob.  The bfile data must already 
    41034108be in the same character set as the clob/nclob in the database.  No 
    41044109error checking is performed to verify this. 
    41054110The source (src_filep) and the destination (dst_locp) LOBs must already exist. 
    4106 If the data already exists at the destination's start position, it is  
    4107 overwritten with the source data. If the destination's start position is  
     4111If the data already exists at the destination's start position, it is 
     4112overwritten with the source data. If the destination's start position is 
    41084113beyond the end of the current data, a hole is created from the end of the data 
    4109 to the beginning of the newly written data from the source. The destination  
    4110 LOB is extended to accommodate the newly written data if it extends  
    4111 beyond the current length of the destination LOB.  
    4112 It is an error to extend the destination LOB beyond the maximum length  
     4114to the beginning of the newly written data from the source. The destination 
     4115LOB is extended to accommodate the newly written data if it extends 
     4116beyond the current length of the destination LOB. 
     4117It is an error to extend the destination LOB beyond the maximum length 
    41134118allowed or to try to copy from a NULL LOB. 
    41144119Parameters 
    4115 svchp (IN) - the service context handle.  
    4116 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4117 diagnostic information in the event of an error.  
    4118 dst_locp (IN/OUT) - a locator uniquely referencing the destination internal  
    4119 LOB which may be of type blob, clob, or nclob.  
    4120 src_filep (IN/OUT) - a locator uniquely referencing the source BFILE.  
     4120svchp (IN) - the service context handle. 
     4121errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4122diagnostic information in the event of an error. 
     4123dst_locp (IN/OUT) - a locator uniquely referencing the destination internal 
     4124LOB which may be of type blob, clob, or nclob. 
     4125src_filep (IN/OUT) - a locator uniquely referencing the source BFILE. 
    41214126amount (IN) - the number of bytes to be copied. 
    4122 dst_offset (IN) - this is the absolute offset for the destination LOB.  
    4123 For character LOBs it is the number of characters from the beginning of the  
    4124 LOB at which to begin writing. For binary LOBs it is the number of bytes from  
     4127dst_offset (IN) - this is the absolute offset for the destination LOB. 
     4128For character LOBs it is the number of characters from the beginning of the 
     4129LOB at which to begin writing. For binary LOBs it is the number of bytes from 
    41254130the beginning of the lob from which to begin reading. The offset starts at 1. 
    4126 src_offset (IN) - this is the absolute offset for the source BFILE.  It is  
     4131src_offset (IN) - this is the absolute offset for the source BFILE.  It is 
    41274132the number of bytes from the beginning of the LOB.  The offset starts at 1. 
    41284133 
    4129 See Also  
     4134See Also 
    41304135OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim(), OCILobCopy() 
    41314136 
     
    41394144 
    41404145Syntax 
    4141 sword OCILobLocatorAssign ( OCISvcCtx             *svchp,  
    4142                             OCIError              *errhp,  
    4143                             CONST OCILobLocator   *src_locp,  
     4146sword OCILobLocatorAssign ( OCISvcCtx             *svchp, 
     4147                            OCIError              *errhp, 
     4148                            CONST OCILobLocator   *src_locp, 
    41444149                            OCILobLocator         **dst_locpp ); 
    41454150 
    41464151Comments 
    4147 Assign source locator to destination locator.  After the assignment, both  
    4148 locators refer to the same LOB data.  For internal LOBs, the source locator's  
    4149 LOB data gets copied to the destination locator's LOB data only when the  
    4150 destination locator gets stored in the table.  Therefore, issuing a flush of  
    4151 the object containing the destination locator will copy the LOB data. For  
     4152Assign source locator to destination locator.  After the assignment, both 
     4153locators refer to the same LOB data.  For internal LOBs, the source locator's 
     4154LOB data gets copied to the destination locator's LOB data only when the 
     4155destination locator gets stored in the table.  Therefore, issuing a flush of 
     4156the object containing the destination locator will copy the LOB data. For 
    41524157FILEs only the locator that refers to the OS file is copied to the table. The 
    41534158OS file is not copied. 
     
    41574162Parameters 
    41584163svchp (IN/OUT) - OCI service handle initialized in object mode. 
    4159 errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded  
    4160 in errhp and this function returns OCI_ERROR. Diagnostic information can be  
     4164errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
     4165in errhp and this function returns OCI_ERROR. Diagnostic information can be 
    41614166obtained by calling OCIErrorGet(). 
    41624167src_locp (IN) - LOB locator to copy from. 
    4163 dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space  
     4168dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
    41644169for the OCILobLocator by calling OCIDescriptorAlloc(). 
    41654170 
     
    41924197Parameters 
    41934198envhp (IN/OUT) - OCI environment handle initialized in object mode. 
    4194 errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it  
    4195 is recorded in err and this function returns OCI_ERROR. Diagnostic  
     4199errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
     4200is recorded in err and this function returns OCI_ERROR. Diagnostic 
    41964201information can be obtained by calling OCIErrorGet(). 
    41974202locp (IN) - the LOB locator being tested 
    4198 is_initialized (OUT) - returns TRUE if the given LOB locator is initialized;  
     4203is_initialized (OUT) - returns TRUE if the given LOB locator is initialized; 
    41994204FALSE if it is not. 
    42004205 
     
    42114216 
    42124217Purpose 
    4213 Reads a portion of a LOB/FILE as specified by the call into a buffer.  
     4218Reads a portion of a LOB/FILE as specified by the call into a buffer. 
    42144219 
    42154220Syntax 
     
    42214226                   dvoid           *bufp, 
    42224227                   ub4             bufl, 
    4223                    dvoid           *ctxp,   
     4228                   dvoid           *ctxp, 
    42244229                   OCICallbackLobRead cbfp, 
    42254230                   ub2             csid, 
     
    42274232 
    42284233Comments 
    4229 Reads a portion of a LOB/FILE as specified by the call into a buffer. Data  
     4234Reads a portion of a LOB/FILE as specified by the call into a buffer. Data 
    42304235read from a hole is returned as 0s. It is an error to try to read from a NULL 
    4231 LOB/FILE. The OS FILE must already exist on the server and must have been  
    4232 opened using the input locator. Oracle must hav epermission to read the OS  
     4236LOB/FILE. The OS FILE must already exist on the server and must have been 
     4237opened using the input locator. Oracle must hav epermission to read the OS 
    42334238file and user must have read permission on the directory object. 
    42344239 
    42354240Parameters 
    4236 svchp (IN/OUT) - the service context handle.  
    4237 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     4241svchp (IN/OUT) - the service context handle. 
     4242errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    42384243diagnostic information in the event of an error. 
    4239 locp (IN/OUT) - a LOB locator that uniquely references a LOB.  
    4240 offset (IN) - On input, it is the absolute offset, for character LOBs in the  
    4241 number of characters from the beginning of the LOB, for binary LOBs it is the  
     4244locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
     4245offset (IN) - On input, it is the absolute offset, for character LOBs in the 
     4246number of characters from the beginning of the LOB, for binary LOBs it is the 
    42424247number of bytes. Starts from 1. 
    4243 amtp (IN/OUT) - On input, the number of character or bytes to be read. On  
    4244 output, the actual number of bytes or characters read.  
    4245 If the amount of bytes to be read is larger than the buffer length it is  
    4246 assumed that the LOB is being read in a streamed mode. On input if this value  
    4247 is 0, then the data shall be read in streamed mode from the LOB until the end  
    4248 of LOB. If the data is read in pieces, *amtp always contains the length of  
    4249 the last piece read.  If a callback function is defined, then this callback  
    4250 function will be invoked each time bufl bytes are read off the pipe. Each  
     4248amtp (IN/OUT) - On input, the number of character or bytes to be read. On 
     4249output, the actual number of bytes or characters read. 
     4250If the amount of bytes to be read is larger than the buffer length it is 
     4251assumed that the LOB is being read in a streamed mode. On input if this value 
     4252is 0, then the data shall be read in streamed mode from the LOB until the end 
     4253of LOB. If the data is read in pieces, *amtp always contains the length of 
     4254the last piece read.  If a callback function is defined, then this callback 
     4255function will be invoked each time bufl bytes are read off the pipe. Each 
    42514256piece will be written into bufp. 
    4252 If the callback function is not defined, then OCI_NEED_DATA error code will  
    4253 be returned. The application must invoke the LOB read over and over again to  
    4254 read more pieces of the LOB until the OCI_NEED_DATA error code is not  
    4255 returned. The buffer pointer and the length can be different in each call  
    4256 if the pieces are being read into different sizes and location.  
    4257 bufp (IN) - the pointer to a buffer into which the piece will be read. The  
    4258 length of the allocated memory is assumed to be bufl.  
    4259 bufl (IN) - the length of the buffer in octets.  
     4257If the callback function is not defined, then OCI_NEED_DATA error code will 
     4258be returned. The application must invoke the LOB read over and over again to 
     4259read more pieces of the LOB until the OCI_NEED_DATA error code is not 
     4260returned. The buffer pointer and the length can be different in each call 
     4261if the pieces are being read into different sizes and location. 
     4262bufp (IN) - the pointer to a buffer into which the piece will be read. The 
     4263length of the allocated memory is assumed to be bufl. 
     4264bufl (IN) - the length of the buffer in octets. 
    42604265ctxp (IN) - the context for the call back function. Can be NULL. 
    4261 cbfp (IN) - a callback that may be registered to be called for each piece. If  
    4262 this is NULL, then OCI_NEED_DATA will be returned for each piece.  
    4263 The callback function must return OCI_CONTINUE for the read to continue.  
    4264 If any other error code is returned, the LOB read is aborted.  
     4266cbfp (IN) - a callback that may be registered to be called for each piece. If 
     4267this is NULL, then OCI_NEED_DATA will be returned for each piece. 
     4268The callback function must return OCI_CONTINUE for the read to continue. 
     4269If any other error code is returned, the LOB read is aborted. 
    42654270  ctxp (IN) - the context for the call back function. Can be NULL. 
    42664271  bufp (IN) - a buffer pointer for the piece. 
    42674272  len (IN) - the length of length of current piece in bufp. 
    4268   piece (IN) - which piece - OCI_FIRST_PIECE, OCI_NEXT_PIECE or  
     4273  piece (IN) - which piece - OCI_FIRST_PIECE, OCI_NEXT_PIECE or 
    42694274  OCI_LAST_PIECE. 
    42704275csid - the character set ID of the buffer data 
     
    42934298 
    42944299Comments 
    4295 Truncates LOB data to a specified shorter length.  
    4296  
    4297 Parameters 
    4298 svchp (IN) - the service context handle.  
    4299 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4300 diagnostic information in the event of an error.  
    4301 locp (IN/OUT) - a LOB locator that uniquely references the LOB. This locator  
    4302 must be a locator that was obtained from the server specified by svchp.  
     4300Truncates LOB data to a specified shorter length. 
     4301 
     4302Parameters 
     4303svchp (IN) - the service context handle. 
     4304errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4305diagnostic information in the event of an error. 
     4306locp (IN/OUT) - a LOB locator that uniquely references the LOB. This locator 
     4307must be a locator that was obtained from the server specified by svchp. 
    43034308newlen (IN) - the new length of the LOB data, which must be less than or equal 
    4304 to the current length.  
     4309to the current length. 
    43054310 
    43064311Related Functions 
     
    43254330                    ub4             offset, 
    43264331                    ub4             *amtp, 
    4327                     dvoid           *bufp,  
     4332                    dvoid           *bufp, 
    43284333                    ub4             buflen, 
    43294334                    ub1             piece, 
    4330                     dvoid           *ctxp,   
     4335                    dvoid           *ctxp, 
    43314336                    OCICallbackLobWrite   (cbfp) 
    43324337                                    ( 
     
    43344339                                    dvoid    *bufp, 
    43354340                                    ub4      *lenp, 
    4336                                     ub1      *piecep )  
     4341                                    ub1      *piecep ) 
    43374342                    ub2             csid 
    43384343                    ub1             csfrm ); 
     
    43404345 
    43414346Comments 
    4342 Writes a buffer into a LOB as specified. If LOB data already exists  
     4347Writes a buffer into a LOB as specified. If LOB data already exists 
    43434348it is overwritten with the data stored in the buffer. 
    43444349The buffer can be written to the LOB in a single piece with this call, or 
    43454350it can be provided piecewise using callbacks or a standard polling method. 
    4346 If this value of the piece parameter is OCI_FIRST_PIECE, data must be  
     4351If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
    43474352provided through callbacks or polling. 
    4348 If a callback function is defined in the cbfp parameter, then this callback  
    4349 function will be invoked to get the next piece after a piece is written to  
     4353If a callback function is defined in the cbfp parameter, then this callback 
     4354function will be invoked to get the next piece after a piece is written to 
    43504355the pipe. Each piece will be written from bufp. 
    4351 If no callback function is defined, then OCILobWrite() returns the  
    4352 OCI_NEED_DATA error code. The application must all OCILobWrite() again  
    4353 to write more pieces of the LOB. In this mode, the buffer pointer and the  
    4354 length can be different in each call if the pieces are of different sizes and  
    4355 from different locations. A piece value of OCI_LAST_PIECE terminates the  
    4356 piecewise write.  
    4357  
    4358 Parameters 
    4359 svchp (IN/OUT) - the service context handle.  
    4360 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4361 diagnostic information in the event of an error.  
    4362 locp (IN/OUT) - a LOB locator that uniquely references a LOB.  
    4363 offset (IN) - On input, it is the absolute offset, for character LOBs in  
    4364 the number of characters from the beginning of the LOB, for binary LOBs it  
     4356If no callback function is defined, then OCILobWrite() returns the 
     4357OCI_NEED_DATA error code. The application must all OCILobWrite() again 
     4358to write more pieces of the LOB. In this mode, the buffer pointer and the 
     4359length can be different in each call if the pieces are of different sizes and 
     4360from different locations. A piece value of OCI_LAST_PIECE terminates the 
     4361piecewise write. 
     4362 
     4363Parameters 
     4364svchp (IN/OUT) - the service context handle. 
     4365errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4366diagnostic information in the event of an error. 
     4367locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
     4368offset (IN) - On input, it is the absolute offset, for character LOBs in 
     4369the number of characters from the beginning of the LOB, for binary LOBs it 
    43654370is the number of bytes. Starts at 1. 
    4366 bufp (IN) - the pointer to a buffer from which the piece will be written. The  
    4367 length of the allocated memory is assumed to be the value passed in bufl.  
    4368 Even if the data is being written in pieces, bufp must contain the first  
     4371bufp (IN) - the pointer to a buffer from which the piece will be written. The 
     4372length of the allocated memory is assumed to be the value passed in bufl. 
     4373Even if the data is being written in pieces, bufp must contain the first 
    43694374piece of the LOB when this call is invoked. 
    43704375bufl (IN) - the length of the buffer in bytes. 
    4371 Note: This parameter assumes an 8-bit byte. If your platform uses a  
     4376Note: This parameter assumes an 8-bit byte. If your platform uses a 
    43724377longer byte, the value of bufl must be adjusted accordingly. 
    43734378piece (IN) - which piece of the buffer is being written. The default value for 
    4374 this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a  
     4379this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
    43754380single piece. 
    4376 The following other values are also possible for piecewise or callback mode:  
     4381The following other values are also possible for piecewise or callback mode: 
    43774382OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE. 
    4378 amtp (IN/OUT) - On input, takes the number of character or bytes to be  
    4379 written. On output, returns the actual number of bytes or characters written.  
    4380 If the data is written in pieces, *amtp will contain the total length of the  
     4383amtp (IN/OUT) - On input, takes the number of character or bytes to be 
     4384written. On output, returns the actual number of bytes or characters written. 
     4385If the data is written in pieces, *amtp will contain the total length of the 
    43814386pieces written at the end of the call (last piece written) and is undefined in 
    4382 between.  
     4387between. 
    43834388(Note it is different from the piecewise read case) 
    43844389ctxp (IN) - the context for the call back function. Can be NULL. 
    4385 cbfp (IN) - a callback that may be registered to be called for each piece in  
     4390cbfp (IN) - a callback that may be registered to be called for each piece in 
    43864391a piecewise write. If this is NULL, the standard polling method will be used. 
    4387 The callback function must return OCI_CONTINUE for the write to continue.  
    4388 If any other error code is returned, the LOB write is aborted. The  
     4392The callback function must return OCI_CONTINUE for the write to continue. 
     4393If any other error code is returned, the LOB write is aborted. The 
    43894394callback takes the following parameters: 
    43904395  ctxp (IN) - the context for the call back function. Can be NULL. 
    43914396  bufp (IN/OUT) - a buffer pointer for the piece. 
    4392   lenp (IN/OUT) - the length of the buffer (in octets) and the length of  
     4397  lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
    43934398  current piece in bufp (out octets). 
    43944399  piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE. 
     
    44124417                    OCILobLocator   *locp, 
    44134418                    ub4             *amtp, 
    4414                     dvoid           *bufp,  
     4419                    dvoid           *bufp, 
    44154420                    ub4             buflen, 
    44164421                    ub1             piece, 
    4417                     dvoid           *ctxp,   
     4422                    dvoid           *ctxp, 
    44184423                    OCICallbackLobWrite   (cbfp) 
    44194424                                    ( 
     
    44214426                                    dvoid    *bufp, 
    44224427                                    ub4      *lenp, 
    4423                                     ub1      *piecep )  
     4428                                    ub1      *piecep ) 
    44244429                    ub2             csid 
    44254430                    ub1             csfrm ); 
     
    44274432 
    44284433Comments 
    4429 Writes a buffer to the end of a LOB as specified. If LOB data already exists  
     4434Writes a buffer to the end of a LOB as specified. If LOB data already exists 
    44304435it is overwritten with the data stored in the buffer. 
    44314436The buffer can be written to the LOB in a single piece with this call, or 
    44324437it can be provided piecewise using callbacks or a standard polling method. 
    4433 If this value of the piece parameter is OCI_FIRST_PIECE, data must be  
     4438If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
    44344439provided through callbacks or polling. 
    4435 If a callback function is defined in the cbfp parameter, then this callback  
    4436 function will be invoked to get the next piece after a piece is written to the  
     4440If a callback function is defined in the cbfp parameter, then this callback 
     4441function will be invoked to get the next piece after a piece is written to the 
    44374442pipe. Each piece will be written from bufp. 
    4438 If no callback function is defined, then OCILobWriteAppend() returns the  
    4439 OCI_NEED_DATA error code. The application must all OCILobWriteAppend() again  
    4440 to write more pieces of the LOB. In this mode, the buffer pointer and the  
    4441 length can be different in each call if the pieces are of different sizes and  
    4442 from different locations. A piece value of OCI_LAST_PIECE terminates the  
    4443 piecewise write.  
    4444  
    4445 Parameters 
    4446 svchp (IN/OUT) - the service context handle.  
    4447 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4448 diagnostic information in the event of an error.  
    4449 locp (IN/OUT) - a LOB locator that uniquely references a LOB.  
    4450 bufp (IN) - the pointer to a buffer from which the piece will be written. The  
    4451 length of the allocated memory is assumed to be the value passed in bufl. Even  
    4452 if the data is being written in pieces, bufp must contain the first piece of  
     4443If no callback function is defined, then OCILobWriteAppend() returns the 
     4444OCI_NEED_DATA error code. The application must all OCILobWriteAppend() again 
     4445to write more pieces of the LOB. In this mode, the buffer pointer and the 
     4446length can be different in each call if the pieces are of different sizes and 
     4447from different locations. A piece value of OCI_LAST_PIECE terminates the 
     4448piecewise write. 
     4449 
     4450Parameters 
     4451svchp (IN/OUT) - the service context handle. 
     4452errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4453diagnostic information in the event of an error. 
     4454locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
     4455bufp (IN) - the pointer to a buffer from which the piece will be written. The 
     4456length of the allocated memory is assumed to be the value passed in bufl. Even 
     4457if the data is being written in pieces, bufp must contain the first piece of 
    44534458the LOB when this call is invoked. 
    44544459bufl (IN) - the length of the buffer in bytes. 
    4455 Note: This parameter assumes an 8-bit byte. If your platform uses a  
     4460Note: This parameter assumes an 8-bit byte. If your platform uses a 
    44564461longer byte, the value of bufl must be adjusted accordingly. 
    44574462piece (IN) - which piece of the buffer is being written. The default value for 
    4458 this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a  
     4463this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
    44594464single piece. 
    4460 The following other values are also possible for piecewise or callback mode:  
     4465The following other values are also possible for piecewise or callback mode: 
    44614466OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE. 
    4462 amtp (IN/OUT) - On input, takes the number of character or bytes to be  
    4463 written. On output, returns the actual number of bytes or characters written.  
    4464 If the data is written in pieces, *amtp will contain the total length of the  
     4467amtp (IN/OUT) - On input, takes the number of character or bytes to be 
     4468written. On output, returns the actual number of bytes or characters written. 
     4469If the data is written in pieces, *amtp will contain the total length of the 
    44654470pieces written at the end of the call (last piece written) and is undefined in 
    4466 between.  
     4471between. 
    44674472(Note it is different from the piecewise read case) 
    44684473ctxp (IN) - the context for the call back function. Can be NULL. 
    4469 cbfp (IN) - a callback that may be registered to be called for each piece in a  
     4474cbfp (IN) - a callback that may be registered to be called for each piece in a 
    44704475piecewise write. If this is NULL, the standard polling method will be used. 
    4471 The callback function must return OCI_CONTINUE for the write to continue.  
    4472 If any other error code is returned, the LOB write is aborted. The  
     4476The callback function must return OCI_CONTINUE for the write to continue. 
     4477If any other error code is returned, the LOB write is aborted. The 
    44734478callback takes the following parameters: 
    44744479  ctxp (IN) - the context for the call back function. Can be NULL. 
    44754480  bufp (IN/OUT) - a buffer pointer for the piece. 
    4476   lenp (IN/OUT) - the length of the buffer (in octets) and the length of  
     4481  lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
    44774482  current piece in bufp (out octets). 
    44784483  piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE. 
     
    45024507With unlimited size LOB support the limit for a LOB is no longer restricted to 4GB. 
    45034508This interface should be used to get the actual limit for storing data for a specific 
    4504 LOB locator. Note that if the compatibality is set to 9.2 or older the limit would still  
     4509LOB locator. Note that if the compatibality is set to 9.2 or older the limit would still 
    45054510be 4GB. 
    45064511 
    45074512Parameters 
    4508 svchp (IN/OUT) - the service context handle.  
    4509 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4510 diagnostic information in the event of an error.  
    4511 locp (IN/OUT) - a LOB locator that uniquely references a LOB.  
     4513svchp (IN/OUT) - the service context handle. 
     4514errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4515diagnostic information in the event of an error. 
     4516locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
    45124517limitp (OUT)  - The storage limit for a LOB in bytes. 
    45134518Related Functions 
     
    45274532Comments 
    45284533This call is used to terminate a session which was created with OCILogon() or 
    4529 OCILogon2().   
    4530 This call implicitly deallocates the server, authentication, and service  
     4534OCILogon2(). 
     4535This call implicitly deallocates the server, authentication, and service 
    45314536context handles. 
    4532 Note: For more information on logging on and off in an application,  
    4533 refer to the section "Application Initialization, Connection, and  
     4537Note: For more information on logging on and off in an application, 
     4538refer to the section "Application Initialization, Connection, and 
    45344539Authorization" on page 2-16. 
    45354540Parameters 
    4536 svchp (IN) - the service context handle which was used in the call to  
     4541svchp (IN) - the service context handle which was used in the call to 
    45374542OCILogon() or OCILogon2(). 
    4538 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     4543errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    45394544diagnostic information in the event of an error. 
    45404545See Also 
     
    45624567                       ub4             dbname_len ); 
    45634568Comments 
    4564 This function is used to create a simple logon session for an application.  
    4565 Note: Users requiring more complex session (e.g., TP monitor  
    4566 applications) should refer to the section "Application Initialization,  
     4569This function is used to create a simple logon session for an application. 
     4570Note: Users requiring more complex session (e.g., TP monitor 
     4571applications) should refer to the section "Application Initialization, 
    45674572Connection, and Authorization" on page 2-16. 
    4568 This call allocates the error and service context handles which are passed to  
    4569 it. This call also implicitly allocates server and authentication handles  
    4570 associated with the session.  These handles can be retrieved by calling  
     4573This call allocates the error and service context handles which are passed to 
     4574it. This call also implicitly allocates server and authentication handles 
     4575associated with the session.  These handles can be retrieved by calling 
    45714576OCIAttrGet() on the service context handle. 
    45724577Parameters 
    45734578envhp (IN) - the OCI environment handle. 
    4574 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     4579errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    45754580diagnostic information in the event of an error. 
    45764581svchp (OUT) - the service context pointer. 
     
    46074612This function is used to create a simple logon session for an application in 
    46084613Connection Pooling mode. The valid values for mode are currently OCI_POOL and 
    4609 OCI_DEFAULT. Call to this function with OCI_DEFAULT mode is equivalent to  
     4614OCI_DEFAULT. Call to this function with OCI_DEFAULT mode is equivalent to 
    46104615OCILogon() call. 
    4611 This call allocates the error and service context handles which are passed to  
    4612 it. This call also implicitly allocates server and authentication handles  
    4613 associated with the session.  These handles can be retrieved by calling  
    4614 OCIAttrGet() on the service context handle. This call assumes that  
     4616This call allocates the error and service context handles which are passed to 
     4617it. This call also implicitly allocates server and authentication handles 
     4618associated with the session.  These handles can be retrieved by calling 
     4619OCIAttrGet() on the service context handle. This call assumes that 
    46154620OCIConnectionPoolCreate() has already been called for the same dbname. 
    46164621Parameters 
    46174622envhp (IN) - the OCI environment handle. 
    4618 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     4623errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    46194624diagnostic information in the event of an error. 
    46204625svchp (OUT) - the service context pointer. 
     
    46224627uname_len (IN) - the length of username. 
    46234628password (IN) - the user's password. If this is null, it is assumed that a 
    4624                 proxy session has to be created and the required grants on  
     4629                proxy session has to be created and the required grants on 
    46254630                the database are already done. 
    46264631passwd_len (IN) - the length of password. 
     
    46474652                     dvoid           *memptr); 
    46484653Comments 
    4649 Frees up dynamically allocated data pointers associated with the pointer using  
    4650 either the default memory free function or the registered memory free  
     4654Frees up dynamically allocated data pointers associated with the pointer using 
     4655either the default memory free function or the registered memory free 
    46514656function, as the case may be. 
    4652 A user-defined memory free function can be registered during the initial call  
    4653 to OCIInitialize().  
    4654 This call is always successful.  
     4657A user-defined memory free function can be registered during the initial call 
     4658to OCIInitialize(). 
     4659This call is always successful. 
    46554660Parameters 
    46564661stmhp (IN) - statement handle which returned this data buffer. 
    4657 memptr (IN) - pointer to data allocated by the client library.  
     4662memptr (IN) - pointer to data allocated by the client library. 
    46584663Related Functions 
    46594664OCIInitialize() 
     
    46674672OCI Get PARaMeter 
    46684673Purpose 
    4669 Returns a descriptor of a parameter specified by position in the describe  
     4674Returns a descriptor of a parameter specified by position in the describe 
    46704675handle or statement handle. 
    46714676Syntax 
     
    46764681                  ub4         pos ); 
    46774682Comments 
    4678 This call returns a descriptor of a parameter specified by position in the  
    4679 describe handle or statement handle. Parameter descriptors are always  
     4683This call returns a descriptor of a parameter specified by position in the 
     4684describe handle or statement handle. Parameter descriptors are always 
    46804685allocated internally by the OCI library. They are read-only. 
    4681 OCI_NO_DATA may be returned if there are no parameter descriptors for this  
    4682 position.  
    4683 See Appendix B for more detailed information about parameter descriptor  
     4686OCI_NO_DATA may be returned if there are no parameter descriptors for this 
     4687position. 
     4688See Appendix B for more detailed information about parameter descriptor 
    46844689attributes. 
    46854690Parameters 
    4686 hndlp (IN) - a statement handle or describe handle. The OCIParamGet()  
    4687 function will return a parameter descriptor for this handle.  
    4688 htype (IN) - the type of the handle passed in the handle parameter. Valid  
    4689 types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a  
     4691hndlp (IN) - a statement handle or describe handle. The OCIParamGet() 
     4692function will return a parameter descriptor for this handle. 
     4693htype (IN) - the type of the handle passed in the handle parameter. Valid 
     4694types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a 
    46904695statement handle 
    4691 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     4696errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    46924697diagnostic information in the event of an error. 
    4693 parmdpp (OUT) - a descriptor of the parameter at the position given in the pos  
     4698parmdpp (OUT) - a descriptor of the parameter at the position given in the pos 
    46944699parameter. 
    4695 pos (IN) - position number in the statement handle or describe handle. A  
     4700pos (IN) - position number in the statement handle or describe handle. A 
    46964701parameter descriptor will be returned for this position. 
    4697 Note: OCI_NO_DATA may be returned if there are no parameter  
    4698 descriptors for this position.  
     4702Note: OCI_NO_DATA may be returned if there are no parameter 
     4703descriptors for this position. 
    46994704Related Functions 
    47004705OCIAttrGet(), OCIAttrSet() 
     
    47084713OCI Parameter Set in handle 
    47094714Purpose 
    4710 Used to set a complex object retrieval descriptor into a complex object  
     4715Used to set a complex object retrieval descriptor into a complex object 
    47114716retrieval handle. 
    47124717Syntax 
     
    47184723                      ub4 pos ); 
    47194724Comments 
    4720 This call sets a given complex object retrieval descriptor into a complex  
     4725This call sets a given complex object retrieval descriptor into a complex 
    47214726object retrieval handle. 
    4722 The handle must have been previously allocated using OCIHandleAlloc(), and  
    4723 the descriptor must have been previously allocated using OCIDescAlloc().  
     4727The handle must have been previously allocated using OCIHandleAlloc(), and 
     4728the descriptor must have been previously allocated using OCIDescAlloc(). 
    47244729Attributes of the descriptor are set using OCIAttrSet(). 
    47254730Parameters 
     
    47284733errhp (IN/OUT) - error handle. 
    47294734dscp (IN) - complex object retrieval descriptor pointer. 
    4730 dtyp (IN) -  
     4735dtyp (IN) - 
    47314736pos (IN) - position number. 
    47324737See Also 
     
    47524757                        ub4           mode); 
    47534758Comments 
    4754 This call allows the password of an account to be changed. This call is  
     4759This call allows the password of an account to be changed. This call is 
    47554760similar to OCISessionBegin() with the following differences: 
    4756 If the user authentication is already established, it authenticates  
    4757 the account using the old password and then changes the  
     4761If the user authentication is already established, it authenticates 
     4762the account using the old password and then changes the 
    47584763password to the new password 
    4759 If the user authentication is not established, it establishes a user  
    4760 authentication and authenticates the account using the old  
     4764If the user authentication is not established, it establishes a user 
     4765authentication and authenticates the account using the old 
    47614766password, then changes the password to the new password. 
    4762 This call is useful when the password of an account is expired and  
    4763 OCISessionBegin() returns an error or warning which indicates that the  
    4764 password has expired.  
    4765 Parameters 
    4766 svchp (IN/OUT) - a handle to a service context. The service context handle  
     4767This call is useful when the password of an account is expired and 
     4768OCISessionBegin() returns an error or warning which indicates that the 
     4769password has expired. 
     4770Parameters 
     4771svchp (IN/OUT) - a handle to a service context. The service context handle 
    47674772must be initialized and have a server context handle associated with it. 
    4768 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     4773errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    47694774diagnostic information in the event of an error. 
    4770 user_name (IN) - specifies the user name. It points to a character string,  
    4771 whose length is specified in usernm_len. This parameter must be NULL if the  
     4775user_name (IN) - specifies the user name. It points to a character string, 
     4776whose length is specified in usernm_len. This parameter must be NULL if the 
    47724777service context has been initialized with an authentication handle. 
    4773 usernm_len (IN) - the length of the user name string specified in user_name.  
     4778usernm_len (IN) - the length of the user name string specified in user_name. 
    47744779For a valid user name string, usernm_len must be non-zero. 
    4775 opasswd (IN) - specifies the user's old password. It points to a character  
     4780opasswd (IN) - specifies the user's old password. It points to a character 
    47764781string, whose length is specified in opasswd_len . 
    4777 opasswd_len (IN) - the length of the old password string specified in opasswd.  
     4782opasswd_len (IN) - the length of the old password string specified in opasswd. 
    47784783For a valid password string, opasswd_len must be non-zero. 
    4779 npasswd (IN) - specifies the user's new password. It points to a character  
    4780 string, whose length is specified in npasswd_len which must be non-zero for a  
    4781 valid password string. If the password complexity verification routine is  
    4782 specified in the user's profile to verify the new password's complexity, the  
    4783 new password must meet the complexity requirements of the verification  
     4784npasswd (IN) - specifies the user's new password. It points to a character 
     4785string, whose length is specified in npasswd_len which must be non-zero for a 
     4786valid password string. If the password complexity verification routine is 
     4787specified in the user's profile to verify the new password's complexity, the 
     4788new password must meet the complexity requirements of the verification 
    47844789function. 
    4785 npasswd_len (IN)  - then length of the new password string specified in  
     4790npasswd_len (IN)  - then length of the new password string specified in 
    47864791npasswd. For a valid password string, npasswd_len must be non-zero. 
    47874792mode - pass as OCI_DEFAULT. 
     
    48054810Comments 
    48064811This call is called in non-blocking mode ONLY. Resets the interrupted 
    4807 asynchronous operation and protocol. Must be called if a OCIBreak call  
    4808 had been issued while a non-blocking operation was in progress.  
     4812asynchronous operation and protocol. Must be called if a OCIBreak call 
     4813had been issued while a non-blocking operation was in progress. 
    48094814Parameters 
    48104815hndlp (IN) - the service context handle or the server context handle. 
    4811 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     4816errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    48124817diagnostic information in the event of an error. 
    48134818Related Functions 
     
    48264831A result set descriptor can be allocated with a call to OCIDescAlloc(). 
    48274832Parameters 
    4828 rsetdp (IN/OUT) - a result set descriptor pointer.  
    4829 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4830 diagnostic information in the event of an error.  
     4833rsetdp (IN/OUT) - a result set descriptor pointer. 
     4834errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4835diagnostic information in the event of an error. 
    48314836Related Functions 
    48324837OCIDescAlloc() 
     
    48474852                      ub4          mode); 
    48484853Comments 
    4849 This call is used to create an association between an OCI application and a  
    4850 particular server.  
    4851 This call initializes a server context handle, which must have been previously  
     4854This call is used to create an association between an OCI application and a 
     4855particular server. 
     4856This call initializes a server context handle, which must have been previously 
    48524857allocated with a call to OCIHandleAlloc(). 
    4853 The server context handle initialized by this call can be associated with a  
    4854 service context through a call to OCIAttrSet(). Once that association has been  
     4858The server context handle initialized by this call can be associated with a 
     4859service context through a call to OCIAttrSet(). Once that association has been 
    48554860made, OCI operations can be performed against the server. 
    4856 If an application is operating against multiple servers, multiple server  
    4857 context handles can be maintained. OCI operations are performed against  
     4861If an application is operating against multiple servers, multiple server 
     4862context handles can be maintained. OCI operations are performed against 
    48584863whichever server context is currently associated with the service context. 
    48594864Parameters 
    4860 srvhp (IN/OUT) - an uninitialized server context handle, which gets  
    4861 initialized by this call. Passing in an initialized server handle causes an  
    4862 error.  
    4863 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
     4865srvhp (IN/OUT) - an uninitialized server context handle, which gets 
     4866initialized by this call. Passing in an initialized server handle causes an 
     4867error. 
     4868errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
    48644869diagnostic information in the event of an error. 
    48654870dblink (IN) - specifies the database (server) to use. This parameter points to 
    4866 a character string which specifies a connect string or a service point. If the  
     4871a character string which specifies a connect string or a service point. If the 
    48674872connect string is NULL, then this call attaches to the default host. The length 
    48684873of connstr is specified in connstr_len. The connstr pointer may be freed by the 
    48694874caller on return. 
    4870 dblink_len (IN) - the length of the string pointed to by connstr. For a valid  
     4875dblink_len (IN) - the length of the string pointed to by connstr. For a valid 
    48714876connect string name or alias, connstr_len must be non-zero. 
    48724877mode (IN) - specifies the various modes of operation.  For release 8.0, pass as 
    4873 OCI_DEFAULT - in this mode, calls made to the server on this server context  
    4874 are made in blocking mode.  
     4878OCI_DEFAULT - in this mode, calls made to the server on this server context 
     4879are made in blocking mode. 
    48754880Example 
    4876 See the description of OCIStmtPrepare() on page 13-96 for an example showing  
     4881See the description of OCIStmtPrepare() on page 13-96 for an example showing 
    48774882the use of OCIServerAttach(). 
    48784883Related Functions 
     
    48894894sword OCIServerDetach ( OCIServer   *svrhp, 
    48904895                      OCIError    *errhp, 
    4891                       ub4         mode);  
    4892 Comments 
    4893 This call deletes an access to data source for OCI operations, which was  
    4894 established by a call to OCIServerAttach().  
    4895 Parameters 
    4896 srvhp (IN) - a handle to an initialized server context, which gets reset to  
    4897 uninitialized state. The handle is not de-allocated.  
    4898 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    4899 diagnostic information in the event of an error.  
    4900 mode (IN) - specifies the various modes of operation. The only valid mode is  
    4901 OCI_DEFAULT for the default mode.  
     4896                      ub4         mode); 
     4897Comments 
     4898This call deletes an access to data source for OCI operations, which was 
     4899established by a call to OCIServerAttach(). 
     4900Parameters 
     4901srvhp (IN) - a handle to an initialized server context, which gets reset to 
     4902uninitialized state. The handle is not de-allocated. 
     4903errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     4904diagnostic information in the event of an error. 
     4905mode (IN) - specifies the various modes of operation. The only valid mode is 
     4906OCI_DEFAULT for the default mode. 
    49024907Related Functions 
    49034908OCIServerAttach() 
     
    49114916Returns the version string of the Oracle server. 
    49124917Syntax 
    4913 sword OCIServerVersion ( dvoid        *hndlp,  
    4914                        OCIError     *errhp,  
     4918sword OCIServerVersion ( dvoid        *hndlp, 
     4919                       OCIError     *errhp, 
    49154920                       OraText         *bufp, 
    49164921                       ub4          bufsz 
    49174922                       ub1          hndltype ); 
    49184923Comments 
    4919 This call returns the version string of the Oracle server.  
    4920 For example, the following might be returned as the version string if your  
     4924This call returns the version string of the Oracle server. 
     4925For example, the following might be returned as the version string if your 
    49214926application is running against a 7.3.2 server: 
    49224927Oracle7 Server Release 7.3.2.0.0 - Production Release 
     
    49284933Parameters 
    49294934hndlp (IN) - the service context handle or the server context handle. 
    4930 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     4935errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    49314936diagnostic information in the event of an error. 
    49324937bufp (IN) - the buffer in which the version information is returned. 
     
    49524957 
    49534958Comments 
    4954 For Oracle8, OCISessionBegin() must be called for any given server handle  
    4955 before requests can be made against it. Also, OCISessionBegin() only supports  
    4956 authenticating the user for access to the Oracle server specified by the  
    4957 server handle in the service context. In other words, after OCIServerAttach()  
    4958 is called to initialize a server handle, OCISessionBegin() must be called to  
    4959 authenticate the user for that given server.  
    4960 When OCISessionBegin() is called for the first time for the given server  
    4961 handle, the initialized authentication handle is called a primary  
    4962 authentication context. A primary authentication context may not be created  
    4963 with the OCI_MIGRATE mode. Also, only one primary authentication context can  
     4959For Oracle8, OCISessionBegin() must be called for any given server handle 
     4960before requests can be made against it. Also, OCISessionBegin() only supports 
     4961authenticating the user for access to the Oracle server specified by the 
     4962server handle in the service context. In other words, after OCIServerAttach() 
     4963is called to initialize a server handle, OCISessionBegin() must be called to 
     4964authenticate the user for that given server. 
     4965When OCISessionBegin() is called for the first time for the given server 
     4966handle, the initialized authentication handle is called a primary 
     4967authentication context. A primary authentication context may not be created 
     4968with the OCI_MIGRATE mode. Also, only one primary authentication context can 
    49644969be created for a given server handle and the primary authentication context c 
    4965 an only ever be used with that server handle. If the primary authentication  
    4966 context is set in a service handle with a different server handle, then an  
     4970an only ever be used with that server handle. If the primary authentication 
     4971context is set in a service handle with a different server handle, then an 
    49674972error will result. 
    4968 After OCISessionBegin() has been called for the server handle, and the primary  
    4969 authentication context is set in the service handle, OCISessionBegin() may be  
    4970 called again to initialize another authentication handle with different (or  
    4971 the same) credentials. When OCISessionBegin() is called with a service handle  
     4973After OCISessionBegin() has been called for the server handle, and the primary 
     4974authentication context is set in the service handle, OCISessionBegin() may be 
     4975called again to initialize another authentication handle with different (or 
     4976the same) credentials. When OCISessionBegin() is called with a service handle 
    49724977set with a primary authentication context, the returned authentication context 
    4973 in authp is called a user authentication context. As many user authentication  
     4978in authp is called a user authentication context. As many user authentication 
    49744979contexts may be initialized as desired. 
    4975 User authentication contexts may be created with the OCI_MIGRATE mode.  
    4976 If the OCI_MIGRATE mode is not specified, then the user authentication  
    4977 context can only ever be used with the same server handle set in svchp. If  
    4978 OCI_MIGRATE mode is specified, then the user authentication may be set  
    4979 with different server handles. However, the user authentication context is  
    4980 restricted to use with only server handles which resolve to the same database  
    4981 instance and that have equivalent primary authentication contexts. Equivalent  
    4982 authentication contexts are those which were authenticated as the same  
     4980User authentication contexts may be created with the OCI_MIGRATE mode. 
     4981If the OCI_MIGRATE mode is not specified, then the user authentication 
     4982context can only ever be used with the same server handle set in svchp. If 
     4983OCI_MIGRATE mode is specified, then the user authentication may be set 
     4984with different server handles. However, the user authentication context is 
     4985restricted to use with only server handles which resolve to the same database 
     4986instance and that have equivalent primary authentication contexts. Equivalent 
     4987authentication contexts are those which were authenticated as the same 
    49834988database user. 
    4984 OCI_SYSDBA, OCI_SYSOPER, and OCI_PRELIM_AUTH may only be used  
     4989OCI_SYSDBA, OCI_SYSOPER, and OCI_PRELIM_AUTH may only be used 
    49854990with a primary authentication context. 
    4986 To provide credentials for a call to OCISessionBegin(), one of two methods are  
    4987 supported. The first is to provide a valid username and password pair for  
    4988 database authentication in the user authentication handle passed to  
    4989 OCISessionBegin(). This involves using OCIAttrSet() to set the  
    4990 OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the  
    4991 authentication handle. Then OCISessionBegin() is called with  
     4991To provide credentials for a call to OCISessionBegin(), one of two methods are 
     4992supported. The first is to provide a valid username and password pair for 
     4993database authentication in the user authentication handle passed to 
     4994OCISessionBegin(). This involves using OCIAttrSet() to set the 
     4995OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the 
     4996authentication handle. Then OCISessionBegin() is called with 
    49924997OCI_CRED_RDBMS. 
    4993 Note: When the authentication handle is terminated using  
    4994 OCISessionEnd(), the username and password attributes remain  
    4995 unchanged and thus can be re-used in a future call to OCISessionBegin().  
    4996 Otherwise, they must be reset to new values before the next  
     4998Note: When the authentication handle is terminated using 
     4999OCISessionEnd(), the username and password attributes remain 
     5000unchanged and thus can be re-used in a future call to OCISessionBegin(). 
     5001Otherwise, they must be reset to new values before the next 
    49975002OCISessionBegin() call. 
    4998 The second type of credentials supported are external credentials. No  
    4999 attributes need to be set on the authentication handle before calling  
    5000 OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent  
    5001 to the Oracle7 `connect /' syntax. If values have been set for  
    5002 OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are  
     5003The second type of credentials supported are external credentials. No 
     5004attributes need to be set on the authentication handle before calling 
     5005OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent 
     5006to the Oracle7 `connect /' syntax. If values have been set for 
     5007OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are 
    50035008ignored if OCI_CRED_EXT is used. 
    50045009Parameters 
    5005 svchp (IN) - a handle to a service context. There must be a valid server  
     5010svchp (IN) - a handle to a service context. There must be a valid server 
    50065011handle set in svchp. 
    50075012errhp (IN) - an error handle to the retrieve diagnostic information. 
    5008 usrhp (IN/OUT) - a handle to an authentication context, which is initialized  
     5013usrhp (IN/OUT) - a handle to an authentication context, which is initialized 
    50095014by this call. 
    5010 credt (IN) - specifies the type of credentials to use for authentication.  
     5015credt (IN) - specifies the type of credentials to use for authentication. 
    50115016Valid values for credt are: 
    5012 OCI_CRED_RDBMS - authenticate using a database username and  
    5013 password pair as credentials. The attributes OCI_ATTR_USERNAME  
    5014 and OCI_ATTR_PASSWORD should be set on the authentication  
     5017OCI_CRED_RDBMS - authenticate using a database username and 
     5018password pair as credentials. The attributes OCI_ATTR_USERNAME 
     5019and OCI_ATTR_PASSWORD should be set on the authentication 
    50155020context before this call. 
    5016 OCI_CRED_EXT - authenticate using external credentials. No username  
     5021OCI_CRED_EXT - authenticate using external credentials. No username 
    50175022or password is provided. 
    50185023mode (IN) - specifies the various modes of operation. Valid modes are: 
    5019 OCI_DEFAULT - in this mode, the authentication context returned may  
    5020 only ever be set with the same server context specified in svchp. This  
     5024OCI_DEFAULT - in this mode, the authentication context returned may 
     5025only ever be set with the same server context specified in svchp. This 
    50215026establishes the primary authentication context. 
    5022 OCI_MIGRATE - in this mode, the new authentication context may be  
    5023 set in a service handle with a different server handle. This mode  
    5024 establishes the user authentication context.  
    5025 OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA  
     5027OCI_MIGRATE - in this mode, the new authentication context may be 
     5028set in a service handle with a different server handle. This mode 
     5029establishes the user authentication context. 
     5030OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA 
    50265031access. 
    5027 OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER  
     5032OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER 
    50285033access. 
    5029 OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA  
     5034OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA 
    50305035or OCI_SYSOPER to authenticate for certain administration tasks. 
    50315036Related Functions 
     
    50495054 
    50505055Comments 
    5051 The user security context associated with the service context is invalidated  
    5052 by this call. Storage for the authentication context is not freed. The  
    5053 transaction specified by the service context is implicitly committed. The  
     5056The user security context associated with the service context is invalidated 
     5057by this call. Storage for the authentication context is not freed. The 
     5058transaction specified by the service context is implicitly committed. The 
    50545059transaction handle, if explicitly allocated, may be freed if not being used. 
    50555060Resources allocated on the server for this user are freed. 
    50565061The authentication handle may be reused in a new call to OCISessionBegin(). 
    50575062Parameters 
    5058 svchp (IN/OUT) - the service context handle. There must be a valid server  
     5063svchp (IN/OUT) - the service context handle. There must be a valid server 
    50595064handle and user authentication handle associated with svchp. 
    5060 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    5061 diagnostic information in the event of an error.  
    5062 usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL,  
     5065errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     5066diagnostic information in the event of an error. 
     5067usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL, 
    50635068the user in the service context handle is de-authenticated. 
    50645069mode (IN) - the only valid mode is OCI_DEFAULT. 
     
    50875092Comments 
    50885093This function  is used to execute a prepared SQL statement. 
    5089 Using an execute call, the application associates a request with a server. On  
     5094Using an execute call, the application associates a request with a server. On 
    50905095success, OCI_SUCCESS is returned. 
    5091 If a SELECT statement is executed, the description of the select list follows  
    5092 implicitly as a response. This description is buffered on the client side for  
    5093 describes, fetches and define type conversions. Hence it is optimal to  
    5094 describe a select list only after an execute.  
    5095 Also for SELECT statements, some results are available implicitly. Rows will  
    5096 be received and buffered at the end of the execute. For queries with small row  
    5097 count, a prefetch causes memory to be released in the server if the end of  
    5098 fetch is reached, an optimization that may result in memory usage reduction.  
     5096If a SELECT statement is executed, the description of the select list follows 
     5097implicitly as a response. This description is buffered on the client side for 
     5098describes, fetches and define type conversions. Hence it is optimal to 
     5099describe a select list only after an execute. 
     5100Also for SELECT statements, some results are available implicitly. Rows will 
     5101be received and buffered at the end of the execute. For queries with small row 
     5102count, a prefetch causes memory to be released in the server if the end of 
     5103fetch is reached, an optimization that may result in memory usage reduction. 
    50995104Set attribute call has been defined to set the number of rows to be prefetched 
    51005105per result set. 
    5101 For SELECT statements, at the end of the execute, the statement handle  
    5102 implicitly maintains a reference to the service context on which it is  
    5103 executed. It is the user's responsibility to maintain the integrity of the  
    5104 service context. If the attributes of a service context is changed for  
    5105 executing some operations on this service context, the service context must  
    5106 be restored to have the same attributes, that a statement was executed with,  
    5107 prior to a fetch on the statement handle. The implicit reference is maintained  
    5108 until the statement handle is freed or the fetch is cancelled or an end of  
     5106For SELECT statements, at the end of the execute, the statement handle 
     5107implicitly maintains a reference to the service context on which it is 
     5108executed. It is the user's responsibility to maintain the integrity of the 
     5109service context. If the attributes of a service context is changed for 
     5110executing some operations on this service context, the service context must 
     5111be restored to have the same attributes, that a statement was executed with, 
     5112prior to a fetch on the statement handle. The implicit reference is maintained 
     5113until the statement handle is freed or the fetch is cancelled or an end of 
    51095114fetch condition is reached. 
    5110 Note: If output variables are defined for a SELECT statement before a  
    5111 call to OCIStmtExecute(), the number of rows specified by iters will be  
    5112 fetched directly into the defined output buffers and additional rows  
    5113 equivalent to the prefetch count will be prefetched. If there are no  
    5114 additional rows, then the fetch is complete without calling  
     5115Note: If output variables are defined for a SELECT statement before a 
     5116call to OCIStmtExecute(), the number of rows specified by iters will be 
     5117fetched directly into the defined output buffers and additional rows 
     5118equivalent to the prefetch count will be prefetched. If there are no 
     5119additional rows, then the fetch is complete without calling 
    51155120OCIStmtFetch(). 
    5116 The execute call will return errors if the statement has bind data types that  
     5121The execute call will return errors if the statement has bind data types that 
    51175122are not supported in an Oracle7 server. 
    51185123Parameters 
    5119 svchp (IN/OUT) - service context handle.  
    5120 stmtp (IN/OUT) - an statement handle - defines the statement and the  
    5121 associated data to be executed at the server. It is invalid to pass in a  
    5122 statement handle that has bind of data types only supported in release 8.0  
    5123 when srvchp points to an Oracle7 server.  
    5124 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    5125 diagnostic information in the event of an error. If the statement is being  
    5126 batched and it is successful, then this handle will contain this particular  
    5127 statement execution specific errors returned from the server when the batch is  
     5124svchp (IN/OUT) - service context handle. 
     5125stmtp (IN/OUT) - an statement handle - defines the statement and the 
     5126associated data to be executed at the server. It is invalid to pass in a 
     5127statement handle that has bind of data types only supported in release 8.0 
     5128when srvchp points to an Oracle7 server. 
     5129errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     5130diagnostic information in the event of an error. If the statement is being 
     5131batched and it is successful, then this handle will contain this particular 
     5132statement execution specific errors returned from the server when the batch is 
    51285133flushed. 
    5129 iters (IN) - the number of times this statement is executed for non-Select  
    5130 statements. For Select statements, if iters is non-zero, then defines must  
    5131 have been done for the statement handle. The execution fetches iters rows into  
    5132 these predefined buffers and prefetches more rows depending upon the prefetch  
    5133 row count. This function returns an error if iters=0 for non-SELECT  
     5134iters (IN) - the number of times this statement is executed for non-Select 
     5135statements. For Select statements, if iters is non-zero, then defines must 
     5136have been done for the statement handle. The execution fetches iters rows into 
     5137these predefined buffers and prefetches more rows depending upon the prefetch 
     5138row count. This function returns an error if iters=0 for non-SELECT 
    51345139statements. 
    5135 rowoff (IN) - the index from which the data in an array bind is relevant for  
    5136 this multiple row execution.  
    5137 snap_in (IN) - this parameter is optional. if supplied, must point to a  
    5138 snapshot descriptor of type OCI_DTYPE_SNAP.  The contents of this descriptor  
    5139 must be obtained from the snap_out parameter of a previous call.  The  
    5140 descriptor is ignored if the SQL is not a SELECT.  This facility allows  
    5141 multiple service contexts to ORACLE to see the same consistent snapshot of the  
    5142 database's committed data.  However, uncommitted data in one context is not  
     5140rowoff (IN) - the index from which the data in an array bind is relevant for 
     5141this multiple row execution. 
     5142snap_in (IN) - this parameter is optional. if supplied, must point to a 
     5143snapshot descriptor of type OCI_DTYPE_SNAP.  The contents of this descriptor 
     5144must be obtained from the snap_out parameter of a previous call.  The 
     5145descriptor is ignored if the SQL is not a SELECT.  This facility allows 
     5146multiple service contexts to ORACLE to see the same consistent snapshot of the 
     5147database's committed data.  However, uncommitted data in one context is not 
    51435148visible to another context even using the same snapshot. 
    5144 snap_out (OUT) - this parameter optional. if supplied, must point to a  
    5145 descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an  
    5146 opaque representation which is the current ORACLE "system change  
    5147 number" suitable as a snap_in input to a subsequent call to OCIStmtExecute().   
    5148 This descriptor should not be used any longer than necessary in order to avoid  
    5149 "snapshot too old" errors.  
     5149snap_out (OUT) - this parameter optional. if supplied, must point to a 
     5150descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an 
     5151opaque representation which is the current ORACLE "system change 
     5152number" suitable as a snap_in input to a subsequent call to OCIStmtExecute(). 
     5153This descriptor should not be used any longer than necessary in order to avoid 
     5154"snapshot too old" errors. 
    51505155mode (IN) - The modes are: 
    5151 If OCI_DEFAULT_MODE, the default mode, is selected, the request is  
    5152 immediately executed. Error handle contains diagnostics on error if any.  
    5153 OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is  
    5154 only valid if the application has set the prefetch row count prior to this  
    5155 call. In this mode, the OCI library will get up to the number of rows  
    5156 specified (i.e., prefetch row count plus iters). If the number of rows  
    5157 returned by the query is greater than this value, OCI_ERROR will be  
    5158 returned with ORA-01422 as the implementation specific error in a  
    5159 diagnostic record. If the number of rows returned by the query is  
    5160 smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will  
    5161 be returned with ORA-01403 as the implementation specific error. The  
    5162 prefetch buffer size is ignored and the OCI library tries to allocate all the  
    5163 space required to contain the prefetched rows. The exact fetch semantics  
    5164 apply to only the top level rows. No more rows can be fetched for this  
    5165 query at the end of the call.  
    5166 OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this  
    5167 statement executed in this transaction will be maintained when the  
    5168 transaction is detached for migration. By default, a query is cancelled  
    5169 when a transaction is detached for migration. This mode is the default  
    5170 mode when connected to a V7 server.  
     5156If OCI_DEFAULT_MODE, the default mode, is selected, the request is 
     5157immediately executed. Error handle contains diagnostics on error if any. 
     5158OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is 
     5159only valid if the application has set the prefetch row count prior to this 
     5160call. In this mode, the OCI library will get up to the number of rows 
     5161specified (i.e., prefetch row count plus iters). If the number of rows 
     5162returned by the query is greater than this value, OCI_ERROR will be 
     5163returned with ORA-01422 as the implementation specific error in a 
     5164diagnostic record. If the number of rows returned by the query is 
     5165smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will 
     5166be returned with ORA-01403 as the implementation specific error. The 
     5167prefetch buffer size is ignored and the OCI library tries to allocate all the 
     5168space required to contain the prefetched rows. The exact fetch semantics 
     5169apply to only the top level rows. No more rows can be fetched for this 
     5170query at the end of the call. 
     5171OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this 
     5172statement executed in this transaction will be maintained when the 
     5173transaction is detached for migration. By default, a query is cancelled 
     5174when a transaction is detached for migration. This mode is the default 
     5175mode when connected to a V7 server. 
    51715176Related Functions 
    51725177OCIStmtPrepare() 
     
    51835188Syntax 
    51845189sword OCIStmtFetch ( OCIStmt     *stmtp, 
    5185                    OCIError    *errhp,  
     5190                   OCIError    *errhp, 
    51865191                   ub4         nrows, 
    51875192                   ub2         orientation, 
    51885193                   ub4         mode); 
    51895194Comments 
    5190 The fetch call is a local call, if prefetched rows suffice. However, this is  
    5191 transparent to the application. If LOB columns are being read, LOB locators  
    5192 are fetched for subsequent LOB operations to be performed on these locators.  
    5193 Prefetching is turned off if LONG columns are involved.  
    5194 A fetch with nrows set to 0 rows effectively cancels the fetch for this  
     5195The fetch call is a local call, if prefetched rows suffice. However, this is 
     5196transparent to the application. If LOB columns are being read, LOB locators 
     5197are fetched for subsequent LOB operations to be performed on these locators. 
     5198Prefetching is turned off if LONG columns are involved. 
     5199A fetch with nrows set to 0 rows effectively cancels the fetch for this 
    51955200statement. 
    51965201Parameters 
    51975202stmtp (IN) - a statement (application request) handle. 
    5198 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     5203errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    51995204diagnostic information in the event of an error. 
    52005205nrows (IN) - number of rows to be fetched from the current position. 
    5201 orientation (IN) - for release 8.0, the only acceptable value is  
    5202 OCI_FETCH_NEXT, which is also the default value.  
     5206orientation (IN) - for release 8.0, the only acceptable value is 
     5207OCI_FETCH_NEXT, which is also the default value. 
    52035208mode (IN) - for release 8.0, beta-1, the following mode is defined. 
    52045209OCI_DEFAULT - default mode 
    5205 OCI_EOF_FETCH - indicates that it is the last fetch from the result set.  
    5206 If nrows is non-zero, setting this mode effectively cancels fetching after  
    5207 retrieving nrows, otherwise it cancels fetching immediately.  
     5210OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
     5211If nrows is non-zero, setting this mode effectively cancels fetching after 
     5212retrieving nrows, otherwise it cancels fetching immediately. 
    52085213Related Functions 
    52095214OCIAttrGet() 
     
    52165221Syntax 
    52175222sword OCIStmtFetch2 ( OCIStmt     *stmtp, 
    5218                    OCIError    *errhp,  
     5223                   OCIError    *errhp, 
    52195224                   ub4         nrows, 
    52205225                   ub2         orientation, 
     
    52225227                   ub4         mode); 
    52235228Comments 
    5224 The fetch call works similar to the OCIStmtFetch call with the  
    5225 addition of the fetchOffset parameter. It can be used on any  
    5226 statement handle, whether it is scrollable or not. For a  
    5227 non-scrollable statement handle, the only acceptable value  
    5228 will be OCI_FETCH_NEXT, and the fetchOffset parameter will be  
    5229 ignored. Applications are encouraged to use this new call.  
    5230  
    5231 A fetchOffset with OCI_FETCH_RELATIVE is equivalent to  
    5232 OCI_FETCH_CURRENT with a value of 0, is equivalent to  
    5233 OCI_FETCH_NEXT with a value of 1, and equivalent to  
    5234 OCI_FETCH_PRIOR with a value of -1. Note that the range of  
    5235 accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an  
    5236 error could be raised if sufficient rows do not exist in  
    5237  
    5238 The fetch call is a local call, if prefetched rows suffice. However, this is  
    5239 transparent to the application. If LOB columns are being read, LOB locators  
    5240 are fetched for subsequent LOB operations to be performed on these locators.  
    5241 Prefetching is turned off if LONG columns are involved.  
    5242 A fetch with nrows set to 0 rows effectively cancels the fetch for this  
     5229The fetch call works similar to the OCIStmtFetch call with the 
     5230addition of the fetchOffset parameter. It can be used on any 
     5231statement handle, whether it is scrollable or not. For a 
     5232non-scrollable statement handle, the only acceptable value 
     5233will be OCI_FETCH_NEXT, and the fetchOffset parameter will be 
     5234ignored. Applications are encouraged to use this new call. 
     5235 
     5236A fetchOffset with OCI_FETCH_RELATIVE is equivalent to 
     5237OCI_FETCH_CURRENT with a value of 0, is equivalent to 
     5238OCI_FETCH_NEXT with a value of 1, and equivalent to 
     5239OCI_FETCH_PRIOR with a value of -1. Note that the range of 
     5240accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an 
     5241error could be raised if sufficient rows do not exist in 
     5242 
     5243The fetch call is a local call, if prefetched rows suffice. However, this is 
     5244transparent to the application. If LOB columns are being read, LOB locators 
     5245are fetched for subsequent LOB operations to be performed on these locators. 
     5246Prefetching is turned off if LONG columns are involved. 
     5247A fetch with nrows set to 0 rows effectively cancels the fetch for this 
    52435248statement. 
    52445249Parameters 
    52455250stmtp (IN) - a statement (application request) handle. 
    5246 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     5251errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    52475252diagnostic information in the event of an error. 
    52485253nrows (IN) - number of rows to be fetched from the current position. 
    52495254It defaults to 1 for orientation OCI_FETCH_LAST. 
    5250 orientation (IN) -  The acceptable values are as follows, with  
     5255orientation (IN) -  The acceptable values are as follows, with 
    52515256OCI_FETCH_NEXT being the default value. 
    5252 OCI_FETCH_CURRENT gets the current row,  
     5257OCI_FETCH_CURRENT gets the current row, 
    52535258OCI_FETCH_NEXT gets the next row from the current position, 
    52545259OCI_FETCH_FIRST gets the first row in the result set, 
    5255 OCI_FETCH_LAST gets the last row in the result set,  
    5256 OCI_FETCH_PRIOR gets the previous row from the current row in the result set,  
    5257 OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset  
     5260OCI_FETCH_LAST gets the last row in the result set, 
     5261OCI_FETCH_PRIOR gets the previous row from the current row in the result set, 
     5262OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset 
    52585263parameter) in the result set using absolute positioning, 
    5259 OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset  
     5264OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset 
    52605265parameter) in the result set using relative positioning. 
    5261 scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and  
     5266scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and 
    52625267OCI_FETCH_RELATIVE orientation parameters only. It specify 
    5263 the new current position for scrollable result set. It is  
    5264 ignored for non-scrollable result sets.  
     5268the new current position for scrollable result set. It is 
     5269ignored for non-scrollable result sets. 
    52655270mode (IN) - for release 8.0, beta-1, the following mode is defined. 
    52665271OCI_DEFAULT - default mode 
    5267 OCI_EOF_FETCH - indicates that it is the last fetch from the result set.  
    5268 If nrows is non-zero, setting this mode effectively cancels fetching after  
    5269 retrieving nrows, otherwise it cancels fetching immediately.  
     5272OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
     5273If nrows is non-zero, setting this mode effectively cancels fetching after 
     5274retrieving nrows, otherwise it cancels fetching immediately. 
    52705275Related Functions 
    52715276OCIAttrGet() 
     
    52845289                         ub4            *typep, 
    52855290                         ub1            *in_outp, 
    5286                          ub4            *iterp,  
     5291                         ub4            *iterp, 
    52875292                         ub4            *idxp, 
    52885293                         ub1            *piecep ); 
    52895294 
    52905295Comments 
    5291 When an execute/fetch call returns OCI_NEED_DATA to get/return a  
    5292 dynamic bind/define value or piece, OCIStmtGetPieceInfo() returns the  
    5293 relevant information: bind/define handle, iteration or index number and  
     5296When an execute/fetch call returns OCI_NEED_DATA to get/return a 
     5297dynamic bind/define value or piece, OCIStmtGetPieceInfo() returns the 
     5298relevant information: bind/define handle, iteration or index number and 
    52945299which piece. 
    5295 See the section "Runtime Data Allocation and Piecewise Operations" on page  
     5300See the section "Runtime Data Allocation and Piecewise Operations" on page 
    529653015-16 for more information about using OCIStmtGetPieceInfo(). 
    52975302Parameters 
    5298 stmtp (IN) - the statement when executed returned OCI_NEED_DATA.  
    5299 errhp (OUT) - an error handle which can be passed to OCIErrorGet() for  
    5300 diagnostic information in the event of an error.  
    5301 hndlpp (OUT) - returns a pointer to the bind or define handle of the bind or  
     5303stmtp (IN) - the statement when executed returned OCI_NEED_DATA. 
     5304errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
     5305diagnostic information in the event of an error. 
     5306hndlpp (OUT) - returns a pointer to the bind or define handle of the bind or 
    53025307define whose runtime data is required or is being provided. 
    5303 typep (OUT) - the type of the handle pointed to by hndlpp: OCI_HTYPE_BIND  
     5308typep (OUT) - the type of the handle pointed to by hndlpp: OCI_HTYPE_BIND 
    53045309(for a bind handle) or OCI_HTYPE_DEFINE (for a define handle). 
    5305 in_outp (OUT) - returns OCI_PARAM_IN if the data is required for an IN bind  
    5306 value. Returns OCI_PARAM_OUT if the data is available as an OUT bind  
     5310in_outp (OUT) - returns OCI_PARAM_IN if the data is required for an IN bind 
     5311value. Returns OCI_PARAM_OUT if the data is available as an OUT bind 
    53075312variable or a define position value. 
    53085313iterp (OUT) - returns the row number of a multiple row operation. 
    53095314idxp (OUT) - the index of an array element of a PL/SQL array bind operation. 
    5310 piecep (OUT) - returns one of the following defined values -  
    5311 OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE and  
    5312 OCI_LAST_PIECE. The default value is always OCI_ONE_PIECE.  
    5313 Related Functions 
    5314 OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(),  
     5315piecep (OUT) - returns one of the following defined values - 
     5316OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE and 
     5317OCI_LAST_PIECE. The default value is always OCI_ONE_PIECE. 
     5318Related Functions 
     5319OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
    53155320OCIStmtSetPieceInfo() 
    53165321 
     
    53265331sword OCIStmtPrepare ( OCIStmt      *stmtp, 
    53275332                     OCIError     *errhp, 
    5328                      CONST OraText   *stmt,  
     5333                     CONST OraText   *stmt, 
    53295334                     ub4          stmt_len, 
    53305335                     ub4          language, 
    53315336                     ub4          mode); 
    53325337Comments 
    5333 This call is used to prepare a SQL or PL/SQL statement for execution. The  
    5334 OCIStmtPrepare() call defines an application request.  
    5335 This is a purely local call. Data values for this statement initialized in  
    5336 subsequent bind calls will be stored in a bind handle which will hang off this  
     5338This call is used to prepare a SQL or PL/SQL statement for execution. The 
     5339OCIStmtPrepare() call defines an application request. 
     5340This is a purely local call. Data values for this statement initialized in 
     5341subsequent bind calls will be stored in a bind handle which will hang off this 
    53375342statement handle. 
    5338 This call does not create an association between this statement handle and any  
     5343This call does not create an association between this statement handle and any 
    53395344particular server. 
    5340 See the section "Preparing Statements" on page 2-21 for more information  
     5345See the section "Preparing Statements" on page 2-21 for more information 
    53415346about using this call. 
    53425347Parameters 
    53435348stmtp (IN) - a statement handle. 
    53445349errhp (IN) - an error handle to retrieve diagnostic information. 
    5345 stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-terminated  
    5346 string. The pointer to the OraText of the statement must be available as long  
     5350stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-terminated 
     5351string. The pointer to the OraText of the statement must be available as long 
    53475352as the statement is executed. 
    53485353stmt_len (IN) - length of the statement. Must not be zero. 
     
    53505355OCI_V7_SYNTAX - V7 ORACLE parsing syntax 
    53515356OCI_V8_SYNTAX - V8 ORACLE parsing syntax 
    5352 OCI_NTV_SYNTAX - syntax depending upon the version of the server.  
    5353 mode (IN) - the only defined mode is OCI_DEFAULT for default mode.  
     5357OCI_NTV_SYNTAX - syntax depending upon the version of the server. 
     5358mode (IN) - the only defined mode is OCI_DEFAULT for default mode. 
    53545359Example 
    5355 This example demonstrates the use of OCIStmtPrepare(), as well as the OCI  
     5360This example demonstrates the use of OCIStmtPrepare(), as well as the OCI 
    53565361application initialization calls. 
    53575362Related Functions 
     
    53925397errhp (IN) - an error handle to retrieve diagnostic information. 
    53935398stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null- 
    5394             terminated string. The pointer to the OraText of the statement  
     5399            terminated string. The pointer to the OraText of the statement 
    53955400            must be available as long as the statement is executed. 
    53965401stmt_len (IN) - length of the statement. Must not be zero. 
     
    54515456                          OCIError          *errhp, 
    54525457                          CONST dvoid       *bufp, 
    5453                           ub4               *alenp,  
     5458                          ub4               *alenp, 
    54545459                          ub1               piece, 
    5455                           CONST dvoid       *indp,  
    5456                           ub2               *rcodep );  
    5457 Comments 
    5458 When an execute call returns OCI_NEED_DATA to get a dynamic IN/OUT  
    5459 bind value or piece, OCIStmtSetPieceInfo() sets the piece information: the  
     5460                          CONST dvoid       *indp, 
     5461                          ub2               *rcodep ); 
     5462Comments 
     5463When an execute call returns OCI_NEED_DATA to get a dynamic IN/OUT 
     5464bind value or piece, OCIStmtSetPieceInfo() sets the piece information: the 
    54605465buffer, the length, the indicator and which piece is currently being processed. 
    5461 For more information about using OCIStmtSetPieceInfo() see the section  
     5466For more information about using OCIStmtSetPieceInfo() see the section 
    54625467"Runtime Data Allocation and Piecewise Operations" on page 5-16. 
    54635468Parameters 
    54645469hndlp (IN/OUT) - the bind/define handle. 
    5465 type (IN) - type of the handle.  
    5466 errhp (OUT) - an error handle which can be passed to OCIErrorGet() for  
     5470type (IN) - type of the handle. 
     5471errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
    54675472diagnostic information in the event of an error. 
    5468 bufp (IN/OUT) - bufp is a pointer to a storage containing the data value or  
    5469 the piece when it is an IN bind variable, otherwise bufp is a pointer to  
     5473bufp (IN/OUT) - bufp is a pointer to a storage containing the data value or 
     5474the piece when it is an IN bind variable, otherwise bufp is a pointer to 
    54705475storage for getting a piece or a value for OUT binds and define variables. For 
    54715476named data types or REFs, a pointer to the object or REF is returned. 
    5472 alenp (IN/OUT) - the length of the piece or the value.  
    5473 piece (IN) - the piece parameter. The following are valid values:  
    5474 OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE, or  
    5475 OCI_LAST_PIECE.  
    5476 The default value is OCI_ONE_PIECE. This parameter is used for IN bind  
     5477alenp (IN/OUT) - the length of the piece or the value. 
     5478piece (IN) - the piece parameter. The following are valid values: 
     5479OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE, or 
     5480OCI_LAST_PIECE. 
     5481The default value is OCI_ONE_PIECE. This parameter is used for IN bind 
    54775482variables only. 
    5478 indp (IN/OUT) - indicator. A pointer to a sb2 value or pointer to an indicator  
    5479 structure for named data types (SQLT_NTY) and REFs (SQLT_REF), i.e., *indp  
     5483indp (IN/OUT) - indicator. A pointer to a sb2 value or pointer to an indicator 
     5484structure for named data types (SQLT_NTY) and REFs (SQLT_REF), i.e., *indp 
    54805485is either an sb2 or a dvoid * depending upon the data type. 
    5481 rcodep (IN/OUT) - return code.  
    5482 Related Functions 
    5483 OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(),  
     5486rcodep (IN/OUT) - return code. 
     5487Related Functions 
     5488OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
    54845489OCIStmtGetPieceInfo() 
    54855490 
     
    55295534 
    55305535 
    5531 OCIFormatTerm  
     5536OCIFormatTerm 
    55325537Name 
    55335538OCIFormat Package Terminate 
     
    58425847Comments 
    58435848Toggles between an Oracle8 service context handle and an Oracle7 Lda_Def. 
    5844 This function can only be called after a service context has been properly  
     5849This function can only be called after a service context has been properly 
    58455850initialized. 
    5846 Once the service context has been translated to an Lda_Def, it can be used in  
     5851Once the service context has been translated to an Lda_Def, it can be used in 
    58475852release 7.x OCI calls (e.g., obindps(), ofen()). 
    5848 Note: If there are multiple service contexts which share the same server  
     5853Note: If there are multiple service contexts which share the same server 
    58495854handle, only one can be in V7 mode at any time. 
    5850 The action of this call can be reversed by passing the resulting Lda_Def to  
     5855The action of this call can be reversed by passing the resulting Lda_Def to 
    58515856the OCILdaToSvcCtx() function. 
    58525857Parameters 
    5853 svchp (IN/OUT) - the service context handle.  
    5854 errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for  
    5855 diagnostic information in the event of an error.  
    5856 ldap (IN/OUT) - a Logon Data Area for V7-style OCI calls which is initialized  
    5857 by this call.  
     5858svchp (IN/OUT) - the service context handle. 
     5859errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
     5860diagnostic information in the event of an error. 
     5861ldap (IN/OUT) - a Logon Data Area for V7-style OCI calls which is initialized 
     5862by this call. 
    58585863Related Functions 
    58595864OCILdaToSvcCtx() 
     
    58725877                     ub4          flags ); 
    58735878Comments 
    5874 The transaction currently associated with the service context is committed. If  
    5875 it is a distributed transaction that the server cannot commit, this call  
    5876 additionally retrieves the state of the transaction from the database to be  
     5879The transaction currently associated with the service context is committed. If 
     5880it is a distributed transaction that the server cannot commit, this call 
     5881additionally retrieves the state of the transaction from the database to be 
    58775882returned to the user in the error handle. 
    5878 If the application has defined multiple transactions, this function operates  
    5879 on the transaction currently associated with the service context. If the  
    5880 application is working with only the implicit local transaction created when  
     5883If the application has defined multiple transactions, this function operates 
     5884on the transaction currently associated with the service context. If the 
     5885application is working with only the implicit local transaction created when 
    58815886database changes are made, that implicit transaction is committed. 
    5882 If the application is running in the object mode, then the modified or updated  
     5887If the application is running in the object mode, then the modified or updated 
    58835888objects in the object cache for this transaction are also committed. 
    5884 The flags parameter is used for one-phase commit optimization in distributed  
    5885 transactions. If the transaction is non-distributed, the flags parameter is  
    5886 ignored, and OCI_DEFAULT can be passed as its value. OCI applications  
    5887 managing global transactions should pass a value of  
    5888 OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The  
     5889The flags parameter is used for one-phase commit optimization in distributed 
     5890transactions. If the transaction is non-distributed, the flags parameter is 
     5891ignored, and OCI_DEFAULT can be passed as its value. OCI applications 
     5892managing global transactions should pass a value of 
     5893OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The 
    58895894default is one-phase commit. 
    5890 Under normal circumstances, OCITransCommit() returns with a status  
    5891 indicating that the transaction has either been committed or rolled back. With  
    5892 distributed transactions, it is possible that the transaction is now in-doubt  
    5893 (i.e., neither committed nor aborted). In this case, OCITransCommit()  
    5894 attempts to retrieve the status of the transaction from the server.  
     5895Under normal circumstances, OCITransCommit() returns with a status 
     5896indicating that the transaction has either been committed or rolled back. With 
     5897distributed transactions, it is possible that the transaction is now in-doubt 
     5898(i.e., neither committed nor aborted). In this case, OCITransCommit() 
     5899attempts to retrieve the status of the transaction from the server. 
    58955900The status is returned. 
    58965901Parameters 
    58975902srvcp (IN) - the service context handle. 
    5898 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     5903errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    58995904diagnostic information in the event of an error. 
    59005905flags -see the "Comments" section above. 
     
    59155920                     ub4          flags); 
    59165921Comments 
    5917 Detaches a global transaction from the service context handle. The transaction  
    5918 currently attached to the service context handle becomes inactive at the end  
    5919 of this call. The transaction may be resumed later by calling OCITransStart(),  
     5922Detaches a global transaction from the service context handle. The transaction 
     5923currently attached to the service context handle becomes inactive at the end 
     5924of this call. The transaction may be resumed later by calling OCITransStart(), 
    59205925specifying  a flags value of OCI_TRANS_RESUME. 
    5921 When a transaction is detached, the value which was specified in the timeout  
    5922 parameter of OCITransStart() when the transaction was started is used to  
    5923 determine the amount of time the branch can remain inactive before being  
     5926When a transaction is detached, the value which was specified in the timeout 
     5927parameter of OCITransStart() when the transaction was started is used to 
     5928determine the amount of time the branch can remain inactive before being 
    59245929deleted by the server's PMON process. 
    5925 Note: The transaction can be resumed by a different process than the one  
    5926 that detached it, provided that the transaction has the same  
     5930Note: The transaction can be resumed by a different process than the one 
     5931that detached it, provided that the transaction has the same 
    59275932authorization. 
    59285933Parameters 
    5929 srvcp (IN) - the service context handle.  
    5930 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     5934srvcp (IN) - the service context handle. 
     5935errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    59315936diagnostic information in the event of an error. 
    59325937flags (IN) - you must pass a value of OCI_DEFAULT for this parameter. 
     
    59425947Causes the server to forget a heuristically completed global transaction. 
    59435948Syntax 
    5944 sword OCITransForget ( OCISvcCtx     *svchp,  
     5949sword OCITransForget ( OCISvcCtx     *svchp, 
    59455950                     OCIError      *errhp, 
    59465951                     ub4           flags); 
     
    59485953Comments 
    59495954 
    5950 Forgets a heuristically completed global transaction. The server deletes the  
     5955Forgets a heuristically completed global transaction. The server deletes the 
    59515956status of the transaction from the system's pending transaction table. 
    5952 The XID of the transaction to be forgotten is set as an attribute of the  
     5957The XID of the transaction to be forgotten is set as an attribute of the 
    59535958transaction handle (OCI_ATTR_XID). 
    59545959Parameters 
    59555960srvcp (IN) - the service context handle - the transaction is rolled back. 
    5956 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     5961errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    59575962diagnostic information in the event of an error. 
    59585963flags (IN) - you must pass OCI_DEFAULT for this parameter. 
     
    59615966 
    59625967 
    5963 OCITransMultiPrepare()  
     5968OCITransMultiPrepare() 
    59645969Name 
    59655970OCI Trans(action) Multi-Branch Prepare 
     
    59785983This call is an advanced performance feature intended for use only in 
    59795984situations where the caller is responsible for preparing all the branches 
    5980 in a transaction.  
    5981 Parameters 
    5982 srvcp (IN) - the service context handle.  
     5985in a transaction. 
     5986Parameters 
     5987srvcp (IN) - the service context handle. 
    59835988numBranches (IN) - This is the number of branches expected. It is also the 
    59845989array size for the next two parameters. 
     
    59986003Prepares a transaction for commit. 
    59996004Syntax 
    6000 sword OCITransPrepare ( OCISvcCtx    *svchp,  
     6005sword OCITransPrepare ( OCISvcCtx    *svchp, 
    60016006                      OCIError     *errhp, 
    60026007                      ub4          flags); 
     
    60066011Prepares the specified global transaction for commit. 
    60076012This call is valid only for distributed transactions. 
    6008 The call returns OCI_SUCCESS_WITH_INFO if the transaction has not made  
    6009 any changes. The error handle will indicate that the transaction is read-only.  
    6010 The flag parameter is not currently used.  
    6011 Parameters 
    6012 srvcp (IN) - the service context handle.  
    6013 errhp (IN) - an error handle which can be passed to OCIErrorGet() for  
     6013The call returns OCI_SUCCESS_WITH_INFO if the transaction has not made 
     6014any changes. The error handle will indicate that the transaction is read-only. 
     6015The flag parameter is not currently used. 
     6016Parameters 
     6017srvcp (IN) - the service context handle. 
     6018errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
    60146019diagnostic information in the event of an error. 
    60156020flags (IN) - you must pass OCI_DEFAULT for this parameter. 
     
    60266031Rolls back the current transaction. 
    60276032Syntax 
    6028 sword OCITransRollback ( dvoid        *svchp,  
     6033sword OCITransRollback ( dvoid        *svchp, 
    60296034                       OCIError     *errhp, 
    60306035                       ub4          flags ); 
    60316036Comments 
    6032 The current transaction- defined as the set of statements executed since the  
     6037The current transaction- defined as the set of statements executed since the 
    60336038last OCITransCommit() or since OCISessionBegin()-is rolled back. 
    6034 If the application is running under object mode then the modified or updated  
     6039If the application is running under object mode then the modified or updated 
    60356040objects in the object cache for this transaction are also rolled back. 
    6036 An error is returned if an attempt is made to roll back a global transaction  
     6041An error is returned if an attempt is made to roll back a global transaction 
    60376042that is not currently active. 
    60386043Parameters 
    6039 svchp (IN) - a service context handle. The transaction currently set in the  
     6044svchp (IN) - a service context handle. The transaction currently set in the 
    60406045service context handle is rolled back. 
    6041 errhp -(IN) - an error handle which can be passed to OCIErrorGet() for  
     6046errhp -(IN) - an error handle which can be passed to OCIErrorGet() for 
    60426047diagnostic information in the event of an error. 
    60436048flags - you must pass a value of OCI_DEFAULT for this parameter. 
     
    60546059Sets the beginning of a transaction. 
    60556060Syntax 
    6056 sword OCITransStart ( OCISvcCtx    *svchp,  
    6057                     OCIError     *errhp,  
     6061sword OCITransStart ( OCISvcCtx    *svchp, 
     6062                    OCIError     *errhp, 
    60586063                    uword        timeout, 
    60596064                    ub4          flags); 
    60606065 
    60616066Comments 
    6062 This function sets the beginning of a global or serializable transaction. The  
    6063 transaction context currently associated with the service context handle is  
    6064 initialized at the end of the call if the flags parameter specifies that a new  
     6067This function sets the beginning of a global or serializable transaction. The 
     6068transaction context currently associated with the service context handle is 
     6069initialized at the end of the call if the flags parameter specifies that a new 
    60656070transaction should be started. 
    6066 The XID of the transaction is set as an attribute of the transaction handle  
     6071The XID of the transaction is set as an attribute of the transaction handle 
    60676072(OCI_ATTR_XID) 
    60686073Parameters 
    6069 svchp (IN/OUT) - the service context handle. The transaction context in the  
    6070 service context handle is initialized at the end of the call if the flag  
     6074svchp (IN/OUT) - the service context handle. The transaction context in the 
     6075service context handle is initialized at the end of the call if the flag 
    60716076specified a new transaction to be started. 
    6072 errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in  
    6073 err and this function returns OCI_ERROR. Diagnostic information can be  
     6077errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
     6078err and this function returns OCI_ERROR. Diagnostic information can be 
    60746079obtained by calling OCIErrorGet(). 
    6075 timeout (IN) - the time, in seconds, to wait for a transaction to become  
    6076 available for resumption when OCI_TRANS_RESUME is specified. When  
    6077 OCI_TRANS_NEW is specified, this value is stored and may be used later by  
     6080timeout (IN) - the time, in seconds, to wait for a transaction to become 
     6081available for resumption when OCI_TRANS_RESUME is specified. When 
     6082OCI_TRANS_NEW is specified, this value is stored and may be used later by 
    60786083OCITransDetach(). 
    6079 flags (IN) - specifies whether a new transaction is being started or an  
    6080 existing transaction is being resumed. Also specifies serializiability or  
    6081 read-only status. More than a single value can be specified. By default,  
     6084flags (IN) - specifies whether a new transaction is being started or an 
     6085existing transaction is being resumed. Also specifies serializiability or 
     6086read-only status. More than a single value can be specified. By default, 
    60826087a read/write transaction is started. The flag values are: 
    6083 OCI_TRANS_NEW - starts a new transaction branch. By default starts a  
     6088OCI_TRANS_NEW - starts a new transaction branch. By default starts a 
    60846089tightly coupled and migratable branch. 
    60856090OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch 
    60866091OCI_TRANS_LOOSE - specifies a loosely coupled branch 
    6087 OCI_TRANS_RESUME - resumes an existing transaction branch.  
     6092OCI_TRANS_RESUME - resumes an existing transaction branch. 
    60886093OCI_TRANS_READONLY - start a readonly transaction 
    60896094OCI_TRANS_SERIALIZABLE - start a serializable transaction 
     
    61156120 * 
    61166121 */ 
    6117 alias sword function(OCIEnv* env, ub4 mode, size_t xtramem_sz, dvoid* usrmemp, OCIUcb* ucbDesc) OCIEnvCallbackType;  
     6122alias sword function(OCIEnv* env, ub4 mode, size_t xtramem_sz, dvoid* usrmemp, OCIUcb* ucbDesc) OCIEnvCallbackType; 
    61186123 
    61196124/** 
     
    69686973 * 
    69696974 */ 
    6970 extern (C) sword OCIAQEnq (OCISvcCtx* svchp, OCIError* errhp, OraText* queue_name, OCIAQEnqOptions* enqopt, OCIAQMsgProperties* msgprop, OCIType* payload_tdo, dvoid** payload, dvoid** payload_ind, OCIRaw** msgid, ub4 flags);  
    6971  
    6972 /** 
    6973  * 
    6974  */ 
    6975 extern (C) sword OCIAQDeq (OCISvcCtx* svchp, OCIError* errhp, OraText* queue_name, OCIAQDeqOptions* deqopt, OCIAQMsgProperties* msgprop, OCIType* payload_tdo, dvoid** payload, dvoid** payload_ind, OCIRaw** msgid, ub4 flags);  
     6975extern (C) sword OCIAQEnq (OCISvcCtx* svchp, OCIError* errhp, OraText* queue_name, OCIAQEnqOptions* enqopt, OCIAQMsgProperties* msgprop, OCIType* payload_tdo, dvoid** payload, dvoid** payload_ind, OCIRaw** msgid, ub4 flags); 
     6976 
     6977/** 
     6978 * 
     6979 */ 
     6980extern (C) sword OCIAQDeq (OCISvcCtx* svchp, OCIError* errhp, OraText* queue_name, OCIAQDeqOptions* deqopt, OCIAQMsgProperties* msgprop, OCIType* payload_tdo, dvoid** payload, dvoid** payload_ind, OCIRaw** msgid, ub4 flags); 
    69766981 
    69776982/** 
     
    73167321     This call allocates an OCIAnyDataSet for the duration of dur and 
    73177322     initializes it with the type information. The OCIAnyDataSet can hold 
    7318      multiple instances of the given type. For performance reasons, the  
     7323     multiple instances of the given type. For performance reasons, the 
    73197324     OCIAnyDataSet will end up pointing to the passed in OCIType parameter. 
    73207325     It is the responsibility of the caller to ensure that the OCIType is 
     
    76267631     OCINlsGetInfo - Get NLS info from OCI environment handle 
    76277632   REMARKS 
    7628      This function generates language information specified by item from OCI  
    7629      environment handle envhp into an array pointed to by buf within size  
     7633     This function generates language information specified by item from OCI 
     7634     environment handle envhp into an array pointed to by buf within size 
    76307635     limitation as buflen. 
    76317636   RETURNS 
     
    76347639     OCI environment handle. 
    76357640   errhp(IN/OUT) 
    7636      The OCI error handle. If there is an error, it is record in errhp and  
    7637      this function returns a NULL pointer. Diagnostic information can be  
     7641     The OCI error handle. If there is an error, it is record in errhp and 
     7642     this function returns a NULL pointer. Diagnostic information can be 
    76387643     obtained by calling OCIErrorGet(). 
    76397644   buf(OUT) 
     
    76847689       OCI_NLS_ABMONTHNAME12 : Native abbreviated name for December. 
    76857690       OCI_NLS_YES : Native string for affirmative response. 
    7686        OCI_NLS_NO : Native negative response.  
     7691       OCI_NLS_NO : Native negative response. 
    76877692       OCI_NLS_AM : Native equivalent string of AM. 
    76887693       OCI_NLS_PM : Native equivalent string of PM. 
     
    77107715     OCINlsNumericInfoGet - Get NLS numeric info from OCI environment handle 
    77117716   REMARKS 
    7712      This function generates numeric language information specified by item  
     7717     This function generates numeric language information specified by item 
    77137718     from OCI environment handle envhp into an output number variable. 
    77147719   RETURNS 
     
    77177722     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE. 
    77187723   errhp(IN/OUT) 
    7719      The OCI error handle. If there is an error, it is record in errhp and  
    7720      this function returns a NULL pointer. Diagnostic information can be  
     7724     The OCI error handle. If there is an error, it is record in errhp and 
     7725     this function returns a NULL pointer. Diagnostic information can be 
    77217726     obtained by calling OCIErrorGet(). 
    77227727   val(OUT) 
     
    77297734                                   environment or session handle charset 
    77307735       OCI_NLS_CHARSET_FIXEDWIDTH: Character byte size for fixed-width charset; 
    7731                                    0 for variable-width charset  
     7736                                   0 for variable-width charset 
    77327737*/ 
    77337738extern (C) sword OCINlsNumericInfoGet (dvoid* envhp, OCIError* errhp, sb4* val, ub2 item); 
     
    77457750     OCI environment handle. 
    77467751   name(IN) 
    7747      Pointer to a null-terminated Oracle character set name whose id  
     7752     Pointer to a null-terminated Oracle character set name whose id 
    77487753     will be returned. 
    77497754*/ 
     
    77747779/* 
    77757780   NAME 
    7776      OCINlsNameMap - Map NLS naming from Oracle to other standards and vice  
     7781     OCINlsNameMap - Map NLS naming from Oracle to other standards and vice 
    77777782                     versa 
    77787783   REMARKS 
     
    77847789     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE. 
    77857790   buf(OUT) 
    7786      Pointer to the destination buffer. On OCI_SUCCESS return, it will  
     7791     Pointer to the destination buffer. On OCI_SUCCESS return, it will 
    77877792     contain null-terminated string for requested mapped name. 
    77887793   buflen(IN) 
     
    78107815/* 
    78117816   NAME 
    7812      OCIMultiByteToWideChar - Convert a null terminated multibyte string into  
     7817     OCIMultiByteToWideChar - Convert a null terminated multibyte string into 
    78137818                              wchar 
    78147819   REMARKS 
    7815      This routine converts an entire null-terminated string into the wchar  
     7820     This routine converts an entire null-terminated string into the wchar 
    78167821     format. The wchar output buffer will be null-terminated. 
    78177822   RETURNS 
     
    78857890/* 
    78867891   NAME 
    7887      OCIWideCharInSizeToMultiByte - Convert a wchar string in length into  
     7892     OCIWideCharInSizeToMultiByte - Convert a wchar string in length into 
    78887893                                    mulitbyte 
    78897894   REMARKS 
     
    78927897     output buffer size or input buffer size or it reaches a null-terminator 
    78937898     in source string. The output buffer will be null-terminated if space 
    7894      permits. If dstsz is zero, the function just returns the size of byte not  
     7899     permits. If dstsz is zero, the function just returns the size of byte not 
    78957900     including ending null-terminator need to store the converted string. 
    78967901   RETURNS 
     
    81708175       OCI_NLS_BINARY : for the binary comparison, this is default value. 
    81718176       OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale. 
    8172      This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive  
     8177     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
    81738178     comparison. 
    81748179*/ 
     
    82378242     This function computes the number of characters in the wchar string 
    82388243     pointed to by wstr, not including the null-terminator, and returns 
    8239     this number.  
     8244    this number. 
    82408245   RETURNS 
    82418246     number of characters not including ending null-terminator. 
     
    82548259     characters from wsrcstr are appended to wdststr. Note that the 
    82558260     null-terminator in wsrcstr will stop appending. wdststr will be 
    8256      null-terminated..  
     8261     null-terminated.. 
    82578262   RETURNS 
    82588263     Number of characters in the result string not including the ending 
     
    83388343   REMARKS 
    83398344     This function determines the number of column positions required for wc 
    8340      in display. It returns number of column positions, or 0 if wc is  
     8345     in display. It returns number of column positions, or 0 if wc is 
    83418346     null-terminator. 
    83428347   RETURNS 
     
    83858390       OCI_NLS_BINARY: for the binary comparison, this is default value. 
    83868391       OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale. 
    8387      This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive  
     8392     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
    83888393     comparison. 
    83898394*/ 
     
    84168421       OCI_NLS_BINARY: for the binary comparison, this is default value. 
    84178422       OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale. 
    8418      This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive  
     8423     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
    84198424     comparison. 
    84208425*/ 
     
    84478452     This function copies the multi-byte string pointed to by srcstr, 
    84488453     including the null-terminator, into the array pointed to by dststr. It 
    8449      returns the number of bytes copied not including the ending  
     8454     returns the number of bytes copied not including the ending 
    84508455     null-terminator. 
    84518456   RETURNS 
     
    84668471     This function computes the number of bytes in the multi-byte string 
    84678472     pointed to by str, not including the null-terminator, and returns this 
    8468      number.  
     8473     number. 
    84698474   RETURNS 
    84708475     number of bytes not including ending null-terminator. 
     
    84818486     bytes from srcstr are appended to dststr. Note that the null-terminator in 
    84828487     srcstr will stop appending and the function will append as many character 
    8483      as possible within n bytes. dststr will be null-terminated.  
     8488     as possible within n bytes. dststr will be null-terminated. 
    84848489   RETURNS 
    84858490     Number of bytes in the result string not including the ending 
     
    85038508     bytes are copied from the array pointed to by srcstr to the array pointed 
    85048509     to by dststr. Note that the null-terminator in srcstr will stop coping and 
    8505      the function will copy as many character as possible within n bytes. The  
     8510     the function will copy as many character as possible within n bytes. The 
    85068511     result string will be null-terminated. 
    85078512   RETURNS 
     
    85238528                                     multibyt string 
    85248529   REMARKS 
    8525      This function returns the number of display positions occupied by the  
     8530     This function returns the number of display positions occupied by the 
    85268531     complete characters within the range of n bytes. 
    85278532   RETURNS 
     
    85558560       OCI_NLS_UPPERCASE: convert to uppercase. 
    85568561       OCI_NLS_LOWERCASE: convert to lowercase. 
    8557      This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the  
     8562     This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the 
    85588563     linguistic setting in the locale will be used for case conversion. 
    85598564*/ 
     
    85648569     OCICharSetToUnicode - convert multibyte string into Unicode as UCS2 
    85658570   REMARKS 
    8566      This function converts a multi-byte string pointed to by src to Unicode  
     8571     This function converts a multi-byte string pointed to by src to Unicode 
    85678572     into the array pointed to by dst. The conversion will stop when it reach 
    8568      to the source limitation or destination limitation.  
     8573     to the source limitation or destination limitation. 
    85698574     The function will return number of characters converted into Unicode. 
    85708575     If dstlen is zero, it will just return the number of characters for the 
     
    85968601     to the source limitation or destination limitation. The function will 
    85978602     return number of bytes converted into multi-byte. If dstlen is zero, it 
    8598      will just return the number of bytes for the result without real  
     8603     will just return the number of bytes for the result without real 
    85998604     conversion. If a Unicode character is not convertible for the character 
    86008605     set specified in OCI environment handle, a replacement character will be 
     
    86658670/* 
    86668671   NAME 
    8667      OCICharsetConversionIsReplacementUsed - chech if replacement is used in  
     8672     OCICharsetConversionIsReplacementUsed - chech if replacement is used in 
    86688673                                             conversion 
    86698674   REMARKS 
     
    86758680     invoking, else FALSE. 
    86768681   envhp(IN/OUT) 
    8677      OCI environment handle. This should be the first handle passed to  
     8682     OCI environment handle. This should be the first handle passed to 
    86788683     OCICharsetUcs2ToMb(). 
    86798684*/ 
     
    87448749   facility(IN) 
    87458750     A pointer to a facility name in the product. It is used to construct a 
    8746      message file name. A message file name follows the conversion with  
     8751     message file name. A message file name follows the conversion with 
    87478752     facility as prefix. For example, the message file name for facility 
    8748      `img' in American language will be `imgus.msb' where `us' is the  
    8749      abbreviation of American language and `msb' as message binary file  
     8753     `img' in American language will be `imgus.msb' where `us' is the 
     8754     abbreviation of American language and `msb' as message binary file 
    87508755     extension. 
    87518756   dur(IN) 
     
    88178822threading on platforms which do not have native threading capability. 
    88188823 
    8819 OCIThread does not provide a portable implementation of multithreaded  
    8820 facilities.  It only serves as a set of portable covers for native  
    8821 multithreaded facilities.  Therefore, platforms that do not have native  
    8822 support for multi-threading will only be able to support a limited  
    8823 implementation of OCIThread.  As a result, products that rely on all of  
    8824 OCIThread's functionality will not port to all platforms.  Products that must  
    8825 port to all platforms must use only a subset of OCIThread's functionality.   
     8824OCIThread does not provide a portable implementation of multithreaded 
     8825facilities.  It only serves as a set of portable covers for native 
     8826multithreaded facilities.  Therefore, platforms that do not have native 
     8827support for multi-threading will only be able to support a limited 
     8828implementation of OCIThread.  As a result, products that rely on all of 
     8829OCIThread's functionality will not port to all platforms.  Products that must 
     8830port to all platforms must use only a subset of OCIThread's functionality. 
    88268831This issue is discussed further in later sections of this document. 
    88278832 
     
    88338838     These calls deal with the initialization and termination of OCIThread. 
    88348839     Initialization of OCIThread initializes the OCIThread context which is 
    8835      a member of the OCI environment or session handle.  This context is  
     8840     a member of the OCI environment or session handle.  This context is 
    88368841     required for other OCIThread calls. 
    88378842 
     
    88498854     As a result, OCIThread clients that use only these primitives will not 
    88508855     require the existence of multiple threads in order to work correctly, 
    8851      i.e., they will be able to work in single-threaded environments without  
     8856     i.e., they will be able to work in single-threaded environments without 
    88528857     branching code. 
    88538858 
     
    88848889  ------------------------------------- 
    88858890 
    8886     Most calls to OCIThread functions take the OCI environment or session  
    8887     handle as a parameter.  The OCIThread context is part of the OCI  
    8888     environment or session handle and it must be initialized by calling  
     8891    Most calls to OCIThread functions take the OCI environment or session 
     8892    handle as a parameter.  The OCIThread context is part of the OCI 
     8893    environment or session handle and it must be initialized by calling 
    88898894    'OCIThreadInit()'.  Termination of the OCIThread context occurs by calling 
    88908895    'OCIThreadTerm()'. 
     
    89458950 
    89468951        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    8947                      is returned, the error is recorded in err and diagnostic  
     8952                     is returned, the error is recorded in err and diagnostic 
    89488953                     information can be obtained by calling OCIErrorGet(). 
    89498954 
     
    89848989 
    89858990        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    8986                      is returned, the error is recorded in err and diagnostic  
     8991                     is returned, the error is recorded in err and diagnostic 
    89878992                     information can be obtained by calling OCIErrorGet(). 
    89888993 
     
    902490291.2.1 Types 
    90259030 
    9026 The passive threading primitives deal with the manipulation of mutex,  
    9027 thread ID's, and thread-specific data.  Since the specifications of these  
    9028 primitives do not require the existence of multiple threads, they can be  
     9031The passive threading primitives deal with the manipulation of mutex, 
     9032thread ID's, and thread-specific data.  Since the specifications of these 
     9033primitives do not require the existence of multiple threads, they can be 
    90299034used both on multithreaded and single-threaded platforms. 
    90309035 
     
    90389043  code at a time. 
    90399044 
    9040   Mutexes pointer can be declared as parts of client structures or as  
    9041   stand-alone variables.  Before they can be used, they must be initialized  
     9045  Mutexes pointer can be declared as parts of client structures or as 
     9046  stand-alone variables.  Before they can be used, they must be initialized 
    90429047  using 'OCIThreadMutexInit()'.  Once they are no longer needed, they must be 
    9043   destroyed using 'OCIThreadMutexDestroy()'.  A mutex pointer must NOT be  
     9048  destroyed using 'OCIThreadMutexDestroy()'.  A mutex pointer must NOT be 
    90449049  used after it is destroyed. 
    90459050 
     
    91379142    Description 
    91389143 
    9139       This allocate and initializes a mutex.  All mutexes must be  
     9144      This allocate and initializes a mutex.  All mutexes must be 
    91409145      initialized prior to use. 
    91419146 
    91429147    Prototype 
    91439148 
    9144       sword OCIThreadMutexInit(dvoid* hndl, OCIError* err,  
     9149      sword OCIThreadMutexInit(dvoid* hndl, OCIError* err, 
    91459150                               OCIThreadMutex** mutex); 
    91469151 
     
    91489153 
    91499154        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9150                      is returned, the error is recorded in err and diagnostic  
     9155                     is returned, the error is recorded in err and diagnostic 
    91519156                     information can be obtained by calling OCIErrorGet(). 
    91529157 
     
    91689173    Description 
    91699174 
    9170       This destroys and deallocate a mutex.  Each mutex must be destroyed  
     9175      This destroys and deallocate a mutex.  Each mutex must be destroyed 
    91719176      once it is no longer needed. 
    91729177 
     
    91799184 
    91809185        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9181                      is returned, the error is recorded in err and diagnostic  
     9186                     is returned, the error is recorded in err and diagnostic 
    91829187                     information can be obtained by calling OCIErrorGet(). 
    91839188 
     
    92129217        hndl(IN/OUT): The OCI environment or session handle. 
    92139218 
    9214         err(IN/OUT): The OCI error handle.  If there is an error, it is  
    9215                      recorded in err and this function returns OCI_ERROR.   
    9216                      Diagnostic information can be obtained by calling  
     9219        err(IN/OUT): The OCI error handle.  If there is an error, it is 
     9220                     recorded in err and this function returns OCI_ERROR. 
     9221                     Diagnostic information can be obtained by calling 
    92179222                     OCIErrorGet(). 
    92189223 
     
    92489253 
    92499254        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9250                      is returned, the error is recorded in err and diagnostic  
     9255                     is returned, the error is recorded in err and diagnostic 
    92519256                     information can be obtained by calling OCIErrorGet(). 
    92529257 
     
    92689273    Description 
    92699274 
    9270       This creates a key.  Each call to this routine allocate and generates  
     9275      This creates a key.  Each call to this routine allocate and generates 
    92719276      a new key that is distinct from all other keys. 
    92729277 
     
    92799284 
    92809285        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9281                      is returned, the error is recorded in err and diagnostic  
     9286                     is returned, the error is recorded in err and diagnostic 
    92829287                     information can be obtained by calling OCIErrorGet(). 
    92839288 
     
    92929297    Notes 
    92939298 
    9294       Once this function executes successfully, a pointer to an allocated and  
     9299      Once this function executes successfully, a pointer to an allocated and 
    92959300      initialized key is return.  That key can be used with 'OCIThreadKeyGet()' 
    92969301      and 'OCIThreadKeySet()'.  The initial value of the key will be 'NULL' for 
     
    93189323    Prototype 
    93199324 
    9320       sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err,  
     9325      sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err, 
    93219326                                OCIThreadKey** key); 
    93229327 
     
    93249329 
    93259330        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9326                      is returned, the error is recorded in err and diagnostic  
     9331                     is returned, the error is recorded in err and diagnostic 
    93279332                     information can be obtained by calling OCIErrorGet(). 
    93289333 
    93299334        key(IN/OUT):  The 'OCIThreadKey' in which to destroy the key. 
    9330   
     9335 
    93319336    Returns 
    93329337 
     
    93369341 
    93379342      This is different from the destructor function callback passed to the 
    9338       key create routine.  This new destroy function 'OCIThreadKeyDestroy' is  
    9339       used to terminate any resources OCI THREAD acquired when it created  
    9340       'key'.  [The 'OCIThreadKeyDestFunc' callback type is a key VALUE  
     9343      key create routine.  This new destroy function 'OCIThreadKeyDestroy' is 
     9344      used to terminate any resources OCI THREAD acquired when it created 
     9345      'key'.  [The 'OCIThreadKeyDestFunc' callback type is a key VALUE 
    93419346      destructor; it does in no way operate on the key itself.] 
    93429347 
     
    93659370 
    93669371        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9367                      is returned, the error is recorded in err and diagnostic  
     9372                     is returned, the error is recorded in err and diagnostic 
    93689373                     information can be obtained by calling OCIErrorGet(). 
    93699374 
     
    94019406 
    94029407        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9403                      is returned, the error is recorded in err and diagnostic  
     9408                     is returned, the error is recorded in err and diagnostic 
    94049409                     information can be obtained by calling OCIErrorGet(). 
    94059410 
     
    94349439 
    94359440        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9436                      is returned, the error is recorded in err and diagnostic  
     9441                     is returned, the error is recorded in err and diagnostic 
    94379442                     information can be obtained by calling OCIErrorGet(). 
    94389443 
     
    94589463 
    94599464        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9460                      is returned, the error is recorded in err and diagnostic  
     9465                     is returned, the error is recorded in err and diagnostic 
    94619466                     information can be obtained by calling OCIErrorGet(). 
    94629467 
     
    94819486    Prototype 
    94829487 
    9483       sword OCIThreadIdSet(dvoid *hndl, OCIError *err,  
     9488      sword OCIThreadIdSet(dvoid *hndl, OCIError *err, 
    94849489                           OCIThreadId *tidDest, 
    94859490                           OCIThreadId *tidSrc); 
     
    94889493 
    94899494        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9490                      is returned, the error is recorded in err and diagnostic  
     9495                     is returned, the error is recorded in err and diagnostic 
    94919496                     information can be obtained by calling OCIErrorGet(). 
    94929497 
     
    95199524        hndl(IN/OUT): The OCI environment or session handle. 
    95209525 
    9521         err(IN/OUT): The OCI error handle.  If there is an error, it is  
    9522                      recorded in err and this function returns OCI_ERROR.   
    9523                      Diagnostic information can be obtained by calling  
     9526        err(IN/OUT): The OCI error handle.  If there is an error, it is 
     9527                     recorded in err and this function returns OCI_ERROR. 
     9528                     Diagnostic information can be obtained by calling 
    95249529                     OCIErrorGet(). 
    95259530 
     
    95519556 
    95529557        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9553                      is returned, the error is recorded in err and diagnostic  
     9558                     is returned, the error is recorded in err and diagnostic 
    95549559                     information can be obtained by calling OCIErrorGet(). 
    95559560 
     
    95899594 
    95909595        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9591                      is returned, the error is recorded in err and diagnostic  
     9596                     is returned, the error is recorded in err and diagnostic 
    95929597                     information can be obtained by calling OCIErrorGet(). 
    95939598 
     
    95959600 
    95969601        tid2(IN):   Pointer to the second 'OCIThreadId'. 
    9597          
     9602 
    95989603        result(IN/OUT): Pointer to the result. 
    95999604 
     
    96299634 
    96309635        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9631                      is returned, the error is recorded in err and diagnostic  
     9636                     is returned, the error is recorded in err and diagnostic 
    96329637                     information can be obtained by calling OCIErrorGet(). 
    96339638 
     
    96429647    Notes 
    96439648 
    9644       If 'tid' is the NULL thread ID, 'result' is set to TRUE.  Otherwise,  
     9649      If 'tid' is the NULL thread ID, 'result' is set to TRUE.  Otherwise, 
    96459650      'result' is set to FALSE. 
    96469651 
     
    96559660that it be possible to have multiple threads, they work correctly only in 
    96569661the enabled OCIThread; In the disabled OCIThread, they always return 
    9657 failure.  The exception is OCIThreadHandleGet(); it may be called in a  
     9662failure.  The exception is OCIThreadHandleGet(); it may be called in a 
    96589663single-threaded environment, in which case it will have no effect. 
    96599664 
    96609665Active primitives should only be called by code running in a multi-threaded 
    9661 environment.  You can call OCIThreadIsMulti() to determine whether the  
     9666environment.  You can call OCIThreadIsMulti() to determine whether the 
    96629667environment is multi-threaded or single-threaded. 
    96639668 
     
    96929697    Prototype 
    96939698 
    9694       sword OCIThreadHndInit(dvoid *hndl, OCIError *err,  
     9699      sword OCIThreadHndInit(dvoid *hndl, OCIError *err, 
    96959700                             OCIThreadHandle** thnd); 
    96969701 
     
    96989703 
    96999704        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9700                      is returned, the error is recorded in err and diagnostic  
     9705                     is returned, the error is recorded in err and diagnostic 
    97019706                     information can be obtained by calling OCIErrorGet(). 
    97029707 
     
    97179722    Prototype 
    97189723 
    9719       sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err,  
     9724      sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err, 
    97209725                                OCIThreadHandle** thnd); 
    97219726 
     
    97239728 
    97249729        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9725                      is returned, the error is recorded in err and diagnostic  
     9730                     is returned, the error is recorded in err and diagnostic 
    97269731                     information can be obtained by calling OCIErrorGet(). 
    97279732 
     
    97539758 
    97549759        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9755                      is returned, the error is recorded in err and diagnostic  
     9760                     is returned, the error is recorded in err and diagnostic 
    97569761                     information can be obtained by calling OCIErrorGet(). 
    97579762 
     
    98049809 
    98059810        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9806                      is returned, the error is recorded in err and diagnostic  
     9811                     is returned, the error is recorded in err and diagnostic 
    98079812                     information can be obtained by calling OCIErrorGet(). 
    98089813 
     
    98359840 
    98369841        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9837                      is returned, the error is recorded in err and diagnostic  
     9842                     is returned, the error is recorded in err and diagnostic 
    98389843                     information can be obtained by calling OCIErrorGet(). 
    98399844 
     
    98689873 
    98699874        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR 
    9870                      is returned, the error is recorded in err and diagnostic  
     9875                     is returned, the error is recorded in err and diagnostic 
    98719876                     information can be obtained by calling OCIErrorGet(). 
    98729877 
     
    98809885    Notes 
    98819886 
    9882       'thnd' should be initialized by OCIThreadHndInit().    
    9883  
    9884       The thread handle 'tHnd' retrieved by this function must be closed  
     9887      'thnd' should be initialized by OCIThreadHndInit(). 
     9888 
     9889      The thread handle 'tHnd' retrieved by this function must be closed 
    98859890      with OCIThreadClose() and destroyed by OCIThreadHndDestroy() after it 
    98869891      is used. 
     
    99189923    OCIThread client code written using active primitives will only work 
    99199924    correctly on multi-threaded platforms.  In order to write a version of the 
    9920     same application to run on single-threaded platform, it is necessary to  
    9921     branch the your code, whether by branching versions of the source file or  
     9925    same application to run on single-threaded platform, it is necessary to 
     9926    branch the your code, whether by branching versions of the source file or 
    99229927    by branching at runtime with the OCIThreadIsMulti() call. 
    99239928 
     
    99479952 * 
    99489953 */ 
    9949 extern (C) sword OCIThreadMutexInit (dvoid* hndl, OCIError* err, OCIThreadMutex** mutex);  
     9954extern (C) sword OCIThreadMutexInit (dvoid* hndl, OCIError* err, OCIThreadMutex** mutex); 
    99509955 
    99519956/** 
     
    1033810343 */ 
    1033910344deprecated extern (C) sword ocidefn (OCIStmt* stmtp, OCIDefine* defnp, OCIError* errhp, ub4 position, dvoid* valuep, sb4 value_sz, ub2 dty, dvoid* indp, ub2* rlenp, ub2* rcodep, ub4 mode); 
     10345 
     10346} 
  • trunk/bbconv/dbi/oracle/imp/ociapr.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.ociapr; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.ocidfn; 
    18  
    19 /** 
    20  *  
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.ocidfn, dbi.oracle.imp.oratypes; 
     19 
     20/** 
     21 * 
    2122 * 
    2223 * Params: 
     
    4344 * 
    4445 * Returns: 
    45  *  
     46 * 
    4647 */ 
    4748extern (C) sword obindps (cda_def* cursor, ub1 opcode, OraText* sqlvar, sb4 sqlvl, ub1* pvctx, sb4 progvl, sword ftype, sword scale, sb2* indp, ub2* alen, ub2* arcode, sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip, ub4 maxsiz, ub4* cursiz, OraText* fmt, sb4 fmtl, sword fmtt); 
    4849 
    4950/** 
    50  *  
    51  * 
    52  * Params: 
    53  *  lda = 
    54  * 
    55  * Returns: 
    56  *  
     51 * 
     52 * 
     53 * Params: 
     54 *  lda = 
     55 * 
     56 * Returns: 
     57 * 
    5758 */ 
    5859extern (C) sword obreak (cda_def* lda); 
    5960 
    6061/** 
    61  *  
    62  * 
    63  * Params: 
    64  *  cursor = 
    65  * 
    66  * Returns: 
    67  *  
     62 * 
     63 * 
     64 * Params: 
     65 *  cursor = 
     66 * 
     67 * Returns: 
     68 * 
    6869 */ 
    6970extern (C) sword ocan (cda_def* cursor); 
    7071 
    7172/** 
    72  *  
    73  * 
    74  * Params: 
    75  *  cursor = 
    76  * 
    77  * Returns: 
    78  *  
     73 * 
     74 * 
     75 * Params: 
     76 *  cursor = 
     77 * 
     78 * Returns: 
     79 * 
    7980 */ 
    8081extern (C) sword oclose (cda_def* cursor); 
    8182 
    8283/** 
    83  *  
    84  * 
    85  * Params: 
    86  *  lda = 
    87  * 
    88  * Returns: 
    89  *  
     84 * 
     85 * 
     86 * Params: 
     87 *  lda = 
     88 * 
     89 * Returns: 
     90 * 
    9091 */ 
    9192extern (C) sword ocof (cda_def* lda); 
    9293 
    9394/** 
    94  *  
    95  * 
    96  * Params: 
    97  *  lda = 
    98  * 
    99  * Returns: 
    100  *  
     95 * 
     96 * 
     97 * Params: 
     98 *  lda = 
     99 * 
     100 * Returns: 
     101 * 
    101102 */ 
    102103extern (C) sword ocom (cda_def* lda); 
    103104 
    104105/** 
    105  *  
    106  * 
    107  * Params: 
    108  *  lda = 
    109  * 
    110  * Returns: 
    111  *  
     106 * 
     107 * 
     108 * Params: 
     109 *  lda = 
     110 * 
     111 * Returns: 
     112 * 
    112113 */ 
    113114extern (C) sword ocon (cda_def* lda); 
    114115 
    115116/** 
    116  *  
     117 * 
    117118 * 
    118119 * Params: 
     
    136137 * 
    137138 * Returns: 
    138  *  
     139 * 
    139140 */ 
    140141extern (C) sword odefinps (cda_def* cursor, ub1 opcode, sword pos, ub1* bufctx, sb4 bufl, sword ftype, sword scale, sb2* indp, OraText* fmt, sb4 fmtl, sword fmtt, ub2* rlen, ub2* rcode, sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip); 
    141142 
    142143/** 
    143  *  
     144 * 
    144145 * 
    145146 * Params: 
     
    167168 * 
    168169 * Returns: 
    169  *  
     170 * 
    170171 */ 
    171172extern (C) sword odessp (cda_def* cursor, OraText* objnam, size_t onlen, ub1* rsv1, size_t rsv1ln, ub1* rsv2, size_t rsv2ln, ub2* ovrld, ub2* pos, ub2* level, OraText** argnam, ub2* arnlen, ub2* dtype, ub1* defsup, ub1* mode, ub4* dtsiz, sb2* prec, sb2* scale, ub1* radix, ub4* spare, ub4* arrsiz); 
    172173 
    173174/** 
    174  *  
     175 * 
    175176 * 
    176177 * Params: 
     
    187188 * 
    188189 * Returns: 
    189  *  
     190 * 
    190191 */ 
    191192extern (C) sword odescr (cda_def* cursor, sword pos, sb4* dbsize, sb2* dbtype, sb1* cbuf, sb4* cbufl, sb4* dsize, sb2* prec, sb2* scale, sb2* nullok); 
    192193 
    193194/** 
    194  *  
     195 * 
    195196 * 
    196197 * Params: 
     
    201202 * 
    202203 * Returns: 
    203  *  
     204 * 
    204205 */ 
    205206extern (C) sword oerhms (cda_def* lda, sb2 rcode, OraText* buf, sword bufsiz); 
    206207 
    207208/** 
    208  *  
     209 * 
    209210 * 
    210211 * Params: 
     
    213214 * 
    214215 * Returns: 
    215  *  
     216 * 
    216217 */ 
    217218extern (C) sword oermsg (sb2 rcode, OraText* buf); 
    218219 
    219220/** 
    220  *  
    221  * 
    222  * Params: 
    223  *  cursor = 
    224  * 
    225  * Returns: 
    226  *  
     221 * 
     222 * 
     223 * Params: 
     224 *  cursor = 
     225 * 
     226 * Returns: 
     227 * 
    227228 */ 
    228229extern (C) sword oexec (cda_def* cursor); 
    229230 
    230231/** 
    231  *  
     232 * 
    232233 * 
    233234 * Params: 
     
    238239 * 
    239240 * Returns: 
    240  *  
     241 * 
    241242 */ 
    242243extern (C) sword oexfet (cda_def* cursor, ub4 nrows, sword cancel, sword exact); 
    243244 
    244245/** 
    245  *  
     246 * 
    246247 * 
    247248 * Params: 
     
    251252 * 
    252253 * Returns: 
    253  *  
     254 * 
    254255 */ 
    255256extern (C) sword oexn (cda_def* cursor, sword iters, sword rowoff); 
    256257 
    257258/** 
    258  *  
     259 * 
    259260 * 
    260261 * Params: 
     
    263264 * 
    264265 * Returns: 
    265  *  
     266 * 
    266267 */ 
    267268extern (C) sword ofen (cda_def* cursor, sword nrows); 
    268269 
    269270/** 
    270  *  
    271  * 
    272  * Params: 
    273  *  cursor = 
    274  * 
    275  * Returns: 
    276  *  
     271 * 
     272 * 
     273 * Params: 
     274 *  cursor = 
     275 * 
     276 * Returns: 
     277 * 
    277278 */ 
    278279extern (C) sword ofetch (cda_def* cursor); 
    279280 
    280281/** 
    281  *  
     282 * 
    282283 * 
    283284 * Params: 
     
    291292 * 
    292293 * Returns: 
    293  *  
     294 * 
    294295 */ 
    295296extern (C) sword oflng (cda_def* cursor, sword pos, ub1* buf, sb4 bufl, sword dtype, ub4* retl, sb4 offset); 
    296297 
    297298/** 
    298  *  
     299 * 
    299300 * 
    300301 * Params: 
     
    306307 * 
    307308 * Returns: 
    308  *  
     309 * 
    309310 */ 
    310311extern (C) sword ogetpi (cda_def* cursor, ub1* piecep, dvoid** ctxpp, ub4* iterp, ub4* indexp); 
    311312 
    312313/** 
    313  *  
     314 * 
    314315 * 
    315316 * Params: 
     
    319320 * 
    320321 * Returns: 
    321  *  
     322 * 
    322323 */ 
    323324extern (C) sword oopt (cda_def* cursor, sword rbopt, sword waitopt); 
    324325 
    325326/** 
    326  *  
     327 * 
    327328 * 
    328329 * Params: 
     
    330331 * 
    331332 * Returns: 
    332  *  
     333 * 
    333334 */ 
    334335extern (C) sword opinit (ub4 mode); 
    335336 
    336337/** 
    337  *  
     338 * 
    338339 * 
    339340 * Params: 
     
    349350 * 
    350351 * Returns: 
    351  *  
     352 * 
    352353 */ 
    353354extern (C) sword olog (cda_def* lda, ub1* hda, OraText* uid, sword uidl, OraText* pswd, sword pswdl, OraText* conn, sword connl, ub4 mode); 
    354355 
    355356/** 
    356  *  
    357  * 
    358  * Params: 
    359  *  lda = 
    360  * 
    361  * Returns: 
    362  *  
     357 * 
     358 * 
     359 * Params: 
     360 *  lda = 
     361 * 
     362 * Returns: 
     363 * 
    363364 */ 
    364365extern (C) sword ologof (cda_def* lda); 
    365366 
    366367/** 
    367  *  
     368 * 
    368369 * 
    369370 * Params: 
     
    377378 * 
    378379 * Returns: 
    379  *  
     380 * 
    380381 */ 
    381382extern (C) sword oopen (cda_def* cursor, cda_def* lda, OraText* dbn, sword dbnl, sword arsize, OraText* uid, sword uidl); 
    382383 
    383384/** 
    384  *  
     385 * 
    385386 * 
    386387 * Params: 
     
    392393 * 
    393394 * Returns: 
    394  *  
     395 * 
    395396 */ 
    396397extern (C) sword oparse (cda_def* cursor, OraText* sqlstm, sb4 sqllen, sword defflg, ub4 lngflg); 
    397398 
    398399/** 
    399  *  
    400  * 
    401  * Params: 
    402  *  lda = 
    403  * 
    404  * Returns: 
    405  *  
     400 * 
     401 * 
     402 * Params: 
     403 *  lda = 
     404 * 
     405 * Returns: 
     406 * 
    406407 */ 
    407408extern (C) sword orol (cda_def* lda); 
    408409 
    409410/** 
    410  *  
     411 * 
    411412 * 
    412413 * Params: 
     
    417418 * 
    418419 * Returns: 
    419  *  
     420 * 
    420421 */ 
    421422extern (C) sword osetpi (cda_def* cursor, ub1 piece, dvoid* bufp, ub4* lenp); 
    422423 
    423424/** 
    424  *  
     425 * 
    425426 * 
    426427 * Params: 
     
    430431 * 
    431432 * Returns: 
    432  *  
     433 * 
    433434 */ 
    434435extern (C) void sqlld2 (cda_def* lda, OraText* cname, sb4* cnlen); 
    435436 
    436437/** 
    437  *  
    438  * 
    439  * Params: 
    440  *  lda = 
    441  * 
    442  * Returns: 
    443  *  
     438 * 
     439 * 
     440 * Params: 
     441 *  lda = 
     442 * 
     443 * Returns: 
     444 * 
    444445 */ 
    445446extern (C) void sqllda (cda_def* lda); 
    446447 
    447448/** 
    448  *  
    449  * 
    450  * Params: 
    451  *  lda = 
    452  * 
    453  * Returns: 
    454  *  
     449 * 
     450 * 
     451 * Params: 
     452 *  lda = 
     453 * 
     454 * Returns: 
     455 * 
    455456 */ 
    456457extern (C) sword onbset (cda_def* lda); 
    457458 
    458459/** 
    459  *  
    460  * 
    461  * Params: 
    462  *  lda = 
    463  * 
    464  * Returns: 
    465  *  
     460 * 
     461 * 
     462 * Params: 
     463 *  lda = 
     464 * 
     465 * Returns: 
     466 * 
    466467 */ 
    467468extern (C) sword onbtst (cda_def* lda); 
    468469 
    469470/** 
    470  *  
    471  * 
    472  * Params: 
    473  *  lda = 
    474  * 
    475  * Returns: 
    476  *  
     471 * 
     472 * 
     473 * Params: 
     474 *  lda = 
     475 * 
     476 * Returns: 
     477 * 
    477478 */ 
    478479extern (C) sword onbclr (cda_def* lda); 
    479480 
    480481/** 
    481  *  
     482 * 
    482483 * 
    483484 * Params: 
     
    486487 * 
    487488 * Returns: 
    488  *  
     489 * 
    489490 */ 
    490491extern (C) sword ognfd (cda_def* lda, dvoid* fdp); 
    491492 
    492493/** 
    493  *  
     494 * 
    494495 * 
    495496 * Params: 
     
    511512 * 
    512513 * Returns: 
    513  *  
     514 * 
    514515 */ 
    515516deprecated extern (C) sword obndra (cda_def* cursor, OraText* sqlvar, sword sqlvl, ub1* progv, sword progvl, sword ftype, sword scale, sb2* indp, ub2* alen, ub2* arcode, ub4 maxsiz, ub4* cursiz, OraText* fmt, sword fmtl, sword fmtt); 
    516517 
    517518/** 
    518  *  
     519 * 
    519520 * 
    520521 * Params: 
     
    531532 * 
    532533 * Returns: 
    533  *  
     534 * 
    534535 */ 
    535536deprecated extern (C) sword obndrn (cda_def* cursor, sword sqlvn, ub1* progv, sword progvl, sword ftype, sword scale, sb2* indp, OraText* fmt, sword fmtl, sword fmtt); 
    536537 
    537538/** 
    538  *  
     539 * 
    539540 * 
    540541 * Params: 
     
    552553 * 
    553554 * Returns: 
    554  *  
     555 * 
    555556 */ 
    556557deprecated extern (C) sword obndrv  (cda_def* cursor, OraText* sqlvar, sword sqlvl, ub1* progv, sword progvl, sword ftype, sword scale, sb2* indp, OraText* fmt, sword fmtl, sword fmtt); 
    557558 
    558559/** 
    559  *  
     560 * 
    560561 * 
    561562 * Params: 
     
    574575 * 
    575576 * Returns: 
    576  *  
     577 * 
    577578 */ 
    578579deprecated extern (C) sword odefin (cda_def* cursor, sword pos, ub1* buf, sword bufl, sword ftype, sword scale, sb2* indp, OraText* fmt, sword fmtl, sword fmtt, ub2* rlen, ub2* rcode); 
    579580 
    580581/** 
    581  *  
     582 * 
    582583 * 
    583584 * Params: 
     
    590591 * 
    591592 * Returns: 
    592  *  
     593 * 
    593594 */ 
    594595deprecated extern (C) sword oname (cda_def* cursor, sword pos, sb1* tbuf, sb2* tbufl, sb1* buf, sb2* bufl); 
    595596 
    596597/** 
    597  *  
     598 * 
    598599 * 
    599600 * Params: 
     
    607608 * 
    608609 * Returns: 
    609  *  
     610 * 
    610611 */ 
    611612deprecated extern (C) sword orlon (cda_def* lda, ub1* hda, OraText* uid, sword uidl, OraText* pswd, sword pswdl, sword audit); 
    612613 
    613614/** 
    614  *  
     615 * 
    615616 * 
    616617 * Params: 
     
    623624 * 
    624625 * Returns: 
    625  *  
     626 * 
    626627 */ 
    627628deprecated extern (C) sword olon (cda_def* lda, OraText* uid, sword uidl, OraText* pswd, sword pswdl, sword audit); 
    628629 
    629630/** 
    630  *  
     631 * 
    631632 * 
    632633 * Params: 
     
    636637 * 
    637638 * Returns: 
    638  *  
     639 * 
    639640 */ 
    640641deprecated extern (C) sword osql3 (cda_def* cda, OraText* sqlstm, sword sqllen); 
    641642 
    642643/** 
    643  *  
     644 * 
    644645 * 
    645646 * Params: 
     
    655656 * 
    656657 * Returns: 
    657  *  
     658 * 
    658659 */ 
    659660deprecated extern (C) sword odsc (cda_def* cursor, sword pos, sb2* dbsize, sb2* fsize, sb2* rcode, sb2* dtype, sb1* buf, sb2* bufl, sb2* dsize); 
     661 
     662} 
  • trunk/bbconv/dbi/oracle/imp/ocidef.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
     
    1716deprecated: 
    1817 
    19 /*  
     18/* 
    2019#include <upidef.h> 
    2120#include <riddef.h>     No longer necessary??? 
    2221*/ 
     22 
     23version (dbi_oracle) { 
     24 
    2325private import dbi.oracle.imp.ociapr, dbi.oracle.imp.oratypes; 
    2426 
     
    161163 
    162164const uint OTYDEV           = 10;       /// Old DEFINE VIEW = create view. 
    163   
     165 
    164166const uint OCLFPA           = 2;        /// Parse - OSQL. 
    165167const uint OCLFEX           = 4;        /// Execute - OEXEC. 
     
    277279extern (C) sword ocierr (ldadef* lda, b2 rcode, oratext* buffer, sword bufl); 
    278280extern (C) sword ocidhe (b2 rcode, oratext* buffer); 
    279     /*  
     281    /* 
    280282    ** Move the text explanation for an ORACLE error to a user defined buffer 
    281     **  ocierr - will return the message associated with the hstdef stored  
     283    **  ocierr - will return the message associated with the hstdef stored 
    282284    **           in the lda. 
    283285    **  ocidhe - will return the message associated with the default host. 
     
    290292 
    291293extern (C) sword ociclo (csrdef* cursor); 
    292    /*  
     294   /* 
    293295   ** open or close a cursor. 
    294296   **   cursor - pointer to csrdef 
     
    311313   **  OERRCD in the hst.  This is because ocibrk  may  be  called 
    312314   **  asynchronously.  Callers must test the return code. 
    313    **    lda  - pointer to a ldadef  
     315   **    lda  - pointer to a ldadef 
    314316   */ 
    315317 
     
    317319   /* 
    318320   **  cancel the operation on the cursor, no additional OFETCH calls 
    319    **  will be issued for the existing cursor without an intervening  
     321   **  will be issued for the existing cursor without an intervening 
    320322   **  OEXEC call. 
    321323   **   cursor  - pointer to csrdef 
     
    323325 
    324326extern (C) sword ocisfe (csrdef* cursor, sword erropt, sword waitopt); 
    325    /*  
     327   /* 
    326328   ** ocisfe - user interface set error options 
    327329   ** set the error and cursor options. 
     
    340342   ** ocirol - roll back the current transaction 
    341343   */ 
    342   
     344 
    343345extern (C) sword ocicon (ldadef* lda); 
    344346extern (C) sword ocicof (ldadef* lda); 
     
    446448   ** 
    447449   ** This routine is used to obtain information about the calling 
    448    ** arguments of a stored procedure.  The client provides the  
     450   ** arguments of a stored procedure.  The client provides the 
    449451   ** name of the procedure using "object_name" and "database_name" 
    450    ** (database name is optional).  The client also supplies the  
    451    ** arrays for OCIDPR to return the values and indicates the  
     452   ** (database name is optional).  The client also supplies the 
     453   ** arrays for OCIDPR to return the values and indicates the 
    452454   ** length of array via the "total_elements" parameter.  Upon return 
    453    ** the number of elements used in the arrays is returned in the  
    454    ** "total_elements" parameter.  If the array is too small then  
    455    ** an error will be returned and the contents of the return arrays  
     455   ** the number of elements used in the arrays is returned in the 
     456   ** "total_elements" parameter.  If the array is too small then 
     457   ** an error will be returned and the contents of the return arrays 
    456458   ** are invalid. 
    457459   ** 
     
    463465   **   object_name    - SCOTT.ACCOUNT_UPDATE@BOSTON 
    464466   **   total_elements - 100 
    465    **    
     467   ** 
    466468   ** 
    467469   **   ACCOUNT_UPDATE is an overloaded function with specification : 
     
    472474   **     table person  (person_id number(4), person_nm varchar2(10)) 
    473475   ** 
    474    **      function ACCOUNT_UPDATE (account number,  
     476   **      function ACCOUNT_UPDATE (account number, 
    475477   **         person person%rowtype, amounts number_table, 
    476478   **         trans_date date) return accounts.balance%type; 
    477479   ** 
    478    **      function ACCOUNT_UPDATE (account number,  
     480   **      function ACCOUNT_UPDATE (account number, 
    479481   **         person person%rowtype, amounts number_table, 
    480482   **         trans_no number) return accounts.balance%type; 
     
    507509   ** 
    508510   **  ldadef           - pointer to ldadef 
    509    **  object_name      - object name, synonyms are also accepted and will  
     511   **  object_name      - object name, synonyms are also accepted and will 
    510512   **                     be translate, currently only procedure and function 
    511513   **                     names are accepted, also NLS names are accepted. 
    512    **                     Currently, the accepted format of a name is  
     514   **                     Currently, the accepted format of a name is 
    513515   **                     [[part1.]part2.]part3[@dblink] (required) 
    514516   **  object_length    - object name length (required) 
     
    518520   **  reserved2_length - reserved for future use 
    519521   **  overload         - array indicating overloaded procedure # (returned) 
    520    **  position         - array of argument positions, position 0 is a  
     522   **  position         - array of argument positions, position 0 is a 
    521523   **                     function return argument (returned) 
    522524   **  level            - array of argument type levels, used to describe 
    523525   **                     sub-datatypes of data structures like records 
    524526   **                     and arrays (returned) 
    525    **  argument_name    - array of argument names, only returns first  
     527   **  argument_name    - array of argument names, only returns first 
    526528   **                     30 characters of argument names, note storage 
    527529   **                     for 30 characters is allocated by client (returned) 
     
    575577extern (C) sword ociexn (csrdef* cursor, sword iters, sword roff); 
    576578extern (C) sword ociefn (csrdef* cursor, ub4 nrows, sword can, sword exact); 
    577     /*  
     579    /* 
    578580    ** ociexe  - execute a cursor 
    579581    ** ociexn  - execute a cursosr N times 
    580582    **  cursor   - pointer to a csrdef 
    581583    **  iters    - number of times to execute cursor 
    582     **  roff     - offset within the bind variable array at which to begin  
     584    **  roff     - offset within the bind variable array at which to begin 
    583585    **             operations. 
    584586    */ 
     
    587589extern (C) sword ocifen (csrdef* cursor, sword nrows); 
    588590    /* ocifet - fetch the next row 
    589     ** ocifen - fetch n rows  
     591    ** ocifen - fetch n rows 
    590592    ** cursor   - pointer to csrdef 
    591593    ** nrows    - number of rows to be fetched 
     
    602604    **   csrdef->csrrpc is set to the rows processed count 
    603605    **   csrdef->csrpeo is set to error postion 
    604     **  
     606    ** 
    605607    **     cursor - pointer to csrdef 
    606608    */ 
     
    608610 
    609611extern (C) sword ocir32 (csrdef* cursor, sword retcode); 
    610    /*    
    611    ** Convert selected version 3 return codes to the equivalent version 2  
     612   /* 
     613   ** Convert selected version 3 return codes to the equivalent version 2 
    612614   ** code. 
    613615   ** 
     
    620622   /* 
    621623   ** Convert call-by-ref to call-by-value: 
    622    ** takes an arg list and a mask address, determines which args need  
     624   ** takes an arg list and a mask address, determines which args need 
    623625   ** conversion to a value, and creates a new list begging at the address 
    624626   ** of newlst. 
     
    631633extern (C) eword ocistf (eword typ, eword bufl, eword rdig, oratext* fmt, csrdef* cursor, sword* err); 
    632634/*  Convert a packed  decimal buffer  length  (bytes) and scale to a format 
    633 **  string of the form mm.+/-nn, where  mm is the number of packed  
    634 **  decimal digits, and nn is the scaling factor.   A positive scale name  
    635 **  nn digits to the rights of the decimal; a negative scale means nn zeros  
     635**  string of the form mm.+/-nn, where  mm is the number of packed 
     636**  decimal digits, and nn is the scaling factor.   A positive scale name 
     637**  nn digits to the rights of the decimal; a negative scale means nn zeros 
    636638**  should be supplied to the left of the decimal. 
    637639**     bufl   - length of the packed decimal buffer 
    638640**     rdig   - number of fractional digits 
    639641**     fmt    - pointer to a string holding the conversion format 
    640 **     cursor - pointer to csrdef  
     642**     cursor - pointer to csrdef 
    641643**     err    - pointer to word storing error code 
    642 */  
     644*/ 
    643645 
    644646extern (C) sword ocinbs (ldadef* lda);  /* set a connection to non-blocking   */ 
     
    650652**   hst     - pointer to a 256 byte area, must be cleared to zero before call 
    651653**   conn    - the database link (if specified @LINK in uid will be ignored) 
    652 **   connl   - length of conn; if -1 strlen(conn) is used    
     654**   connl   - length of conn; if -1 strlen(conn) is used 
    653655**   uid     - user id [USER[/PASSWORD][@LINK]] 
    654656**   uidl    - length of uid, if -1 strlen(uid) is used 
     
    659661 
    660662/* Note: The following routines are used in Pro*C and have the 
    661    same interface as their couterpart in OCI.  
    662    Althought the interface follows for more details please refer  
     663   same interface as their couterpart in OCI. 
     664   Althought the interface follows for more details please refer 
    663665   to the above routines */ 
    664666extern (C) sword ocipin (ub4 mode); 
     
    667669extern (C) sword ologon (ldadef* lda, b2 areacount); 
    668670 
    669 /*  
     671/* 
    670672** ocisqd - oci delayed parse (Should be used only with deferred upi/oci) 
    671673** FUNCTION: Call upidpr to delay the parse of the sql statement till the 
     
    673675**           describe time ) 
    674676** RETURNS: Oracle return code. 
    675 */  
     677*/ 
    676678extern (C) sword ocisq7 (csrdef* cursor, oratext* sqlstm, sb4 sqllen, sword defflg, ub4 sqlt); 
    677679 
     
    689691 
    690692extern (C) ub2 ocigft_getFcnType (ub2 oertyp);      /* get sql function code */ 
     693 
     694} 
  • trunk/bbconv/dbi/oracle/imp/ocidem.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.ocidem; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.ocidfn; 
     16 
     17version (dbi_oracle) { 
     18 
     19private import dbi.oracle.imp.ocidfn, dbi.oracle.imp.oratypes; 
    1820 
    1921const uint VARCHAR2_TYPE        = 1;        /// 
     
    108110    cast(text*)"OSETPI"             /// 
    109111]; 
     112 
     113} 
  • trunk/bbconv/dbi/oracle/imp/ocidfn.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.ocidfn; 
     15 
     16version (dbi_oracle) { 
    1617 
    1718private import dbi.oracle.imp.oratypes; 
     
    165166const uint SQLCS_FLEXIBLE       = 4;        /// For PL/SQL "flexible" parameters. 
    166167const uint SQLCS_LIT_NULL       = 5;        /// F4/29/2006or typecheck of null and empty_clob() lits. 
     168 
     169} 
  • trunk/bbconv/dbi/oracle/imp/ociextp.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.ociextp; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.oci; 
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.oci, dbi.oracle.imp.oratypes; 
    1819 
    1920const uint OCIEXTPROC_SUCCESS       = 0;        /// The external procedure failed. 
     
    3637 * 
    3738 * Memory thus allocated will be freed by PL/SQL upon return from the 
    38  * External Procedure. You must not use any kind of 'free' function on  
     39 * External Procedure. You must not use any kind of 'free' function on 
    3940 * memory allocated by OCIExtProcAllocCallMemory. 
    40  *  
     41 * 
    4142 * Params: 
    4243 *  with_context = The OCI context. 
     
    7172 * following error message string within the standard Oracle error 
    7273 * message string. See note for OCIExtProcRaiseExcp 
    73  *  
     74 * 
    7475 * Params: 
    7576 *  with_context = The OCI context. 
     
    8788/** 
    8889 * Get the OCI environment. 
    89  *  
     90 * 
    9091 * Params: 
    9192 *  with_context = The OCI context. 
     
    102103/** 
    103104 * Initialize a statement handle. 
    104  *  
     105 * 
    105106 * Params: 
    106107 *  with_context = The OCI context. 
     
    118119extern (C) sword ociepish (OCIExtProcContext* with_context, int cursorno, OCISvcCtx** svch, OCIStmt** stmthp, OCIError** errh); 
    119120alias ociepish OCIInitializeStatementHandle; 
     121 
     122} 
  • trunk/bbconv/dbi/oracle/imp/ocikpr.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.ocikpr; 
    1615 
     16version (dbi_oracle) { 
     17 
    1718// This page has been left blank intentionally.  Keep it that way! 
     19     
     20} 
  • trunk/bbconv/dbi/oracle/imp/ocixmldb.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.ocixmldb; 
    1615 
    17 private import dbi.oracle.imp.oratypes; 
    18 private import dbi.oracle.imp.oci; 
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.oci, dbi.oracle.imp.oratypes; 
    1919 
    2020/** 
     
    5656 * 
    5757 * Returns: 
    58  *  A pointer to an xmlctx structure, with xdb context, error handler and callbacks  
     58 *  A pointer to an xmlctx structure, with xdb context, error handler and callbacks 
    5959 *  populated with appropriate values. This is later used for all API calls.  null 
    6060 *  if no database connection is available. 
     
    6969 */ 
    7070extern (C) void OCIXmlDbFreeXmlCtx (xmlctx* xctx); 
     71 
     72} 
  • trunk/bbconv/dbi/oracle/imp/odci.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.odci; 
     15 
     16version (dbi_oracle) { 
    1617 
    1718private import dbi.oracle.imp.oci, dbi.oracle.imp.orl, dbi.oracle.imp.oro, dbi.oracle.imp.ort; 
     
    587588    OCIInd num_rows;                /// 
    588589} 
     590 
     591} 
  • trunk/bbconv/dbi/oracle/imp/oratypes.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.oratypes; 
     15 
     16version (dbi_oracle) { 
    1617 
    1718alias ubyte ub1;                    /// 
     
    135136 
    136137alias void function() lgenfp_t;             /// 
     138 
     139} 
  • trunk/bbconv/dbi/oracle/imp/ori.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
     
    1515module dbi.oracle.imp.ori; 
    1616 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.oro, dbi.oracle.imp.oci, dbi.oracle.imp.ort; 
     17version (dbi_oracle) { 
     18 
     19private import dbi.oracle.imp.oci, dbi.oracle.imp.oratypes, dbi.oracle.imp.oro, dbi.oracle.imp.ort; 
    1820 
    1921/** 
     
    3638extern (C) sword OCIObjectNew (OCIEnv* env, OCIError* err, OCISvcCtx* svc, OCITypeCode typecode, OCIType* tdo, dvoid* table, OCIDuration duration, boolean value, dvoid** instance); 
    3739/* 
    38         typecode (IN) - the typecode of the type of the instance.  
    39         tdo      (IN, optional) - pointer to the type descriptor object. The  
    40                         TDO describes the type of the instance that is to be  
    41                         created. Refer to OCITypeByName() for obtaining a TDO.  
     40        typecode (IN) - the typecode of the type of the instance. 
     41        tdo      (IN, optional) - pointer to the type descriptor object. The 
     42                        TDO describes the type of the instance that is to be 
     43                        created. Refer to OCITypeByName() for obtaining a TDO. 
    4244                        The TDO is required for creating a named type (e.g. an 
    4345                        object or a collection). 
    44         table (IN, optional) - pointer to a table object which specifies a  
     46        table (IN, optional) - pointer to a table object which specifies a 
    4547                        table in the server.  This parameter can be set to NULL 
    4648                        if no table is given. See the description below to find 
    4749                        out how the table object and the TDO are used together 
    48                         to determine the kind of instances (persistent,  
    49                         transient, value) to be created. Also see  
     50                        to determine the kind of instances (persistent, 
     51                        transient, value) to be created. Also see 
    5052                        OCIObjectPinTable() for retrieving a table object. 
    5153        duration (IN) - this is an overloaded parameter. The use of this 
    52                         parameter is based on the kind of the instance that is  
     54                        parameter is based on the kind of the instance that is 
    5355                        to be created. 
    5456                        a) persistent object. This parameter specifies the 
    5557                           pin duration. 
    56                         b) transient object. This parameter specififes the  
    57                            allocation duration and pin duration.  
     58                        b) transient object. This parameter specififes the 
     59                           allocation duration and pin duration. 
    5860                        c) value. This parameter specifies the allocation 
    5961                           duration. 
    6062 
    6163   DESCRIPTION: 
    62         This function creates a new instance of the type specified by the  
    63         typecode or the TDO. Based on the parameters 'typecode' (or 'tdo'),  
     64        This function creates a new instance of the type specified by the 
     65        typecode or the TDO. Based on the parameters 'typecode' (or 'tdo'), 
    6466        'value' and 'table', different kinds of instances can be created: 
    65              
     67 
    6668                                     The parameter 'table' is not NULL? 
    6769 
     
    7880 
    7981        This function allocates the top level memory chunk of an OTS instance. 
    80         The attributes in the top level memory are initialized (e.g. an  
    81         attribute of varchar2 is initialized to a vstring of 0 length).  
    82  
    83         If the instance is an object, the object is marked existed but is  
    84         atomically null.  
     82        The attributes in the top level memory are initialized (e.g. an 
     83        attribute of varchar2 is initialized to a vstring of 0 length). 
     84 
     85        If the instance is an object, the object is marked existed but is 
     86        atomically null. 
    8587 
    8688        FOR PERSISTENT OBJECTS: 
    87         The object is marked dirty and existed.  The allocation duration for  
    88         the object is session. The object is pinned and the pin duration is  
     89        The object is marked dirty and existed.  The allocation duration for 
     90        the object is session. The object is pinned and the pin duration is 
    8991        specified by the given parameter 'duration'. 
    9092 
    9193        FOR TRANSIENT OBJECTS: 
    92         The object is pinned. The allocation duration and the pin duration are  
     94        The object is pinned. The allocation duration and the pin duration are 
    9395        specified by the given parameter 'duration'. 
    9496 
     
    103105        env        (IN/OUT) - OCI environment handle initialized in object mode 
    104106        err        (IN/OUT) - error handle. If there is an error, it is 
    105                               recorded in 'err' and this function returns  
    106                               OCI_ERROR. The error recorded in 'err' can be  
     107                              recorded in 'err' and this function returns 
     108                              OCI_ERROR. The error recorded in 'err' can be 
    107109                              retrieved by calling OCIErrorGet(). 
    108         object_ref     (IN) - the reference to the object.  
    109         corhdl         (IN) - handle for complex object retrieval.  
     110        object_ref     (IN) - the reference to the object. 
     111        corhdl         (IN) - handle for complex object retrieval. 
    110112        pin_option     (IN) - See description below. 
    111113        pin_duration   (IN) - The duration of which the object is being accesed 
    112114                              by a client. The object is implicitly unpinned at 
    113                               the end of the pin duration.  
    114                               If OCI_DURATION_NULL is passed, there is no pin  
    115                               promotion if the object is already loaded into  
    116                               the cache. If the object is not yet loaded, then  
    117                               the pin duration is set to OCI_DURATION_DEFAULT.  
     115                              the end of the pin duration. 
     116                              If OCI_DURATION_NULL is passed, there is no pin 
     117                              promotion if the object is already loaded into 
     118                              the cache. If the object is not yet loaded, then 
     119                              the pin duration is set to OCI_DURATION_DEFAULT. 
    118120        lock_option    (IN) - lock option (e.g., exclusive). If a lock option 
    119121                              is specified, the object is locked in the server. 
    120                               See 'oro.h' for description about lock option.  
     122                              See 'oro.h' for description about lock option. 
    121123        object        (OUT) - the pointer to the pinned object. 
    122124 
     
    129131 
    130132        1) locate an object given its reference. This is done by the object 
    131            cache which keeps track of the objects in the object heap.   
    132  
    133         2) notify the object cache that an object is being in use. An object  
    134            can be pinned many times. A pinned object will remain in memory  
    135            until it is completely unpinned (see OCIObjectUnpin()).  
    136  
    137         3) notify the object cache that a persistent object is being in use  
    138            such that the persistent object cannot be aged out.  Since a  
    139            persistent object can be loaded from the server whenever is needed,  
    140            the memory utilization can be increased if a completely unpinned  
    141            persistent object can be freed (aged out), even before the  
    142            allocation duration is expired.   
     133           cache which keeps track of the objects in the object heap. 
     134 
     135        2) notify the object cache that an object is being in use. An object 
     136           can be pinned many times. A pinned object will remain in memory 
     137           until it is completely unpinned (see OCIObjectUnpin()). 
     138 
     139        3) notify the object cache that a persistent object is being in use 
     140           such that the persistent object cannot be aged out.  Since a 
     141           persistent object can be loaded from the server whenever is needed, 
     142           the memory utilization can be increased if a completely unpinned 
     143           persistent object can be freed (aged out), even before the 
     144           allocation duration is expired. 
    143145 
    144146        Also see OCIObjectUnpin() for more information about unpinning. 
     
    149151        will be fetched from the persistent store. The allocation duration of 
    150152        the object is session. If the object is already in the cache, it is 
    151         returned to the client.  The object will be locked in the server if a  
    152         lock option is specified.  
    153  
    154         This function will return an error for a non-existent object.   
    155  
    156         A pin option is used to specify the copy of the object that is to be  
    157         retrieved:  
    158  
    159         1) If option is OCI_PIN_ANY (pin any), if the object is already  
    160            in the environment heap, return this object. Otherwise, the object  
    161            is retrieved from the database.  This option is useful when the  
    162            client knows that he has the exclusive access to the data in a  
     153        returned to the client.  The object will be locked in the server if a 
     154        lock option is specified. 
     155 
     156        This function will return an error for a non-existent object. 
     157 
     158        A pin option is used to specify the copy of the object that is to be 
     159        retrieved: 
     160 
     161        1) If option is OCI_PIN_ANY (pin any), if the object is already 
     162           in the environment heap, return this object. Otherwise, the object 
     163           is retrieved from the database.  This option is useful when the 
     164           client knows that he has the exclusive access to the data in a 
    163165           session. 
    164166 
    165         2) If option is OCI_PIN_LATEST (pin latest), if the object is  
    166            not cached, it is retrieved from the database.  If the object is  
    167            cached, it is refreshed with the latest version. See  
     167        2) If option is OCI_PIN_LATEST (pin latest), if the object is 
     168           not cached, it is retrieved from the database.  If the object is 
     169           cached, it is refreshed with the latest version. See 
    168170           OCIObjectRefresh() for more information about refreshing. 
    169171 
     
    175177        FOR TRANSIENT OBJECTS: 
    176178 
    177         This function will return an error if the transient object has already  
    178         been freed. This function does not return an error if an exclusive  
    179         lock is specified in the lock option.  
    180  
    181    RETURNS: 
    182         if environment handle or error handle is null, return  
    183         OCI_INVALID_HANDLE. 
    184         if operation suceeds, return OCI_SUCCESS.  
    185         if operation fails, return OCI_ERROR.  
     179        This function will return an error if the transient object has already 
     180        been freed. This function does not return an error if an exclusive 
     181        lock is specified in the lock option. 
     182 
     183   RETURNS: 
     184        if environment handle or error handle is null, return 
     185        OCI_INVALID_HANDLE. 
     186        if operation suceeds, return OCI_SUCCESS. 
     187        if operation fails, return OCI_ERROR. 
    186188 */ 
    187189 
     
    189191/* 
    190192   NAME: OCIObjectUnpin - OCI unpin a referenceable object 
    191    PARAMETERS: 
    192         env   (IN/OUT) - OCI environment handle initialized in object mode 
    193         err   (IN/OUT) - error handle. If there is an error, it is 
    194                          recorded in 'err' and this function returns OCI_ERROR. 
    195                          The error recorded in 'err' can be retrieved by  
    196                          calling OCIErrorGet(). 
    197         object    (IN) - pointer to an object 
    198    REQUIRES: 
    199         - a valid OCI environment handle must be given. 
    200         - The specified object must be pinned. 
    201    DESCRIPTION: 
    202         This function unpins an object.  An object is completely unpinned when  
    203           1) the object was unpinned N times after it has been pinned N times 
    204              (by calling OCIObjectPin()). 
    205           2) it is the end of the pin duration 
    206           3) the function OCIObjectPinCountReset() is called  
    207  
    208         There is a pin count associated with each object which is incremented 
    209         whenever an object is pinned. When the pin count of the object is zero, 
    210         the object is said to be completely unpinned. An unpinned object can 
    211         be freed without error. 
    212  
    213         FOR PERSISTENT OBJECTS: 
    214         When a persistent object is completely unpinned, it becomes a candidate 
    215         for aging. The memory of an object is freed when it is aged out. Aging 
    216         is used to maximize the utilization of memory.  An dirty object cannot  
    217         be aged out unless it is flushed. 
    218  
    219         FOR TRANSIENT OBJECTS: 
    220         The pin count of the object is decremented. A transient can be freed 
    221         only at the end of its allocation duration or when it is explicitly 
    222         deleted by calling OCIObjectFree(). 
    223  
    224         FOR VALUE: 
    225         This function will return an error for value. 
    226  
    227    RETURNS: 
    228         if environment handle or error handle is null, return  
    229         OCI_INVALID_HANDLE. 
    230         if operation suceeds, return OCI_SUCCESS.  
    231         if operation fails, return OCI_ERROR.  
    232  */ 
    233  
    234 extern (C) sword OCIObjectPinCountReset (OCIEnv* env, OCIError* err, dvoid* object); 
    235 /* 
    236    NAME: OCIObjectPinCountReset - OCI resets the pin count of a referenceable 
    237                                   object 
    238193   PARAMETERS: 
    239194        env   (IN/OUT) - OCI environment handle initialized in object mode 
     
    247202        - The specified object must be pinned. 
    248203   DESCRIPTION: 
    249         This function completely unpins an object.  When an object is  
    250         completely unpinned, it can be freed without error.   
     204        This function unpins an object.  An object is completely unpinned when 
     205          1) the object was unpinned N times after it has been pinned N times 
     206             (by calling OCIObjectPin()). 
     207          2) it is the end of the pin duration 
     208          3) the function OCIObjectPinCountReset() is called 
     209 
     210        There is a pin count associated with each object which is incremented 
     211        whenever an object is pinned. When the pin count of the object is zero, 
     212        the object is said to be completely unpinned. An unpinned object can 
     213        be freed without error. 
    251214 
    252215        FOR PERSISTENT OBJECTS: 
    253216        When a persistent object is completely unpinned, it becomes a candidate 
    254217        for aging. The memory of an object is freed when it is aged out. Aging 
    255         is used to maximize the utilization of memory.  An dirty object cannot  
     218        is used to maximize the utilization of memory.  An dirty object cannot 
    256219        be aged out unless it is flushed. 
    257220 
     
    259222        The pin count of the object is decremented. A transient can be freed 
    260223        only at the end of its allocation duration or when it is explicitly 
    261         freed by calling OCIObjectFree(). 
     224        deleted by calling OCIObjectFree(). 
    262225 
    263226        FOR VALUE: 
     
    265228 
    266229   RETURNS: 
    267         if environment handle or error handle is null, return  
    268         OCI_INVALID_HANDLE. 
    269         if operation suceeds, return OCI_SUCCESS.  
    270         if operation fails, return OCI_ERROR.  
    271  */ 
    272  
    273 extern (C) sword OCIObjectLock (OCIEnv* env, OCIError* err, dvoid* object); 
    274 /* 
    275    NAME: OCIObjectLock - OCI lock a persistent object 
     230        if environment handle or error handle is null, return 
     231        OCI_INVALID_HANDLE. 
     232        if operation suceeds, return OCI_SUCCESS. 
     233        if operation fails, return OCI_ERROR. 
     234 */ 
     235 
     236extern (C) sword OCIObjectPinCountReset (OCIEnv* env, OCIError* err, dvoid* object); 
     237/* 
     238   NAME: OCIObjectPinCountReset - OCI resets the pin count of a referenceable 
     239                                  object 
    276240   PARAMETERS: 
    277241        env   (IN/OUT) - OCI environment handle initialized in object mode 
     
    280244                         The error recorded in 'err' can be retrieved by 
    281245                         calling OCIErrorGet(). 
    282         object    (IN) - pointer to the persistent object  
     246        object    (IN) - pointer to an object 
     247   REQUIRES: 
     248        - a valid OCI environment handle must be given. 
     249        - The specified object must be pinned. 
     250   DESCRIPTION: 
     251        This function completely unpins an object.  When an object is 
     252        completely unpinned, it can be freed without error. 
     253 
     254        FOR PERSISTENT OBJECTS: 
     255        When a persistent object is completely unpinned, it becomes a candidate 
     256        for aging. The memory of an object is freed when it is aged out. Aging 
     257        is used to maximize the utilization of memory.  An dirty object cannot 
     258        be aged out unless it is flushed. 
     259 
     260        FOR TRANSIENT OBJECTS: 
     261        The pin count of the object is decremented. A transient can be freed 
     262        only at the end of its allocation duration or when it is explicitly 
     263        freed by calling OCIObjectFree(). 
     264 
     265        FOR VALUE: 
     266        This function will return an error for value. 
     267 
     268   RETURNS: 
     269        if environment handle or error handle is null, return 
     270        OCI_INVALID_HANDLE. 
     271        if operation suceeds, return OCI_SUCCESS. 
     272        if operation fails, return OCI_ERROR. 
     273 */ 
     274 
     275extern (C) sword OCIObjectLock (OCIEnv* env, OCIError* err, dvoid* object); 
     276/* 
     277   NAME: OCIObjectLock - OCI lock a persistent object 
     278   PARAMETERS: 
     279        env   (IN/OUT) - OCI environment handle initialized in object mode 
     280        err   (IN/OUT) - error handle. If there is an error, it is 
     281                         recorded in 'err' and this function returns OCI_ERROR. 
     282                         The error recorded in 'err' can be retrieved by 
     283                         calling OCIErrorGet(). 
     284        object    (IN) - pointer to the persistent object 
    283285   REQUIRES: 
    284286        - a valid OCI environment handle must be given. 
     
    295297 
    296298   RETURNS: 
    297         if environment handle or error handle is null, return  
    298         OCI_INVALID_HANDLE. 
    299         if operation suceeds, return OCI_SUCCESS.  
    300         if operation fails, return OCI_ERROR.  
     299        if environment handle or error handle is null, return 
     300        OCI_INVALID_HANDLE. 
     301        if operation suceeds, return OCI_SUCCESS. 
     302        if operation fails, return OCI_ERROR. 
    301303*/ 
    302304 
     
    311313                         The error recorded in 'err' can be retrieved by 
    312314                         calling OCIErrorGet(). 
    313         object    (IN) - pointer to the persistent object  
     315        object    (IN) - pointer to the persistent object 
    314316   REQUIRES: 
    315317        - a valid OCI environment handle must be given. 
     
    327329 
    328330   RETURNS: 
    329         if environment handle or error handle is null, return  
    330         OCI_INVALID_HANDLE. 
    331         if operation suceeds, return OCI_SUCCESS.  
    332         if operation fails, return OCI_ERROR.  
     331        if environment handle or error handle is null, return 
     332        OCI_INVALID_HANDLE. 
     333        if operation suceeds, return OCI_SUCCESS. 
     334        if operation fails, return OCI_ERROR. 
    333335*/ 
    334336 
     
    336338/* 
    337339   NAME: OCIObjectMarkUpdate - OCI marks an object as updated 
    338    PARAMETERS: 
    339         env   (IN/OUT) - OCI environment handle initialized in object mode 
    340         err   (IN/OUT) - error handle. If there is an error, it is 
    341                          recorded in 'err' and this function returns OCI_ERROR. 
    342                          The error recorded in 'err' can be retrieved by 
    343                          calling OCIErrorGet(). 
    344         object    (IN) - pointer to the persistent object  
    345    REQUIRES: 
    346         - a valid OCI environment handle must be given. 
    347         - The specified object must be pinned. 
    348    DESCRIPTION: 
    349         FOR PERSISTENT OBJECTS: 
    350         This function marks the specified persistent object as updated. The 
    351         persistent objects will be written to the server when the object cache 
    352         is flushed.  The object is not locked or flushed by this function. It 
    353         is an error to update a deleted object.   
    354  
    355         After an object is marked updated and flushed, this function must be 
    356         called again to mark the object as updated if it has been dirtied 
    357         after it is being flushed. 
    358  
    359         FOR TRANSIENT OBJECTS: 
    360         This function marks the specified transient object as updated. The 
    361         transient objects will NOT be written to the server. It is an error 
    362         to update a deleted object. 
    363  
    364         FOR VALUES: 
    365         It is an no-op for values. 
    366  
    367    RETURNS: 
    368         if environment handle or error handle is null, return  
    369         OCI_INVALID_HANDLE. 
    370         if operation suceeds, return OCI_SUCCESS.  
    371         if operation fails, return OCI_ERROR.  
    372  */ 
    373  
    374 extern (C) sword OCIObjectUnmark (OCIEnv* env, OCIError* err, dvoid* object); 
    375 /* 
    376    NAME: OCIObjectUnmark - OCI unmarks an object  
    377340   PARAMETERS: 
    378341        env   (IN/OUT) - OCI environment handle initialized in object mode 
     
    386349        - The specified object must be pinned. 
    387350   DESCRIPTION: 
     351        FOR PERSISTENT OBJECTS: 
     352        This function marks the specified persistent object as updated. The 
     353        persistent objects will be written to the server when the object cache 
     354        is flushed.  The object is not locked or flushed by this function. It 
     355        is an error to update a deleted object. 
     356 
     357        After an object is marked updated and flushed, this function must be 
     358        called again to mark the object as updated if it has been dirtied 
     359        after it is being flushed. 
     360 
     361        FOR TRANSIENT OBJECTS: 
     362        This function marks the specified transient object as updated. The 
     363        transient objects will NOT be written to the server. It is an error 
     364        to update a deleted object. 
     365 
     366        FOR VALUES: 
     367        It is an no-op for values. 
     368 
     369   RETURNS: 
     370        if environment handle or error handle is null, return 
     371        OCI_INVALID_HANDLE. 
     372        if operation suceeds, return OCI_SUCCESS. 
     373        if operation fails, return OCI_ERROR. 
     374 */ 
     375 
     376extern (C) sword OCIObjectUnmark (OCIEnv* env, OCIError* err, dvoid* object); 
     377/* 
     378   NAME: OCIObjectUnmark - OCI unmarks an object 
     379   PARAMETERS: 
     380        env   (IN/OUT) - OCI environment handle initialized in object mode 
     381        err   (IN/OUT) - error handle. If there is an error, it is 
     382                         recorded in 'err' and this function returns OCI_ERROR. 
     383                         The error recorded in 'err' can be retrieved by 
     384                         calling OCIErrorGet(). 
     385        object    (IN) - pointer to the persistent object 
     386   REQUIRES: 
     387        - a valid OCI environment handle must be given. 
     388        - The specified object must be pinned. 
     389   DESCRIPTION: 
    388390        FOR PERSISTENT OBJECTS AND TRANSIENT OBJECTS: 
    389391        This function unmarks the specified persistent object as dirty. Changes 
    390392        that are made to the object will not be written to the server. If the 
    391393        object is marked locked, it remains marked locked.  The changes that 
    392         have already made to the object will not be undone implicitly.  
    393   
     394        have already made to the object will not be undone implicitly. 
     395 
    394396        FOR VALUES: 
    395397        It is an no-op for values. 
    396   
    397    RETURNS: 
    398         if environment handle or error handle is null, return 
    399         OCI_INVALID_HANDLE. 
    400         if operation suceeds, return OCI_SUCCESS. 
    401         if operation fails, return OCI_ERROR. 
    402  */ 
    403  
    404 extern (C) sword OCIObjectUnmarkByRef (OCIEnv* env, OCIError* err, OCIRef* ref); 
     398 
     399   RETURNS: 
     400        if environment handle or error handle is null, return 
     401        OCI_INVALID_HANDLE. 
     402        if operation suceeds, return OCI_SUCCESS. 
     403        if operation fails, return OCI_ERROR. 
     404 */ 
     405 
     406extern (C) sword OCIObjectUnmarkByRef (OCIEnv* env, OCIError* err, OCIRef* reference); 
    405407/* 
    406408   NAME: OCIObjectUnmarkByRef - OCI unmarks an object by Ref 
     
    421423        object is marked locked, it remains marked locked.  The changes that 
    422424        have already made to the object will not be undone implicitly. 
    423   
     425 
    424426        FOR VALUES: 
    425427        It is an no-op for values. 
    426   
     428 
    427429   RETURNS: 
    428430        if environment handle or error handle is null, return 
     
    434436extern (C) sword OCIObjectFree (OCIEnv* env, OCIError* err, dvoid* instance, ub2 flags); 
    435437/* 
    436    NAME: OCIObjectFree - OCI free (and unpin) an standalone instance  
     438   NAME: OCIObjectFree - OCI free (and unpin) an standalone instance 
    437439   PARAMETERS: 
    438440        env    (IN/OUT) - OCI environment handle initialized in object mode 
    439441        err    (IN/OUT) - error handle. If there is an error, it is 
    440                           recorded in 'err' and this function returns  
    441                           OCI_ERROR.  The error recorded in 'err' can be  
     442                          recorded in 'err' and this function returns 
     443                          OCI_ERROR.  The error recorded in 'err' can be 
    442444                          retrieved by calling OCIErrorGet(). 
    443445        instance   (IN) - pointer to a standalone instance. 
     
    445447                          even if it is pinned or dirty. 
    446448                          If OCI_OBJECT_FREE_NONULL is set, the null 
    447                           structure will not be freed.  
     449                          structure will not be freed. 
    448450   REQUIRES: 
    449451        - a valid OCI environment handle must be given. 
     
    455457 
    456458        FOR PERSISTENT OBJECTS: 
    457         This function will return an error if the client is attempting to free  
    458         a dirty persistent object that has not been flushed. The client should  
    459         either flush the persistent object or set the parameter 'flag' to   
     459        This function will return an error if the client is attempting to free 
     460        a dirty persistent object that has not been flushed. The client should 
     461        either flush the persistent object or set the parameter 'flag' to 
    460462        OCI_OBJECT_FREE_FORCE. 
    461463 
    462         This function will call OCIObjectUnpin() once to check if the object  
    463         can be completely unpin. If it succeeds, the rest of the function will  
    464         proceed to free the object.  If it fails, then an error is returned  
     464        This function will call OCIObjectUnpin() once to check if the object 
     465        can be completely unpin. If it succeeds, the rest of the function will 
     466        proceed to free the object.  If it fails, then an error is returned 
    465467        unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE. 
    466   
    467         Freeing a persistent object in memory will not change the persistent  
    468         state of that object at the server.  For example, the object will  
     468 
     469        Freeing a persistent object in memory will not change the persistent 
     470        state of that object at the server.  For example, the object will 
    469471        remain locked after the object is freed. 
    470472 
    471473        FOR TRANSIENT OBJECTS: 
    472474 
    473         This function will call OCIObjectUnpin() once to check if the object  
    474         can be completely unpin. If it succeeds, the rest of the function will  
    475         proceed to free the object.  If it fails, then an error is returned  
    476         unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE.  
     475        This function will call OCIObjectUnpin() once to check if the object 
     476        can be completely unpin. If it succeeds, the rest of the function will 
     477        proceed to free the object.  If it fails, then an error is returned 
     478        unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE. 
    477479 
    478480        FOR VALUES: 
    479         The memory of the object is freed immediately.  
    480  
    481    RETURNS: 
    482         if environment handle or error handle is null, return  
    483         OCI_INVALID_HANDLE. 
    484         if operation suceeds, return OCI_SUCCESS.  
    485         if operation fails, return OCI_ERROR.  
     481        The memory of the object is freed immediately. 
     482 
     483   RETURNS: 
     484        if environment handle or error handle is null, return 
     485        OCI_INVALID_HANDLE. 
     486        if operation suceeds, return OCI_SUCCESS. 
     487        if operation fails, return OCI_ERROR. 
    486488*/ 
    487489 
     
    493495        env     (IN/OUT) - OCI environment handle initialized in object mode 
    494496        err     (IN/OUT) - error handle. If there is an error, it is 
    495                            recorded in 'err' and this function returns  
    496                            OCI_ERROR.  The error recorded in 'err' can be  
     497                           recorded in 'err' and this function returns 
     498                           OCI_ERROR.  The error recorded in 'err' can be 
    497499                           retrieved by calling OCIErrorGet(). 
    498500        object_ref  (IN) - ref of the object to be deleted 
     
    504506 
    505507        FOR PERSISTENT OBJECTS: 
    506         If the object is not loaded, then a temporary object is created and is  
    507         marked deleted. Otherwise, the object is marked deleted.   
     508        If the object is not loaded, then a temporary object is created and is 
     509        marked deleted. Otherwise, the object is marked deleted. 
    508510 
    509511        The object is deleted in the server when the object is flushed. 
     
    514516 
    515517   RETURNS: 
    516         if environment handle or error handle is null, return  
    517         OCI_INVALID_HANDLE. 
    518         if operation suceeds, return OCI_SUCCESS.  
    519         if operation fails, return OCI_ERROR.  
     518        if environment handle or error handle is null, return 
     519        OCI_INVALID_HANDLE. 
     520        if operation suceeds, return OCI_SUCCESS. 
     521        if operation fails, return OCI_ERROR. 
    520522 */ 
    521523 
    522524extern (C) sword OCIObjectMarkDelete (OCIEnv* env, OCIError* err, dvoid* instance); 
    523525/* 
    524    NAME: OCIObjectMarkDelete - OCI "delete" an instance given a Pointer  
     526   NAME: OCIObjectMarkDelete - OCI "delete" an instance given a Pointer 
    525527   PARAMETERS: 
    526528        env    (IN/OUT) - OCI environment handle initialized in object mode 
    527529        err    (IN/OUT) - error handle. If there is an error, it is 
    528                           recorded in 'err' and this function returns  
    529                           OCI_ERROR.  The error recorded in 'err' can be  
     530                          recorded in 'err' and this function returns 
     531                          OCI_ERROR.  The error recorded in 'err' can be 
    530532                          retrieved by calling OCIErrorGet(). 
    531         instance   (IN) - pointer to the instance  
     533        instance   (IN) - pointer to the instance 
    532534   REQUIRES: 
    533535        - a valid OCI environment handle must be given. 
     
    543545        The object is marked deleted.  The memory of the object is not freed. 
    544546 
    545         FOR VALUES:  
    546         This function frees a value immediately.  
    547  
    548    RETURNS: 
    549         if environment handle or error handle is null, return  
    550         OCI_INVALID_HANDLE. 
    551         if operation suceeds, return OCI_SUCCESS.  
    552         if operation fails, return OCI_ERROR.  
     547        FOR VALUES: 
     548        This function frees a value immediately. 
     549 
     550   RETURNS: 
     551        if environment handle or error handle is null, return 
     552        OCI_INVALID_HANDLE. 
     553        if operation suceeds, return OCI_SUCCESS. 
     554        if operation fails, return OCI_ERROR. 
    553555 */ 
    554556 
     
    559561        env    (IN/OUT) - OCI environment handle initialized in object mode 
    560562        err    (IN/OUT) - error handle. If there is an error, it is 
    561                           recorded in 'err' and this function returns  
    562                           OCI_ERROR.  The error recorded in 'err' can be  
     563                          recorded in 'err' and this function returns 
     564                          OCI_ERROR.  The error recorded in 'err' can be 
    563565                          retrieved by calling OCIErrorGet(). 
    564         object     (IN) - pointer to the persistent object  
     566        object     (IN) - pointer to the persistent object 
    565567   REQUIRES: 
    566568        - a valid OCI environment handle must be given. 
     
    571573 
    572574        When the object is written to the server, triggers may be fired. 
    573         Objects can be modified by the triggers at the server.  To keep the   
     575        Objects can be modified by the triggers at the server.  To keep the 
    574576        objects in the object cache being coherent with the database, the 
    575         clients can free or refresh the objects in the cache.  
     577        clients can free or refresh the objects in the cache. 
    576578 
    577579        This function will return an error for transient objects and values. 
    578          
    579    RETURNS: 
    580         if environment handle or error handle is null, return  
    581         OCI_INVALID_HANDLE. 
    582         if operation suceeds, return OCI_SUCCESS.  
    583         if operation fails, return OCI_ERROR.  
     580 
     581   RETURNS: 
     582        if environment handle or error handle is null, return 
     583        OCI_INVALID_HANDLE. 
     584        if operation suceeds, return OCI_SUCCESS. 
     585        if operation fails, return OCI_ERROR. 
    584586 */ 
    585587 
     
    590592        env    (IN/OUT) - OCI environment handle initialized in object mode 
    591593        err    (IN/OUT) - error handle. If there is an error, it is 
    592                           recorded in 'err' and this function returns  
    593                           OCI_ERROR.  The error recorded in 'err' can be  
     594                          recorded in 'err' and this function returns 
     595                          OCI_ERROR.  The error recorded in 'err' can be 
    594596                          retrieved by calling OCIErrorGet(). 
    595         object     (IN) - pointer to the persistent object  
     597        object     (IN) - pointer to the persistent object 
    596598   REQUIRES: 
    597599        - a valid OCI environment handle must be given. 
     
    599601   DESCRIPTION: 
    600602        This function refreshes an unmarked object with data retrieved from the 
    601         latest snapshot in the server. An object should be refreshed when the  
    602         objects in the cache are inconsistent with the objects at  
     603        latest snapshot in the server. An object should be refreshed when the 
     604        objects in the cache are inconsistent with the objects at 
    603605        the server: 
    604606        1) When an object is flushed to the server, triggers can be fired to 
    605            modify more objects in the server.  The same objects (modified by  
     607           modify more objects in the server.  The same objects (modified by 
    606608           the triggers) in the object cache become obsolete. 
    607609        2) When the user issues a SQL or executes a PL/SQL procedure to modify 
     
    610612 
    611613        The object that is refreshed will be 'replaced-in-place'. When an 
    612         object is 'replaced-in-place', the top level memory of the object will  
    613         be reused so that new data can be loaded into the same memory address.  
     614        object is 'replaced-in-place', the top level memory of the object will 
     615        be reused so that new data can be loaded into the same memory address. 
    614616        The top level memory of the null structre is also reused. Unlike the 
    615617        top level memory chunk, the secondary memory chunks may be resized and 
    616         reallocated.  The client should be careful when holding onto a pointer  
    617         to the secondary memory chunk (e.g. assigning the address of a  
    618         secondary memory to a local variable), since this pointer can become  
     618        reallocated.  The client should be careful when holding onto a pointer 
     619        to the secondary memory chunk (e.g. assigning the address of a 
     620        secondary memory to a local variable), since this pointer can become 
    619621        invalid after the object is refreshed. 
    620622 
    621         The object state will be modified as followed after being refreshed:  
     623        The object state will be modified as followed after being refreshed: 
    622624          - existent : set to appropriate value 
    623           - pinned   : unchanged  
    624           - allocation duration : unchanged  
    625           - pin duration : unchanged  
    626          
     625          - pinned   : unchanged 
     626          - allocation duration : unchanged 
     627          - pin duration : unchanged 
     628 
    627629        This function is an no-op for transient objects or values. 
    628630 
    629631   RETURNS: 
    630         if environment handle or error handle is null, return  
    631         OCI_INVALID_HANDLE. 
    632         if operation suceeds, return OCI_SUCCESS.  
    633         if operation fails, return OCI_ERROR.  
     632        if environment handle or error handle is null, return 
     633        OCI_INVALID_HANDLE. 
     634        if operation suceeds, return OCI_SUCCESS. 
     635        if operation fails, return OCI_ERROR. 
    634636 */ 
    635637 
     
    640642        env     (IN/OUT) - OCI environment handle initialized in object mode 
    641643        err     (IN/OUT) - error handle. If there is an error, it is 
    642                            recorded in 'err' and this function returns  
    643                            OCI_ERROR.  The error recorded in 'err' can be  
     644                           recorded in 'err' and this function returns 
     645                           OCI_ERROR.  The error recorded in 'err' can be 
    644646                           retrieved by calling OCIErrorGet(). 
    645647        svc         (IN) - OCI service context handle 
    646         source      (IN) - pointer to the source instance  
     648        source      (IN) - pointer to the source instance 
    647649        null_source (IN) - pointer to the null structure of the source 
    648650        target      (IN) - pointer to the target instance 
    649         null_target (IN) - pointer to the null structure of the target  
     651        null_target (IN) - pointer to the null structure of the target 
    650652        tdo         (IN) - the TDO for both source and target 
    651653        duration    (IN) - allocation duration of the target memory 
     
    653655                        OROOCOSFN - Set Reference to Null. All references 
    654656                        in the source will not be copied to the target. The 
    655                         references in the target are set to null.  
     657                        references in the target are set to null. 
    656658   REQUIRES: 
    657659        - a valid OCI environment handle must be given. 
     
    664666   DESCRIPTION: 
    665667        This function copies the contents of the 'source' instance to the 
    666         'target' instance. This function performs a deep-copy such that the  
     668        'target' instance. This function performs a deep-copy such that the 
    667669        data that is copied/duplicated include: 
    668670        a) all the top level attributes (see the exceptions below) 
     
    671673        c) the null structure of the instance 
    672674 
    673         Memory is allocated with the specified allocation duration.  
    674  
    675         Certain data items are not copied:  
     675        Memory is allocated with the specified allocation duration. 
     676 
     677        Certain data items are not copied: 
    676678        a) If the option OCI_OBJECTCOPY_NOREF is specified, then all references 
    677679           in the source are not copied. Instead, the references in the target 
     
    680682 
    681683   RETURNS: 
    682         if environment handle or error handle is null, return  
    683         OCI_INVALID_HANDLE. 
    684         if operation suceeds, return OCI_SUCCESS.  
    685         if operation fails, return OCI_ERROR.  
     684        if environment handle or error handle is null, return 
     685        OCI_INVALID_HANDLE. 
     686        if operation suceeds, return OCI_SUCCESS. 
     687        if operation fails, return OCI_ERROR. 
    686688 */ 
    687689 
     
    692694        env   (IN/OUT) - OCI environment handle initialized in object mode 
    693695        err   (IN/OUT) - error handle. If there is an error, it is 
    694                          recorded in 'err' and this function returns  
    695                          OCI_ERROR.  The error recorded in 'err' can be  
     696                         recorded in 'err' and this function returns 
     697                         OCI_ERROR.  The error recorded in 'err' can be 
    696698                         retrieved by calling OCIErrorGet(). 
    697         instance  (IN) - pointer to an standalone instance  
    698         type_ref (OUT) - reference to the type of the object.  The reference  
     699        instance  (IN) - pointer to an standalone instance 
     700        type_ref (OUT) - reference to the type of the object.  The reference 
    699701                         must already be allocated. 
    700702   REQUIRES: 
     
    704706        - The reference must already be allocated. 
    705707   DESCRIPTION: 
    706         This function returns a reference to the TDO of a standalone instance.  
    707    RETURNS: 
    708         if environment handle or error handle is null, return  
    709         OCI_INVALID_HANDLE. 
    710         if operation suceeds, return OCI_SUCCESS.  
    711         if operation fails, return OCI_ERROR.  
     708        This function returns a reference to the TDO of a standalone instance. 
     709   RETURNS: 
     710        if environment handle or error handle is null, return 
     711        OCI_INVALID_HANDLE. 
     712        if operation suceeds, return OCI_SUCCESS. 
     713        if operation fails, return OCI_ERROR. 
    712714 */ 
    713715 
    714716extern (C) sword OCIObjectGetObjectRef (OCIEnv* env, OCIError* err, dvoid* object, OCIRef* object_ref); 
    715717/* 
    716    NAME: OCIObjectGetObjectRef - OCI get the object reference of an  
     718   NAME: OCIObjectGetObjectRef - OCI get the object reference of an 
    717719                                 referenceable object 
    718720   PARAMETERS: 
    719721        env     (IN/OUT) - OCI environment handle initialized in object mode 
    720722        err     (IN/OUT) - error handle. If there is an error, it is 
    721                            recorded in 'err' and this function returns  
    722                            OCI_ERROR.  The error recorded in 'err' can be  
     723                           recorded in 'err' and this function returns 
     724                           OCI_ERROR.  The error recorded in 'err' can be 
    723725                           retrieved by calling OCIErrorGet(). 
    724726        object      (IN) - pointer to a persistent object 
    725         object_ref (OUT) - reference of the given object. The reference must  
     727        object_ref (OUT) - reference of the given object. The reference must 
    726728                           already be allocated. 
    727729   REQUIRES: 
     
    730732        - The reference must already be allocated. 
    731733   DESCRIPTION: 
    732         This function returns a reference to the given object.  It returns an  
    733         error for values.  
    734    RETURNS: 
    735         if environment handle or error handle is null, return  
    736         OCI_INVALID_HANDLE. 
    737         if operation suceeds, return OCI_SUCCESS.  
    738         if operation fails, return OCI_ERROR.  
     734        This function returns a reference to the given object.  It returns an 
     735        error for values. 
     736   RETURNS: 
     737        if environment handle or error handle is null, return 
     738        OCI_INVALID_HANDLE. 
     739        if operation suceeds, return OCI_SUCCESS. 
     740        if operation fails, return OCI_ERROR. 
    739741 */ 
    740742 
    741743extern (C) sword OCIObjectMakeObjectRef (OCIEnv* env, OCIError* err, OCISvcCtx* svc, dvoid* table, dvoid** values, ub4 array_len, OCIRef* object_ref); 
    742744/* 
    743    NAME: OCIObjectMakeObjectRef - OCI Create an object reference to a  
     745   NAME: OCIObjectMakeObjectRef - OCI Create an object reference to a 
    744746                                 referenceable object. 
    745747   PARAMETERS: 
    746748        env     (IN/OUT) - OCI environment handle initialized in object mode 
    747749        err     (IN/OUT) - error handle. If there is an error, it is 
    748                            recorded in 'err' and this function returns  
    749                            OCI_ERROR.  The error recorded in 'err' can be  
     750                           recorded in 'err' and this function returns 
     751                           OCI_ERROR.  The error recorded in 'err' can be 
    750752                           retrieved by calling OCIErrorGet(). 
    751753        svc         (IN) - the service context 
     
    753755        attrlist    (IN) - A list of values (OCI type values) from which 
    754756                           the ref is to be created. 
    755         attrcnt     (IN)  - The length of the attrlist array.  
    756         object_ref (OUT) - reference of the given object. The reference must  
    757                            already be allocated.  
     757        attrcnt     (IN)  - The length of the attrlist array. 
     758        object_ref (OUT) - reference of the given object. The reference must 
     759                           already be allocated. 
    758760   REQUIRES: 
    759761        - a valid OCI environment handle must be given. 
     
    761763        - The reference must already be allocated. 
    762764   DESCRIPTION: 
    763         This function creates a reference given the values that make up the  
    764         reference and also a pointer to the table object.  
     765        This function creates a reference given the values that make up the 
     766        reference and also a pointer to the table object. 
    765767        Based on the table's OID property, whether it is a pk based OID or 
    766768        a system generated OID, the function creates a sys-generated REF or 
     
    770772        In case of PK refs pass in the OCI equivalent for numbers, chars etc.. 
    771773   RETURNS: 
    772         if environment handle or error handle is null, return  
    773         OCI_INVALID_HANDLE. 
    774         if operation suceeds, return OCI_SUCCESS.  
    775         if operation fails, return OCI_ERROR.  
     774        if environment handle or error handle is null, return 
     775        OCI_INVALID_HANDLE. 
     776        if operation suceeds, return OCI_SUCCESS. 
     777        if operation fails, return OCI_ERROR. 
    776778 */ 
    777779 
    778780extern (C) sword OCIObjectGetPrimaryKeyTypeRef (OCIEnv* env, OCIError* err, OCISvcCtx* svc, dvoid* table, OCIRef* type_ref ); 
    779781/* 
    780    NAME: OCIObjectGetPrimaryKeyTypeRef - OCI get the REF to the pk OID type  
     782   NAME: OCIObjectGetPrimaryKeyTypeRef - OCI get the REF to the pk OID type 
    781783   PARAMETERS: 
    782784        env     (IN/OUT) - OCI environment handle initialized in object mode 
    783785        err     (IN/OUT) - error handle. If there is an error, it is 
    784                            recorded in 'err' and this function returns  
    785                            OCI_ERROR.  The error recorded in 'err' can be  
     786                           recorded in 'err' and this function returns 
     787                           OCI_ERROR.  The error recorded in 'err' can be 
    786788                           retrieved by calling OCIErrorGet(). 
    787         svc     (IN)     - the service context  
     789        svc     (IN)     - the service context 
    788790        table   (IN)     - pointer to the table object 
    789         type_ref   (OUT) - reference of the pk type. The reference must  
     791        type_ref   (OUT) - reference of the pk type. The reference must 
    790792                           already be allocated. 
    791793   REQUIRES: 
     
    794796        - The reference must already be allocated. 
    795797   DESCRIPTION: 
    796         This function returns a reference to the pk type.  It returns an  
     798        This function returns a reference to the pk type.  It returns an 
    797799        error for values.  If the table is not a Pk oid table/view, then 
    798800        it returns error. 
    799801   RETURNS: 
    800         if environment handle or error handle is null, return  
    801         OCI_INVALID_HANDLE. 
    802         if operation suceeds, return OCI_SUCCESS.  
    803         if operation fails, return OCI_ERROR.  
     802        if environment handle or error handle is null, return 
     803        OCI_INVALID_HANDLE. 
     804        if operation suceeds, return OCI_SUCCESS. 
     805        if operation fails, return OCI_ERROR. 
    804806 */ 
    805807 
    806808extern (C) sword OCIObjectGetInd (OCIEnv* env, OCIError* err, dvoid* instance, dvoid** null_struct); 
    807809/* 
    808    NAME: OCIObjectGetInd - OCI get the null structure of a standalone object   
     810   NAME: OCIObjectGetInd - OCI get the null structure of a standalone object 
    809811   PARAMETERS: 
    810812        env     (IN/OUT) - OCI environment handle initialized in object mode 
    811813        err     (IN/OUT) - error handle. If there is an error, it is 
    812                            recorded in 'err' and this function returns  
    813                            OCI_ERROR.  The error recorded in 'err' can be  
     814                           recorded in 'err' and this function returns 
     815                           OCI_ERROR.  The error recorded in 'err' can be 
    814816                           retrieved by calling OCIErrorGet(). 
    815         instance      (IN) - pointer to the instance  
    816         null_struct (OUT) - null structure  
     817        instance      (IN) - pointer to the instance 
     818        null_struct (OUT) - null structure 
    817819   REQUIRES: 
    818820        - a valid OCI environment handle must be given. 
     
    822824        This function returns the null structure of an instance. This function 
    823825        will allocate the top level memory of the null structure if it is not 
    824         already allocated. If an null structure cannot be allocated for the  
    825         instance, then an error is returned. This function only works for  
    826         ADT or row type instance.  
    827    RETURNS: 
    828         if environment handle or error handle is null, return  
    829         OCI_INVALID_HANDLE. 
    830         if operation suceeds, return OCI_SUCCESS.  
    831         if operation fails, return OCI_ERROR.  
    832  */ 
    833  
    834 extern (C) sword OCIObjectExists (OCIEnv* env, OCIError* err, dvoid* ins, boolean* exist);  
    835 /* 
    836    NAME: OCIObjectExist - OCI checks if the object exists  
     826        already allocated. If an null structure cannot be allocated for the 
     827        instance, then an error is returned. This function only works for 
     828        ADT or row type instance. 
     829   RETURNS: 
     830        if environment handle or error handle is null, return 
     831        OCI_INVALID_HANDLE. 
     832        if operation suceeds, return OCI_SUCCESS. 
     833        if operation fails, return OCI_ERROR. 
     834 */ 
     835 
     836extern (C) sword OCIObjectExists (OCIEnv* env, OCIError* err, dvoid* ins, boolean* exist); 
     837/* 
     838   NAME: OCIObjectExist - OCI checks if the object exists 
    837839   PARAMETERS: 
    838840        env       (IN/OUT) - OCI environment handle initialized in object mode 
    839841        err       (IN/OUT) - error handle. If there is an error, it is 
    840                              recorded in 'err' and this function returns  
    841                              OCI_ERROR.  The error recorded in 'err' can be  
     842                             recorded in 'err' and this function returns 
     843                             OCI_ERROR.  The error recorded in 'err' can be 
    842844                             retrieved by calling OCIErrorGet(). 
    843         ins           (IN) - pointer to an instance  
     845        ins           (IN) - pointer to an instance 
    844846        exist        (OUT) - return TRUE if the object exists 
    845847   REQUIRES: 
     
    851853        is a value, this function always returns TRUE. 
    852854   RETURNS: 
    853         if environment handle or error handle is null, return  
    854         OCI_INVALID_HANDLE. 
    855         if operation suceeds, return OCI_SUCCESS.  
    856         if operation fails, return OCI_ERROR.  
     855        if environment handle or error handle is null, return 
     856        OCI_INVALID_HANDLE. 
     857        if operation suceeds, return OCI_SUCCESS. 
     858        if operation fails, return OCI_ERROR. 
    857859 */ 
    858860 
     
    871873                             copied 
    872874        size      (IN/OUT) - on input specifies the size of the property buffer 
    873                              passed by caller, on output will contain the  
     875                             passed by caller, on output will contain the 
    874876                             size in bytes of the property returned. 
    875                              This parameter is required for string type  
     877                             This parameter is required for string type 
    876878                             properties only (e.g OCI_OBJECTPROP_SCHEMA, 
    877879                             OCI_OBJECTPROP_TABLE). For non-string 
     
    882884        The desired property is identified by 'propertyId'. The property 
    883885        value is copied into 'property' and for string typed properties 
    884         the string size is returned via 'size'.  
    885          
     886        the string size is returned via 'size'. 
     887 
    886888        Objects are classified as persistent, transient and value 
    887889        depending upon the lifetime and referenceability of the object. 
    888890        Some of the properties are applicable only to persistent 
    889         objects and some others only apply to persistent and  
    890         transient objects. An error is returned if the user tries to  
    891         get a property which in not applicable to the given object.  
     891        objects and some others only apply to persistent and 
     892        transient objects. An error is returned if the user tries to 
     893        get a property which in not applicable to the given object. 
    892894        To avoid such an error, the user should first check whether 
    893         the object is persistent or transient or value  
     895        the object is persistent or transient or value 
    894896        (OCI_OBJECTPROP_LIFETIME property) and then appropriately 
    895897        query for other properties. 
    896898 
    897         The different property ids and the corresponding type of  
     899        The different property ids and the corresponding type of 
    898900        'property' argument is given below. 
    899901 
    900           OCI_OBJECTPROP_LIFETIME  
     902          OCI_OBJECTPROP_LIFETIME 
    901903            This identifies whether the given object is a persistent 
    902             object (OCI_OBJECT_PERSISTENT) or a  
     904            object (OCI_OBJECT_PERSISTENT) or a 
    903905            transient object (OCI_OBJECT_TRANSIENT) or a 
    904906            value instance (OCI_OBJECT_VALUE). 
    905             'property' argument must be a pointer to a variable of  
     907            'property' argument must be a pointer to a variable of 
    906908            type OCIObjectLifetime. 
    907              
     909 
    908910          OCI_OBJECTPROP_SCHEMA 
    909             This returns the schema name of the table in which the  
    910             object exists. An error is returned if the given object  
    911             points to a transient instance or a value. If the input  
    912             buffer is not big enough to hold the schema name an error  
    913             is returned, the error message will communicate the  
    914             required size. Upon success, the size of the returned  
     911            This returns the schema name of the table in which the 
     912            object exists. An error is returned if the given object 
     913            points to a transient instance or a value. If the input 
     914            buffer is not big enough to hold the schema name an error 
     915            is returned, the error message will communicate the 
     916            required size. Upon success, the size of the returned 
    915917            schema name in bytes is returned via 'size'. 
    916918            'property' argument must be an array of type text and 'size' 
     
    918920 
    919921          OCI_OBJECTPROP_TABLE 
    920             This returns the table name in which the object exists. An  
    921             error is returned if the given object points to a  
    922             transient instance or a value. If the input buffer is not  
    923             big enough to hold the table name an error is returned,  
    924             the error message will communicate the required size. Upon  
    925             success, the size of the returned table name in bytes is  
    926             returned via 'size'. 'property' argument must be an array  
    927             of type text and 'size' should be set to size of array in  
     922            This returns the table name in which the object exists. An 
     923            error is returned if the given object points to a 
     924            transient instance or a value. If the input buffer is not 
     925            big enough to hold the table name an error is returned, 
     926            the error message will communicate the required size. Upon 
     927            success, the size of the returned table name in bytes is 
     928            returned via 'size'. 'property' argument must be an array 
     929            of type text and 'size' should be set to size of array in 
    928930            bytes by the caller. 
    929              
     931 
    930932          OCI_OBJECTPROP_PIN_DURATION 
    931933            This returns the pin duration of the object. 
    932             An error is returned if the given object points to a value  
     934            An error is returned if the given object points to a value 
    933935            instance. Valid pin durations are: OCI_DURATION_SESSION and 
    934936            OCI_DURATION_TRANS. 
    935             'property' argument must be a pointer to a variable of type  
     937            'property' argument must be a pointer to a variable of type 
    936938            OCIDuration. 
    937              
     939 
    938940          OCI_OBJECTPROP_ALLOC_DURATION 
    939941            This returns the allocation duration of the object. 
    940942            Valid allocation durations are: OCI_DURATION_SESSION and 
    941943            OCI_DURATION_TRANS. 
    942             'property' argument must be a pointer to a variable of type  
     944            'property' argument must be a pointer to a variable of type 
    943945            OCIDuration. 
    944              
     946 
    945947          OCI_OBJECTPROP_LOCK 
    946             This returns the lock status of the  
     948            This returns the lock status of the 
    947949            object. The possible lock status is enumerated by OCILockOpt. 
    948950            An error is returned if the given object points to a transient 
    949951            or value instance. 
    950             'property' argument must be a pointer to a variable of  
     952            'property' argument must be a pointer to a variable of 
    951953            type OCILockOpt. 
    952954            Note, the lock status of an object can also be retrieved by 
     
    964966              OCI_OBJECT_IS_DIRTY(flag) 
    965967 
    966             An object is dirty if it is a new object or marked deleted or  
     968            An object is dirty if it is a new object or marked deleted or 
    967969            marked updated. 
    968970            An error is returned if the given object points to a transient 
    969             or value instance. 'property' argument must be of type  
     971            or value instance. 'property' argument must be of type 
    970972            OCIObjectMarkStatus. 
    971              
     973 
    972974          OCI_OBJECTPROP_VIEW 
    973975            This identifies whether the specified object is a view object 
     
    10351037extern (C) sword OCIObjectPinTable (OCIEnv* env, OCIError* err, OCISvcCtx* svc, oratext* schema_name, ub4 s_n_length, oratext* object_name, ub4 o_n_length, OCIRef* scope_obj_ref, OCIDuration pin_duration, dvoid** object); 
    10361038/* 
    1037    NAME: OCIObjectPinTable - OCI get table object  
     1039   NAME: OCIObjectPinTable - OCI get table object 
    10381040   PARAMETERS: 
    10391041        env       (IN/OUT) - OCI environment handle initialized in object mode 
    10401042        err       (IN/OUT) - error handle. If there is an error, it is 
    1041                              recorded in 'err' and this function returns  
    1042                              OCI_ERROR.  The error recorded in 'err' can be  
     1043                             recorded in 'err' and this function returns 
     1044                             OCI_ERROR.  The error recorded in 'err' can be 
    10431045                             retrieved by calling OCIErrorGet(). 
    10441046        svc                     (IN) - OCI service context handle 
    1045         schema_name   (IN, optional) - schema name of the table  
     1047        schema_name   (IN, optional) - schema name of the table 
    10461048        s_n_length    (IN, optional) - length of the schema name 
    1047         object_name   (IN) - name of the table  
     1049        object_name   (IN) - name of the table 
    10481050        o_n_length    (IN) - length of the table name 
    10491051        scope_obj_ref (IN, optional) - reference of the scoping object 
    1050         pin_duration  (IN) - pin duration. See description in OCIObjectPin().  
     1052        pin_duration  (IN) - pin duration. See description in OCIObjectPin(). 
    10511053        object       (OUT) - the pinned table object 
    10521054   REQUIRES: 
    10531055        - a valid OCI environment handle must be given. 
    10541056   DESCRIPTION: 
    1055         This function pin a table object with the specified pin duration.  
    1056         The client can unpin the object by calling OCIObjectUnpin(). See  
     1057        This function pin a table object with the specified pin duration. 
     1058        The client can unpin the object by calling OCIObjectUnpin(). See 
    10571059        OCIObjectPin() and OCIObjectUnpin() for more information about pinning 
    1058         and unpinning.  
    1059    RETURNS: 
    1060         if environment handle or error handle is null, return  
    1061         OCI_INVALID_HANDLE. 
    1062         if operation suceeds, return OCI_SUCCESS.  
    1063         if operation fails, return OCI_ERROR.  
     1060        and unpinning. 
     1061   RETURNS: 
     1062        if environment handle or error handle is null, return 
     1063        OCI_INVALID_HANDLE. 
     1064        if operation suceeds, return OCI_SUCCESS. 
     1065        if operation fails, return OCI_ERROR. 
    10641066 */ 
    10651067 
    10661068extern (C) sword OCIObjectArrayPin (OCIEnv* env, OCIError* err, OCIRef** ref_array, ub4 array_size, OCIComplexObject** cor_array, ub4 cor_array_size, OCIPinOpt pin_option, OCIDuration pin_duration, OCILockOpt lock, dvoid** obj_array, ub4* pos); 
    10671069/* 
    1068    NAME: OCIObjectArrayPin - ORIO array pin  
     1070   NAME: OCIObjectArrayPin - ORIO array pin 
    10691071   PARAMETERS: 
    10701072        env       (IN/OUT) - OCI environment handle initialized in object mode 
    10711073        err       (IN/OUT) - error handle. If there is an error, it is 
    1072                              recorded in 'err' and this function returns  
    1073                              OCI_ERROR.  The error recorded in 'err' can be  
     1074                             recorded in 'err' and this function returns 
     1075                             OCI_ERROR.  The error recorded in 'err' can be 
    10741076                             retrieved by calling OCIErrorGet(). 
    1075         ref_array     (IN) - array of references to be pinned  
    1076         array_size    (IN) - number of elements in the array of references  
     1077        ref_array     (IN) - array of references to be pinned 
     1078        array_size    (IN) - number of elements in the array of references 
    10771079        pin_option    (IN) - pin option. See OCIObjectPin(). 
    1078         pin_duration  (IN) - pin duration. See OCIObjectPin().  
     1080        pin_duration  (IN) - pin duration. See OCIObjectPin(). 
    10791081        lock_option   (IN) - lock option. See OCIObjectPin(). 
    1080         obj_array    (OUT) - If this argument is not NULL, the pinned objects  
    1081                              will be returned in the array. The user must  
    1082                              allocate this array with element type being  
     1082        obj_array    (OUT) - If this argument is not NULL, the pinned objects 
     1083                             will be returned in the array. The user must 
     1084                             allocate this array with element type being 
    10831085                             'dvoid *'. The size of this array is identical to 
    1084                              'array'.  
     1086                             'array'. 
    10851087        pos          (OUT) - If there is an error, this argument will contain 
    10861088                             the element that is causing the error.  Note that 
    10871089                             this argument is set to 1 for the first element in 
    1088                              the ref_array.  
     1090                             the ref_array. 
    10891091   REQUIRE: 
    10901092        - a valid OCI environment handle must be given. 
    10911093        - If 'obj_array' is not NULL, then it must already be allocated and 
    1092              the size of 'obj_array' is 'array_size'.  
    1093    DESCRIPTION: 
    1094         This function pin an array of references.  All the pinned objects are  
    1095         retrieved from the database in one network roundtrip.  If the user  
    1096         specifies an output array ('obj_array'), then the address of the  
     1094             the size of 'obj_array' is 'array_size'. 
     1095   DESCRIPTION: 
     1096        This function pin an array of references.  All the pinned objects are 
     1097        retrieved from the database in one network roundtrip.  If the user 
     1098        specifies an output array ('obj_array'), then the address of the 
    10971099        pinned objects will be assigned to the elements in the array. See 
    10981100        OCIObjectPin() for more information about pinning. 
    10991101   RETURNS: 
    1100         if environment handle or error handle is null, return  
    1101         OCI_INVALID_HANDLE. 
    1102         if operation suceeds, return OCI_SUCCESS.  
    1103         if operation fails, return OCI_ERROR.  
    1104  */ 
    1105  
    1106 extern (C) sword OCICacheFlush (OCIEnv* env, OCIError* err, OCISvcCtx* svc, dvoid* context, OCIRef* function(dvoid* context, ub1* last) get, OCIRef** ref); 
    1107 /* 
    1108    NAME: OCICacheFlush - OCI flush persistent objects  
     1102        if environment handle or error handle is null, return 
     1103        OCI_INVALID_HANDLE. 
     1104        if operation suceeds, return OCI_SUCCESS. 
     1105        if operation fails, return OCI_ERROR. 
     1106 */ 
     1107 
     1108extern (C) sword OCICacheFlush (OCIEnv* env, OCIError* err, OCISvcCtx* svc, dvoid* context, OCIRef* function(dvoid* context, ub1* last) get, OCIRef** reference); 
     1109/* 
     1110   NAME: OCICacheFlush - OCI flush persistent objects 
    11091111   PARAMETERS: 
    11101112        env (IN/OUT) - OCI environment handle initialized in object mode 
    11111113        err (IN/OUT) - error handle. If there is an error, it is 
    1112                       recorded in 'err' and this function returns  
    1113                       OCI_ERROR.  The error recorded in 'err' can be  
     1114                      recorded in 'err' and this function returns 
     1115                      OCI_ERROR.  The error recorded in 'err' can be 
    11141116                      retrieved by calling OCIErrorGet(). 
    11151117        svc      (IN) [optional] - OCI service context.  If null pointer is 
    11161118                      specified, then the dirty objects in all connections 
    11171119                      will be flushed. 
    1118         context  (IN) [optional] - specifies an user context that is an  
    1119                       argument to the client callback function 'get'. This  
     1120        context  (IN) [optional] - specifies an user context that is an 
     1121                      argument to the client callback function 'get'. This 
    11201122                      parameter is set to NULL if there is no user context. 
    1121         get      (IN) [optional] - an client-defined function which acts an  
    1122                       iterator to retrieve a batch of dirty objects that need  
     1123        get      (IN) [optional] - an client-defined function which acts an 
     1124                      iterator to retrieve a batch of dirty objects that need 
    11231125                      to be flushed. If the function is not NULL, this function 
    1124                       will be called to get a reference of a dirty object.   
    1125                       This is repeated until a null reference is returned by  
    1126                       the client function or the parameter 'last' is set to  
    1127                       TRUE. The parameter 'context' is passed to get()  
    1128                       for each invocation of the client function.  This  
     1126                      will be called to get a reference of a dirty object. 
     1127                      This is repeated until a null reference is returned by 
     1128                      the client function or the parameter 'last' is set to 
     1129                      TRUE. The parameter 'context' is passed to get() 
     1130                      for each invocation of the client function.  This 
    11291131                      parameter should be NULL if user callback is not given. 
    11301132                      If the object that is returned by the client function is 
    11311133                      not a dirtied persistent object, the object is ignored. 
    11321134                      All the objects that are returned from the client 
    1133                       function must be from newed or pinned the same service  
    1134                       context, otherwise, an error is signalled. Note that the  
     1135                      function must be from newed or pinned the same service 
     1136                      context, otherwise, an error is signalled. Note that the 
    11351137                      returned objects are flushed in the order in which they 
    11361138                      are marked dirty. 
    1137         ref     (OUT) [optional] - if there is an error in flushing the  
     1139        ref     (OUT) [optional] - if there is an error in flushing the 
    11381140                      objects, (*ref) will point to the object that 
    1139                       is causing the error.  If 'ref' is NULL, then the object  
    1140                       will not be returned.  If '*ref' is NULL, then a  
    1141                       reference will be allocated and set to point to the  
     1141                      is causing the error.  If 'ref' is NULL, then the object 
     1142                      will not be returned.  If '*ref' is NULL, then a 
     1143                      reference will be allocated and set to point to the 
    11421144                      object.  If '*ref' is not NULL, then the reference of 
    11431145                      the object is copied into the given space. If the 
     
    11481150        - a valid OCI environment handle must be given. 
    11491151   DESCRIPTION: 
    1150         This function flushes the modified persistent objects from the  
    1151         environment heap to the server. The objects are flushed in the order  
    1152         that they are marked updated or deleted.  
     1152        This function flushes the modified persistent objects from the 
     1153        environment heap to the server. The objects are flushed in the order 
     1154        that they are marked updated or deleted. 
    11531155 
    11541156        See OCIObjectFlush() for more information about flushing. 
    11551157 
    11561158   RETURNS: 
    1157         if environment handle or error handle is null, return  
    1158         OCI_INVALID_HANDLE. 
    1159         if operation suceeds, return OCI_SUCCESS.  
    1160         if operation fails, return OCI_ERROR.  
    1161  */ 
    1162  
    1163 extern (C) sword OCICacheRefresh (OCIEnv* env, OCIError* err, OCISvcCtx* svc, OCIRefreshOpt option, dvoid* context, OCIRef* function(dvoid* context) get, OCIRef** ref); 
    1164 /* 
    1165    NAME: OCICacheRefresh - OCI ReFreSh persistent objects  
     1159        if environment handle or error handle is null, return 
     1160        OCI_INVALID_HANDLE. 
     1161        if operation suceeds, return OCI_SUCCESS. 
     1162        if operation fails, return OCI_ERROR. 
     1163 */ 
     1164 
     1165extern (C) sword OCICacheRefresh (OCIEnv* env, OCIError* err, OCISvcCtx* svc, OCIRefreshOpt option, dvoid* context, OCIRef* function(dvoid* context) get, OCIRef** reference); 
     1166/* 
     1167   NAME: OCICacheRefresh - OCI ReFreSh persistent objects 
    11661168   PARAMETERS: 
    11671169        env (IN/OUT) - OCI environment handle initialized in object mode 
    11681170        err (IN/OUT) - error handle. If there is an error, it is 
    1169                        recorded in 'err' and this function returns  
    1170                        OCI_ERROR.  The error recorded in 'err' can be  
     1171                       recorded in 'err' and this function returns 
     1172                       OCI_ERROR.  The error recorded in 'err' can be 
    11711173                       retrieved by calling OCIErrorGet(). 
    11721174        svc     (IN) [optional] - OCI service context.  If null pointer is 
    11731175                      specified, then the persistent objects in all connections 
    1174                       will be refreshed.  
     1176                      will be refreshed. 
    11751177        option   (IN) [optional] - if OCI_REFRESH_LOAD is specified, all 
    11761178                      objects that is loaded within the transaction are 
    11771179                      refreshed. If the option is OCI_REFERSH_LOAD and the 
    11781180                      parameter 'get' is not NULL, this function will ignore 
    1179                       the parameter.  
    1180         context  (IN) [optional] - specifies an user context that is an  
    1181                       argument to the client callback function 'get'. This  
     1181                      the parameter. 
     1182        context  (IN) [optional] - specifies an user context that is an 
     1183                      argument to the client callback function 'get'. This 
    11821184                      parameter is set to NULL if there is no user context. 
    1183         get      (IN) [optional] - an client-defined function which acts an  
     1185        get      (IN) [optional] - an client-defined function which acts an 
    11841186                      iterator to retrieve a batch of objects that need to be 
    11851187                      refreshed. If the function is not NULL, this function 
    1186                       will be called to get a reference of an object.  If  
    1187                       the reference is not NULL, then the object will be  
    1188                       refreshed.  These steps are repeated until a null  
     1188                      will be called to get a reference of an object.  If 
     1189                      the reference is not NULL, then the object will be 
     1190                      refreshed.  These steps are repeated until a null 
    11891191                      reference is returned by this function.  The parameter 
    11901192                      'context' is passed to get() for each invocation of the 
    1191                       client function.  This parameter should be NULL if user  
     1193                      client function.  This parameter should be NULL if user 
    11921194                      callback is not given. 
    11931195        ref     (OUT) [optional] - if there is an error in refreshing the 
     
    12041206        - a valid OCI environment handle must be given. 
    12051207   DESCRIPTION: 
    1206         This function refreshes all pinned persistent objects. All unpinned  
    1207         persistent objects are freed.  See OCIObjectRefresh() for more  
     1208        This function refreshes all pinned persistent objects. All unpinned 
     1209        persistent objects are freed.  See OCIObjectRefresh() for more 
    12081210        information about refreshing. 
    12091211   RETURNS: 
    1210         if environment handle or error handle is null, return  
    1211         OCI_INVALID_HANDLE. 
    1212         if operation suceeds, return OCI_SUCCESS.  
    1213         if operation fails, return OCI_ERROR.  
     1212        if environment handle or error handle is null, return 
     1213        OCI_INVALID_HANDLE. 
     1214        if operation suceeds, return OCI_SUCCESS. 
     1215        if operation fails, return OCI_ERROR. 
    12141216 */ 
    12151217 
    12161218extern (C) sword OCICacheUnpin (OCIEnv* env, OCIError* err, OCISvcCtx* svc); 
    12171219/* 
    1218    NAME: OCICacheUnpin - OCI UNPin objects  
    1219    PARAMETERS: 
    1220         env (IN/OUT) - OCI environment handle initialized in object mode 
    1221         err (IN/OUT) - error handle. If there is an error, it is 
    1222                        recorded in 'err' and this function returns  
    1223                        OCI_ERROR.  The error recorded in 'err' can be  
    1224                        retrieved by calling OCIErrorGet(). 
    1225         svc     (IN) [optional] - OCI service context. If null pointer is 
    1226                        specified, then the objects in all connections 
    1227                        will be unpinned. 
    1228    REQUIRES: 
    1229         - a valid OCI environment handle must be given. 
    1230    DESCRIPTION: 
    1231         If a connection is specified, this function completely unpins the  
    1232         persistent objects in that connection. Otherwise, all persistent  
    1233         objects in the heap are completely unpinned. All transient objects in  
    1234         the heap are also completely unpinned. See OCIObjectUnpin() for more  
    1235         information about unpinning. 
    1236    RETURNS: 
    1237         if environment handle or error handle is null, return  
    1238         OCI_INVALID_HANDLE. 
    1239         if operation suceeds, return OCI_SUCCESS.  
    1240         if operation fails, return OCI_ERROR.  
    1241  */ 
    1242  
    1243 extern (C) sword OCICacheFree (OCIEnv* env, OCIError* err, OCISvcCtx* svc);  
    1244 /* 
    1245    NAME: OCICacheFree - OCI FREe instances  
    1246    PARAMETERS: 
    1247         env (IN/OUT) - OCI environment handle initialized in object mode 
    1248         err (IN/OUT) - error handle. If there is an error, it is 
    1249                        recorded in 'err' and this function returns  
    1250                        OCI_ERROR.  The error recorded in 'err' can be  
    1251                        retrieved by calling OCIErrorGet(). 
    1252         svc     (IN) [optional] - OCI service context. If null pointer is 
    1253                        specified, then the objects in all connections 
    1254                        will be freed. 
    1255    REQUIRES: 
    1256         - a valid OCI environment handle must be given. 
    1257    DESCRIPTION: 
    1258         If a connection is specified, this function frees the persistent  
    1259         objects, transient objects and values allocated for that connection.   
    1260         Otherwise, all persistent objects, transient objects and values in the  
    1261         heap are freed. Objects are freed regardless of their pin count.  See  
    1262         OCIObjectFree() for more information about freeing an instance. 
    1263    RETURNS: 
    1264         if environment handle or error handle is null, return  
    1265         OCI_INVALID_HANDLE. 
    1266         if operation suceeds, return OCI_SUCCESS.  
    1267         if operation fails, return OCI_ERROR.  
    1268 */ 
    1269  
    1270 extern (C) sword OCICacheUnmark (OCIEnv* env, OCIError* err, OCISvcCtx* svc); 
    1271 /* 
    1272    NAME: OCICacheUnmark - OCI Unmark all dirty objects 
     1220   NAME: OCICacheUnpin - OCI UNPin objects 
    12731221   PARAMETERS: 
    12741222        env (IN/OUT) - OCI environment handle initialized in object mode 
     
    12791227        svc     (IN) [optional] - OCI service context. If null pointer is 
    12801228                       specified, then the objects in all connections 
    1281                        will be unmarked.  
    1282    REQUIRES: 
    1283         - a valid OCI environment handle must be given. 
    1284    DESCRIPTION: 
    1285         If a connection is specified, this function unmarks all dirty objects  
     1229                       will be unpinned. 
     1230   REQUIRES: 
     1231        - a valid OCI environment handle must be given. 
     1232   DESCRIPTION: 
     1233        If a connection is specified, this function completely unpins the 
     1234        persistent objects in that connection. Otherwise, all persistent 
     1235        objects in the heap are completely unpinned. All transient objects in 
     1236        the heap are also completely unpinned. See OCIObjectUnpin() for more 
     1237        information about unpinning. 
     1238   RETURNS: 
     1239        if environment handle or error handle is null, return 
     1240        OCI_INVALID_HANDLE. 
     1241        if operation suceeds, return OCI_SUCCESS. 
     1242        if operation fails, return OCI_ERROR. 
     1243 */ 
     1244 
     1245extern (C) sword OCICacheFree (OCIEnv* env, OCIError* err, OCISvcCtx* svc); 
     1246/* 
     1247   NAME: OCICacheFree - OCI FREe instances 
     1248   PARAMETERS: 
     1249        env (IN/OUT) - OCI environment handle initialized in object mode 
     1250        err (IN/OUT) - error handle. If there is an error, it is 
     1251                       recorded in 'err' and this function returns 
     1252                       OCI_ERROR.  The error recorded in 'err' can be 
     1253                       retrieved by calling OCIErrorGet(). 
     1254        svc     (IN) [optional] - OCI service context. If null pointer is 
     1255                       specified, then the objects in all connections 
     1256                       will be freed. 
     1257   REQUIRES: 
     1258        - a valid OCI environment handle must be given. 
     1259   DESCRIPTION: 
     1260        If a connection is specified, this function frees the persistent 
     1261        objects, transient objects and values allocated for that connection. 
     1262        Otherwise, all persistent objects, transient objects and values in the 
     1263        heap are freed. Objects are freed regardless of their pin count.  See 
     1264        OCIObjectFree() for more information about freeing an instance. 
     1265   RETURNS: 
     1266        if environment handle or error handle is null, return 
     1267        OCI_INVALID_HANDLE. 
     1268        if operation suceeds, return OCI_SUCCESS. 
     1269        if operation fails, return OCI_ERROR. 
     1270*/ 
     1271 
     1272extern (C) sword OCICacheUnmark (OCIEnv* env, OCIError* err, OCISvcCtx* svc); 
     1273/* 
     1274   NAME: OCICacheUnmark - OCI Unmark all dirty objects 
     1275   PARAMETERS: 
     1276        env (IN/OUT) - OCI environment handle initialized in object mode 
     1277        err (IN/OUT) - error handle. If there is an error, it is 
     1278                       recorded in 'err' and this function returns 
     1279                       OCI_ERROR.  The error recorded in 'err' can be 
     1280                       retrieved by calling OCIErrorGet(). 
     1281        svc     (IN) [optional] - OCI service context. If null pointer is 
     1282                       specified, then the objects in all connections 
     1283                       will be unmarked. 
     1284   REQUIRES: 
     1285        - a valid OCI environment handle must be given. 
     1286   DESCRIPTION: 
     1287        If a connection is specified, this function unmarks all dirty objects 
    12861288        in that connection.  Otherwise, all dirty objects in the cache are 
    12871289        unmarked. See OCIObjectUnmark() for more information about unmarking 
     
    13051307                        The error recorded in 'err' can be retrieved by calling 
    13061308                       OCIErrorGet(). 
    1307         svc  (IN/OUT) - OCI service handle.   
     1309        svc  (IN/OUT) - OCI service handle. 
    13081310        parent   (IN) - parent for the duration to be started. 
    1309         dur     (OUT) - newly created user duration  
     1311        dur     (OUT) - newly created user duration 
    13101312   REQUIRES: 
    13111313        - a valid OCI environment handle must be given for non-cartridge 
     
    13171319        active user durations simultaneously. The user durations do not have 
    13181320        to be nested. 
    1319   
     1321 
    13201322        The object subsystem predefines 3 durations : 
    13211323          1) session     - memory allocated with session duration comes from 
    1322                            the UGA heap (OCI_DURATION_SESSION). A session  
     1324                           the UGA heap (OCI_DURATION_SESSION). A session 
    13231325                           duration terminates at the end of the user session. 
    13241326          2) transaction - memory allocated with transaction duration comes 
     
    13291331                           heap (OCI_DURATION_CALL). A call duration terminates 
    13301332                           at the end of the user call. 
    1331   
     1333 
    13321334        Each user duration has a parent duration.  A parent duration can be a 
    13331335        predefined duration or another user duration.  The relationship between 
    13341336        a user duration and its parent duration (child duration) are: 
    1335   
     1337 
    13361338         1) An user duration is nested within the parent duration. When its 
    13371339             parent duration terminates, the user duration will also terminate. 
     
    13411343             duration will also come from the PGA heap. 
    13421344 
    1343         This function can be used as both part of cartridge services as well  
     1345        This function can be used as both part of cartridge services as well 
    13441346        as without cartridge services. 
    1345         The difference in the function in the case of cartridge and  
     1347        The difference in the function in the case of cartridge and 
    13461348        non-cartridge services is: 
    13471349                In case of cartridge services, as descibed above a new user 
     
    13491351                But when used for non-cartridge purposes, when a pre-defined 
    13501352        duration is passed in as parent, it is mapped to the cache duration 
    1351         for that connection (which is created if not already present) and  
     1353        for that connection (which is created if not already present) and 
    13521354        the new user duration will be child of the cache duration. 
    13531355 
    13541356   RETURNS: 
    1355         if environment handle and service handle is null or if error  
     1357        if environment handle and service handle is null or if error 
    13561358        handle is null return OCI_INVALID_HANDLE. 
    13571359        if operation suceeds, return OCI_SUCCESS. 
     
    13701372                        The error recorded in 'err' can be retrieved by calling 
    13711373                       OCIErrorGet(). 
    1372         svc  (IN/OUT) - OCI service handle.   
    1373         dur     (OUT) - a previously created user duration using  
     1374        svc  (IN/OUT) - OCI service handle. 
     1375        dur     (OUT) - a previously created user duration using 
    13741376                        OCIDurationBegin() 
    13751377   REQUIRES: 
     
    13821384        this duration is freed. 
    13831385 
    1384         This function can be used as both part of cartridge services as well  
     1386        This function can be used as both part of cartridge services as well 
    13851387        as without cartridge services.  In both cased, the heap duration 
    13861388        is freed and all the allocated memory for that duration is freed. 
    1387         The difference in the function in the case of cartridge and  
     1389        The difference in the function in the case of cartridge and 
    13881390        non-cartridge services is: 
    13891391                In case of non-cartridge services, if the duration is pre- 
     
    13951397 
    13961398                In case of cartridge services, only the heap duration is 
    1397         freed.  All the context entries allocated for that duration are  
     1399        freed.  All the context entries allocated for that duration are 
    13981400        freed from the context hash table.. 
    13991401 
    14001402   RETURNS: 
    1401         if environment handle and service handle is null or if error  
     1403        if environment handle and service handle is null or if error 
    14021404        handle is null return OCI_INVALID_HANDLE. 
    14031405        if operation suceeds, return OCI_SUCCESS. 
     
    14481450 * 
    14491451 */ 
    1450 deprecated extern (C) sword OCICacheFlushRefresh (OCIEnv* env, OCIError* err, OCISvcCtx* svc, dvoid* context, OCIRef* function(dvoid* context, ub1* last) get, OCIRef** ref); 
     1452deprecated extern (C) sword OCICacheFlushRefresh (OCIEnv* env, OCIError* err, OCISvcCtx* svc, dvoid* context, OCIRef* function(dvoid* context, ub1* last) get, OCIRef** reference); 
    14511453 
    14521454/** 
     
    14591461 */ 
    14601462deprecated extern (C) sword OCIObjectGetNewOID(OCIEnv* env, OCIError* err, OCISvcCtx* svc, ub1* oid); 
     1463 
     1464} 
  • trunk/bbconv/dbi/oracle/imp/orid.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.orid; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.oro, dbi.oracle.imp.oci, dbi.oracle.imp.ort; 
     16 
     17version (dbi_oracle) { 
     18 
     19private import dbi.oracle.imp.oci, dbi.oracle.imp.oratypes, dbi.oracle.imp.oro, dbi.oracle.imp.ort; 
     20 
    1821/** 
    1922 * Set an attribute of an object. 
     
    6265 */ 
    6366extern (C) sword OCIObjectGetAttr (OCIEnv* env, OCIError* err, dvoid* instance, dvoid* null_struct, OCIType* tdo, oratext** names, ub4* lengths, ub4 name_count,  ub4* indexes, ub4 index_count, OCIInd* attr_null_status, dvoid** attr_null_struct, dvoid** attr_value, OCIType** attr_tdo); 
     67 
     68} 
  • trunk/bbconv/dbi/oracle/imp/orl.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.orl; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.oro, dbi.oracle.imp.ort, dbi.oracle.imp.oci; 
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.oci, dbi.oracle.imp.oratypes, dbi.oracle.imp.oro, dbi.oracle.imp.ort; 
    1819 
    1920const uint OCI_NUMBER_SIZE      = 22;       /// The number of bytes in an OCINumber. 
     
    947948 * structure. The OCIString structure is opaque to the user. Functions are 
    948949 * provided to allow the user to manipulate a variable-length string. 
    949  *      
     950 * 
    950951 * A variable-length string can be declared as: 
    951952 * 
     
    10461047 * structure. The OCIRaw structure is opaque to the user. Functions are 
    10471048 * provided to allow the user to manipulate a variable-length raw. 
    1048  *      
     1049 * 
    10491050 * A variable-length raw can be declared as: 
    10501051 * 
     
    11451146 *  ref = A pointer to the OCI object reference to clear. 
    11461147 */ 
    1147 extern (C) void OCIRefClear (OCIEnv* env, OCIRef* ref); 
     1148extern (C) void OCIRefClear (OCIEnv* env, OCIRef* reference); 
    11481149 
    11491150/** 
     
    11861187 *  TRUE if it is null or false otherwise. 
    11871188 */ 
    1188 extern (C) boolean OCIRefIsNull (OCIEnv* env, OCIRef* ref); 
     1189extern (C) boolean OCIRefIsNull (OCIEnv* env, OCIRef* reference); 
    11891190 
    11901191/** 
     
    11981199 *  The size of ref. 
    11991200 */ 
    1200 extern (C) ub4 OCIRefHexSize (OCIEnv* env, OCIRef* ref); 
     1201extern (C) ub4 OCIRefHexSize (OCIEnv* env, OCIRef* reference); 
    12011202 
    12021203/** 
     
    12141215 *  OCI_SUCCESS on success, OCI_INVALID_HANDLE on invalid parameters, or OCI_ERROR on error. 
    12151216 */ 
    1216 extern (C) sword OCIRefFromHex (OCIEnv* env, OCIError* err, OCISvcCtx* svc, oratext* hex, ub4 length, OCIRef** ref); 
     1217extern (C) sword OCIRefFromHex (OCIEnv* env, OCIError* err, OCISvcCtx* svc, oratext* hex, ub4 length, OCIRef** reference); 
    12171218 
    12181219/** 
     
    12291230 *  OCI_SUCCESS on success, OCI_INVALID_HANDLE on invalid parameters, or OCI_ERROR on error. 
    12301231 */ 
    1231 extern (C) sword OCIRefToHex (OCIEnv* env, OCIError* err, OCIRef* ref, oratext* hex, ub4* hex_length); 
     1232extern (C) sword OCIRefToHex (OCIEnv* env, OCIError* err, OCIRef* reference, oratext* hex, ub4* hex_length); 
    12321233 
    12331234/** 
     
    14051406                The error recorded in 'err' can be retrieved by calling 
    14061407                OCIErrorGet(). 
    1407         coll (IN) - collection which will be scanned; the different  
     1408        coll (IN) - collection which will be scanned; the different 
    14081409                collection types are varray and nested table 
    14091410        itr (OUT) - address to the allocated collection iterator is 
     
    14131414        iterator is created in the object cache. The iterator is initialized 
    14141415        to point to the beginning of the collection. 
    1415    
    1416         If the next function (OCIIterNext) is called immediately  
    1417         after creating the iterator then the first element of the collection  
    1418         is returned.  
    1419         If the previous function (OCIIterPrev) is called immediately after  
    1420         creating the iterator then "at beginning of collection" error is  
     1416 
     1417        If the next function (OCIIterNext) is called immediately 
     1418        after creating the iterator then the first element of the collection 
     1419        is returned. 
     1420        If the previous function (OCIIterPrev) is called immediately after 
     1421        creating the iterator then "at beginning of collection" error is 
    14211422        returned. 
    14221423   RETURNS: 
     
    14401441                the 'itr' is set to NULL prior to returning 
    14411442   DESCRIPTION: 
    1442         Delete the iterator which was previously created by a call to  
     1443        Delete the iterator which was previously created by a call to 
    14431444        OCIIterCreate. 
    14441445   RETURNS: 
     
    14521453extern (C) sword OCIIterInit (OCIEnv* env, OCIError* err, OCIColl* coll, OCIIter* itr); 
    14531454/* 
    1454    NAME: OCIIterInit - OCIColl Initialize ITerator to scan the given  
     1455   NAME: OCIIterInit - OCIColl Initialize ITerator to scan the given 
    14551456                   collection 
    14561457   PARAMETERS: 
     
    14601461                The error recorded in 'err' can be retrieved by calling 
    14611462                OCIErrorGet(). 
    1462         coll (IN) - collection which will be scanned; the different  
     1463        coll (IN) - collection which will be scanned; the different 
    14631464                collection types are varray and nested table 
    14641465        itr (IN/OUT) - pointer to an allocated  collection iterator 
    14651466   DESCRIPTION: 
    1466         Initializes the given iterator to point to the beginning of the  
     1467        Initializes the given iterator to point to the beginning of the 
    14671468        given collection. This function can be used to: 
    1468    
    1469         a. reset an iterator to point back to the beginning of the collection  
     1469 
     1470        a. reset an iterator to point back to the beginning of the collection 
    14701471        b. reuse an allocated iterator to scan a different collection 
    14711472   RETURNS: 
     
    14881489        itr (IN) - iterator which points to the current element 
    14891490        elem (OUT) - address of the element pointed by the iterator is returned 
    1490         elemind (OUT) [optional] - address of the element's null indicator  
    1491                 information is returned; if (elemind == NULL) then the null  
     1491        elemind (OUT) [optional] - address of the element's null indicator 
     1492                information is returned; if (elemind == NULL) then the null 
    14921493                indicator information will NOT be returned 
    14931494   DESCRIPTION: 
     
    15131514        elem (OUT) - after updating the iterator to point to the next element, 
    15141515                address of the element is returned 
    1515         elemind (OUT) [optional] - address of the element's null indicator  
    1516                 information is returned; if (elemind == NULL) then the null  
     1516        elemind (OUT) [optional] - address of the element's null indicator 
     1517                information is returned; if (elemind == NULL) then the null 
    15171518                indicator information will NOT be returned 
    15181519        eoc (OUT) - TRUE if iterator is at End Of Collection (i.e. next 
     
    15211522        Returns pointer to the next element and its corresponding null 
    15221523        information. The iterator is updated to point to the next element. 
    1523    
     1524 
    15241525        If the iterator is pointing to the last element of the collection 
    1525         prior to executing this function, then calling this function will  
     1526        prior to executing this function, then calling this function will 
    15261527        set eoc flag to TRUE. The iterator will be left unchanged in this 
    15271528        situation. 
     
    15421543                The error recorded in 'err' can be retrieved by calling 
    15431544                OCIErrorGet(). 
    1544         itr (IN/OUT) - iterator is updated to point to the previous  
     1545        itr (IN/OUT) - iterator is updated to point to the previous 
    15451546                element 
    1546         elem (OUT) - after updating the iterator to point to the previous  
     1547        elem (OUT) - after updating the iterator to point to the previous 
    15471548                element, address of the element is returned 
    1548         elemind (OUT) [optional] - address of the element's null indicator  
    1549                 information is returned; if (elemind == NULL) then the null  
     1549        elemind (OUT) [optional] - address of the element's null indicator 
     1550                information is returned; if (elemind == NULL) then the null 
    15501551                indicator information will NOT be returned 
    15511552        boc (OUT) - TRUE if iterator is at Beginning Of Collection (i.e. 
     
    15541555        Returns pointer to the previous element and its corresponding null 
    15551556        information. The iterator is updated to point to the previous element. 
    1556    
     1557 
    15571558        If the iterator is pointing to the first element of the collection 
    1558         prior to executing this function, then calling this function will  
    1559         set 'boc' to TRUE. The iterator will be left unchanged in this  
     1559        prior to executing this function, then calling this function will 
     1560        set 'boc' to TRUE. The iterator will be left unchanged in this 
    15601561        situation. 
    15611562   RETURNS: 
     
    15681569extern (C) sword OCITableSize (OCIEnv* env, OCIError* err, OCITable* tbl, sb4* size); 
    15691570/* 
    1570    NAME: OCITableSize - OCITable return current SIZe of the given  
     1571   NAME: OCITableSize - OCITable return current SIZe of the given 
    15711572                   nested table (not including deleted elements) 
    15721573   PARAMETERS: 
     
    15801581                does not include deleted elements. 
    15811582   DESCRIPTION: 
    1582         Returns the count of elements in the given nested table.  
    1583  
    1584         The count returned by OCITableSize() will be decremented upon  
    1585         deleting elements from the nested table. So, this count DOES NOT  
    1586         includes any "holes" created by deleting elements.  
     1583        Returns the count of elements in the given nested table. 
     1584 
     1585        The count returned by OCITableSize() will be decremented upon 
     1586        deleting elements from the nested table. So, this count DOES NOT 
     1587        includes any "holes" created by deleting elements. 
    15871588        For example: 
    15881589 
    1589             OCITableSize(...);  
     1590            OCITableSize(...); 
    15901591            // assume 'size' returned is equal to 5 
    15911592            OCITableDelete(...); // delete one element 
     
    15931594            // 'size' returned will be equal to 4 
    15941595 
    1595         To get the count plus the count of deleted elements use  
     1596        To get the count plus the count of deleted elements use 
    15961597        OCICollSize(). Continuing the above example, 
    15971598 
     
    16651666                OCIErrorGet(). 
    16661667        tbl (IN) - table which is scanned 
    1667         index (OUT) - first index of the element which exists in the given  
     1668        index (OUT) - first index of the element which exists in the given 
    16681669                table is returned 
    16691670   DESCRIPTION: 
    1670         Return the first index of the element which exists in the given  
    1671         table.  
     1671        Return the first index of the element which exists in the given 
     1672        table. 
    16721673   RETURNS: 
    16731674        OCI_SUCCESS if the function completes successfully. 
     
    16871688                OCIErrorGet(). 
    16881689        tbl (IN) - table which is scanned 
    1689         index (OUT) - last index of the element which exists in the given  
     1690        index (OUT) - last index of the element which exists in the given 
    16901691                table is returned 
    16911692   DESCRIPTION: 
    1692         Return the last index of the element which exists in the given  
    1693         table.  
     1693        Return the last index of the element which exists in the given 
     1694        table. 
    16941695   RETURNS: 
    16951696        OCI_SUCCESS if the function completes successfully. 
     
    17111712                which exists is returned 
    17121713        tbl (IN) - table which is scanned 
    1713         next_index (OUT) - index of the next element which exists  
     1714        next_index (OUT) - index of the next element which exists 
    17141715                is returned 
    17151716        exists (OUT) - FALSE if no next index available else TRUE 
    17161717   DESCRIPTION: 
    1717         Return the smallest position j, greater than 'index', such that  
     1718        Return the smallest position j, greater than 'index', such that 
    17181719        exists(j) is TRUE. 
    17191720   RETURNS: 
     
    17361737                which exists is returned 
    17371738        tbl (IN) - table which is scanned 
    1738         prev_index (OUT) - index of the previous element which exists  
     1739        prev_index (OUT) - index of the previous element which exists 
    17391740                is returned 
    17401741        exists (OUT) - FALSE if no next index available else TRUE 
    17411742   DESCRIPTION: 
    1742         Return the largest position j, less than 'index', such that  
     1743        Return the largest position j, less than 'index', such that 
    17431744        exists(j) is TRUE. 
    17441745   RETURNS: 
     
    17521753    return cast(lnxnum_t*)num; 
    17531754} 
    1754 /*  
     1755/* 
    17551756   NAME:   OCINumberToLnx 
    17561757   PARAMETERS: 
    17571758           num (IN) - OCINumber to convert ; 
    1758    DESCRIPTION:  
    1759            Converts OCINumber to its internal lnx format  
     1759   DESCRIPTION: 
     1760           Converts OCINumber to its internal lnx format 
    17601761           This is not to be used in Public interfaces , but 
    1761            has been provided due to special requirements from  
    1762            SQLPLUS development group as they require to call  
    1763            Core funtions directly .  
     1762           has been provided due to special requirements from 
     1763           SQLPLUS development group as they require to call 
     1764           Core funtions directly . 
    17641765*/ 
    17651766+/ 
     
    17751776struct OCIDOMDocument { 
    17761777} 
     1778 
     1779} 
  • trunk/bbconv/dbi/oracle/imp/oro.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.oro; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.ocidfn; 
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.ocidfn, dbi.oracle.imp.oratypes; 
    1819 
    1920/** 
     
    6061 *   If the object copy is not loaded, load it from the persistent store. 
    6162 *   Otherwise, the loaded object copy is returned to the program. 
    62  *  
     63 * 
    6364 * OCI_PIN_RECENT pins the latest copy of an object.  The object is 
    6465 * pinned using the following criteria: 
     
    162163 * This option is used to specify the set of objects to be refreshed. 
    163164 * 
    164  * OCI_REFRESH_LOAD refreshes the objects that are loaded in the current   
     165 * OCI_REFRESH_LOAD refreshes the objects that are loaded in the current 
    165166 * transaction. 
    166167 */ 
     
    799800 
    800801deprecated alias OCIRefreshOpt OCICoherency;        /// Deprecated: Only used for beta2. 
    801 deprecated OCIRefreshOpt OCI_COHERENCY  = 2;        /// Deprecated: Only used for beta2. 
    802 deprecated OCIRefreshOpt OCI_COHERENCY_NULL = 4;    /// Deprecated: Only used for beta2. 
    803 deprecated OCIRefreshOpt OCI_COHERENCY_ALWAYS = 5;  /// Deprecated: Only used for beta2. 
     802deprecated OCIRefreshOpt OCI_COHERENCY  = cast(OCIRefreshOpt)2; /// Deprecated: Only used for beta2. 
     803deprecated OCIRefreshOpt OCI_COHERENCY_NULL = cast(OCIRefreshOpt)4; /// Deprecated: Only used for beta2. 
     804deprecated OCIRefreshOpt OCI_COHERENCY_ALWAYS = cast(OCIRefreshOpt)5; /// Deprecated: Only used for beta2. 
     805 
     806
  • trunk/bbconv/dbi/oracle/imp/ort.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.oracle.imp.ort; 
    1615 
    17 private import dbi.oracle.imp.oratypes, dbi.oracle.imp.oro, dbi.oracle.imp.oci; 
     16version (dbi_oracle) { 
     17 
     18private import dbi.oracle.imp.oci, dbi.oracle.imp.oratypes, dbi.oracle.imp.oro; 
    1819 
    1920/** 
     
    263264        the name of the type 
    264265   NOTES: 
    265         The type descriptor, 'tdo', must be unpinned when the accessed  
     266        The type descriptor, 'tdo', must be unpinned when the accessed 
    266267        information is no longer needed. 
    267268 */ 
     
    283284   REQUIRES: 
    284285        1) All type accessors require that the type be pinned before calling 
    285            any accessor.  
     286           any accessor. 
    286287        2) All input parameters must not be NULL and must be valid. 
    287288        3) 'n_length' must point to an allocated ub4. 
     
    291292        the schema name of the type 
    292293   NOTES: 
    293         The type descriptor, 'tdo', must be unpinned when the accessed  
     294        The type descriptor, 'tdo', must be unpinned when the accessed 
    294295        information is no longer needed. 
    295296 */ 
     
    299300/* 
    300301   NAME: OCITypeTypeCode - OCI Get a Type's Type Code. 
    301    PARAMETERS:  
     302   PARAMETERS: 
    302303        env (IN/OUT) - OCI environment handle initialized in object mode 
    303304        err (IN/OUT) - error handle. If there is an error, it is 
     
    307308        tdo (IN) - pointer to to the type descriptor in the object cache 
    308309   REQUIRES: 
    309         1) All type accessors require that the type be pinned before calling  
    310            any accessor.  
     310        1) All type accessors require that the type be pinned before calling 
     311           any accessor. 
    311312        2) All input parameters must not be NULL and must be valid. 
    312313   DESCRIPTION: 
     
    315316        The type code of the type. 
    316317   NOTES: 
    317         The type descriptor, 'tdo', must be unpinned when the accessed  
     318        The type descriptor, 'tdo', must be unpinned when the accessed 
    318319        information is no longer needed. 
    319320 */ 
     
    323324/* 
    324325   NAME: OCITypeCollTypeCode - OCI Get a Domain Type's Type Code. 
    325    PARAMETERS:  
     326   PARAMETERS: 
    326327        env (IN/OUT) - OCI environment handle initialized in object mode 
    327328        err (IN/OUT) - error handle. If there is an error, it is 
     
    331332        tdo (IN) - pointer to to the type descriptor in the object cache 
    332333   REQUIRES: 
    333         1) All type accessors require that the type be pinned before calling  
    334            any accessor.  
     334        1) All type accessors require that the type be pinned before calling 
     335           any accessor. 
    335336        2) All input parameters must not be NULL and must be valid. 
    336337        3) 'tdo' MUST point to a named collection type. 
     
    342343        OCI_TYPECODE_TABLE for nested tables. 
    343344   NOTES: 
    344         The type descriptor, 'tdo', should be unpinned when the accessed  
     345        The type descriptor, 'tdo', should be unpinned when the accessed 
    345346        information is no longer needed. 
    346347 */ 
     
    349350deprecated extern (C) oratext* OCITypeVersion (OCIEnv* env, OCIError* err, OCIType* tdo, ub4* v_length); 
    350351/* 
    351    NAME: OCITypeVersion - OCI Get a Type's user-readable VersioN.  
    352    PARAMETERS:  
     352   NAME: OCITypeVersion - OCI Get a Type's user-readable VersioN. 
     353   PARAMETERS: 
    353354        env (IN/OUT) - OCI environment handle initialized in object mode 
    354355        err (IN/OUT) - error handle. If there is an error, it is 
     
    357358                OCIErrorGet(). 
    358359        tdo (IN) - pointer to to the type descriptor in the object cache 
    359         v_length (OUT) - length (in bytes) of the returned user-readable  
    360                version.  The caller must allocate space for the ub4 before  
     360        v_length (OUT) - length (in bytes) of the returned user-readable 
     361               version.  The caller must allocate space for the ub4 before 
    361362               calling this routine. 
    362363   REQUIRES: 
    363         1) All type accessors require that the type be pinned before calling  
    364            any accessor.  
     364        1) All type accessors require that the type be pinned before calling 
     365           any accessor. 
    365366        2) All input parameters must not be NULL and must be valid. 
    366367        3) 'v_length' must point to an allocated ub4. 
     
    370371        The user-readable version of the type 
    371372   NOTES: 
    372         The type descriptor, 'tdo', must be unpinned when the accessed  
     373        The type descriptor, 'tdo', must be unpinned when the accessed 
    373374        information is no longer needed. 
    374375 */ 
     
    377378deprecated extern (C) ub4 OCITypeAttrs (OCIEnv* env, OCIError* err, OCIType* tdo); 
    378379/* 
    379    NAME: OCITypeAttrs - OCI Get a Type's Number of Attributes.  
    380    PARAMETERS:  
     380   NAME: OCITypeAttrs - OCI Get a Type's Number of Attributes. 
     381   PARAMETERS: 
    381382        env (IN/OUT) - OCI environment handle initialized in object mode 
    382383        err (IN/OUT) - error handle. If there is an error, it is 
     
    386387        tdo (IN) - pointer to to the type descriptor in the object cache 
    387388   REQUIRES: 
    388         1) All type accessors require that the type be pinned before calling  
    389            any accessor.  
     389        1) All type accessors require that the type be pinned before calling 
     390           any accessor. 
    390391        2) All input parameters must not be NULL and must be valid. 
    391392   DESCRIPTION: 
     
    394395        The number of attributes in the type. 0 for ALL non-ADTs. 
    395396   NOTES: 
    396         The type descriptor, 'tdo', must be unpinned when the accessed  
     397        The type descriptor, 'tdo', must be unpinned when the accessed 
    397398        information is no longer needed. 
    398399 */ 
     
    401402deprecated extern (C) ub4 OCITypeMethods (OCIEnv* env, OCIError* err, OCIType* tdo); 
    402403/* 
    403    NAME: OCITypeMethods - OCI Get a Type's Number of Methods.  
    404    PARAMETERS:  
     404   NAME: OCITypeMethods - OCI Get a Type's Number of Methods. 
     405   PARAMETERS: 
    405406        env (IN/OUT) - OCI environment handle initialized in object mode 
    406407        err (IN/OUT) - error handle. If there is an error, it is 
     
    410411        tdo (IN) - pointer to to the type descriptor in the object cache 
    411412   REQUIRES: 
    412         1) All type accessors require that the type be pinned before calling  
    413            any accessor.  
     413        1) All type accessors require that the type be pinned before calling 
     414           any accessor. 
    414415        2) All input parameters must not be NULL and must be valid. 
    415416   DESCRIPTION: 
     
    418419        The number of methods in the type 
    419420   NOTES: 
    420         The type descriptor, 'tdo', must be unpinned when the accessed  
     421        The type descriptor, 'tdo', must be unpinned when the accessed 
    421422        information is no longer needed. 
    422423 */ 
     
    425426deprecated extern (C) oratext* OCITypeElemName (OCIEnv* env, OCIError* err, OCITypeElem* elem, ub4 n_length); 
    426427/* 
    427    NAME: OCITypeElemName - OCI Get an Attribute's NaMe.  
    428    PARAMETERS:  
     428   NAME: OCITypeElemName - OCI Get an Attribute's NaMe. 
     429   PARAMETERS: 
    429430        env (IN/OUT) - OCI environment handle initialized in object mode 
    430431        err (IN/OUT) - error handle. If there is an error, it is 
     
    433434                OCIErrorGet(). 
    434435        elem (IN) - pointer to the type element descriptor in the object cache 
    435         n_length (OUT) - length (in bytes) of the returned attribute name.   
    436                The caller must allocate space for the ub4 before calling this  
     436        n_length (OUT) - length (in bytes) of the returned attribute name. 
     437               The caller must allocate space for the ub4 before calling this 
    437438               routine. 
    438439   REQUIRES: 
    439         1) All type accessors require that the type be pinned before calling  
    440            any accessor.  
     440        1) All type accessors require that the type be pinned before calling 
     441           any accessor. 
    441442        2) All input parameters must not be NULL and must be valid. 
    442443        3) 'n_length' must point to an allocated ub4. 
     
    446447        the name of the attribute and the length in n_length 
    447448   NOTES: 
    448         The type must be unpinned when the accessed information is no  
     449        The type must be unpinned when the accessed information is no 
    449450        longer needed. 
    450451 */ 
     
    453454deprecated extern (C) OCITypeCode OCITypeElemTypeCode (OCIEnv* env, OCIError* err, OCITypeElem* elem); 
    454455/* 
    455    NAME: OCITypeElemTypeCode - OCI Get an Attribute's TypeCode.  
    456    PARAMETERS:  
     456   NAME: OCITypeElemTypeCode - OCI Get an Attribute's TypeCode. 
     457   PARAMETERS: 
    457458        env (IN/OUT) - OCI environment handle initialized in object mode 
    458459        err (IN/OUT) - error handle. If there is an error, it is 
     
    462463        elem (IN) - pointer to the type element descriptor in the object cache 
    463464   REQUIRES: 
    464         1) All type accessors require that the type be pinned before calling  
    465            any accessor.  
     465        1) All type accessors require that the type be pinned before calling 
     466           any accessor. 
    466467        2) All input parameters must not be NULL and must be valid. 
    467468   DESCRIPTION: 
    468469        Get the typecode of an attribute's type. 
    469470   RETURNS: 
    470         the typecode of the attribute's type.  If this is a scalar type, the  
    471         typecode sufficiently describes the scalar type and no further calls  
     471        the typecode of the attribute's type.  If this is a scalar type, the 
     472        typecode sufficiently describes the scalar type and no further calls 
    472473        need to be made.  Valid scalar types include: OCI_TYPECODE_SIGNED8, 
    473474        OCI_TYPECODE_UNSIGNED8, OCI_TYPECODE_SIGNED16, OCI_TYPECODE_UNSIGNED16, 
     
    478479        typecode. 
    479480   NOTES: 
    480        The type must be unpinned when the accessed information is no  
     481       The type must be unpinned when the accessed information is no 
    481482       longer needed. 
    482483 */ 
     
    506507  RETURNS 
    507508     OCI_SUCCESS if the function completes successfully. 
    508      OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     509     OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    509510     OCI_ERROR if 
    510511         1) any of the parameters is null. 
     
    520521   NAME: OCITypeElemFlags - OCI Get a Elem's FLags 
    521522                              (inline, constant, virtual, constructor, 
    522                               destructor).  
    523    PARAMETERS:  
     523                              destructor). 
     524   PARAMETERS: 
    524525        env (IN/OUT) - OCI environment handle initialized in object mode 
    525526        err (IN/OUT) - error handle. If there is an error, it is 
     
    529530        elem (IN) - pointer to the type element descriptor in the object cache 
    530531   REQUIRES: 
    531         1) All type accessors require that the type be pinned before calling  
    532            any accessor.  
     532        1) All type accessors require that the type be pinned before calling 
     533           any accessor. 
    533534        2) All input parameters must not be NULL and must be valid. 
    534535   DESCRIPTION: 
     
    548549   NAME: OCITypeElemNumPrec - Get a Number's Precision.  This includes float, 
    549550                              decimal, real, double, and oracle number. 
    550    PARAMETERS:  
     551   PARAMETERS: 
    551552        env (IN/OUT) - OCI environment handle initialized in object mode 
    552553        err (IN/OUT) - error handle. If there is an error, it is 
     
    558559        All input parameters must not be NULL and must be valid. 
    559560   DESCRIPTION: 
    560         Get the precision of a float, decimal, long, unsigned long, real,  
    561         double, or Oracle number type.  
     561        Get the precision of a float, decimal, long, unsigned long, real, 
     562        double, or Oracle number type. 
    562563   RETURNS: 
    563564        the precision of the float, decimal, long, unsigned long, real, double, 
    564         or Oracle number  
     565        or Oracle number 
    565566 */ 
    566567 
     
    568569deprecated extern (C) sb1 OCITypeElemNumScale (OCIEnv* env, OCIError* err, OCITypeElem* elem); 
    569570/* 
    570    NAME: OCITypeElemNumScale - Get a decimal or oracle Number's Scale  
    571    PARAMETERS:  
     571   NAME: OCITypeElemNumScale - Get a decimal or oracle Number's Scale 
     572   PARAMETERS: 
    572573        env (IN/OUT) - OCI environment handle initialized in object mode 
    573574        err (IN/OUT) - error handle. If there is an error, it is 
     
    579580        All input parameters must not be NULL and must be valid. 
    580581   DESCRIPTION: 
    581         Get the scale of a decimal, or Oracle number type.  
    582    RETURNS: 
    583         the scale of the decimal, or Oracle number  
     582        Get the scale of a decimal, or Oracle number type. 
     583   RETURNS: 
     584        the scale of the decimal, or Oracle number 
    584585 */ 
    585586 
     
    589590   NAME: OCITypeElemLength - Get a raw, fixed or variable length String's 
    590591                             length in bytes. 
    591    PARAMETERS:  
     592   PARAMETERS: 
    592593        env (IN/OUT) - OCI environment handle initialized in object mode 
    593594        err (IN/OUT) - error handle. If there is an error, it is 
     
    599600        All input parameters must not be NULL and must be valid. 
    600601   DESCRIPTION: 
    601         Get the length of a raw, fixed or variable length string type.  
     602        Get the length of a raw, fixed or variable length string type. 
    602603   RETURNS: 
    603604        length of the raw, fixed or variable length string 
     
    609610   NAME: OCITypeElemCharSetID - Get a fixed or variable length String's 
    610611                                character set ID 
    611    PARAMETERS:  
     612   PARAMETERS: 
    612613        env (IN/OUT) - OCI environment handle initialized in object mode 
    613614        err (IN/OUT) - error handle. If there is an error, it is 
     
    619620        All input parameters must not be NULL and must be valid. 
    620621   DESCRIPTION: 
    621         Get the character set ID of a fixed or variable length string type.  
     622        Get the character set ID of a fixed or variable length string type. 
    622623   RETURNS: 
    623624        character set ID of the fixed or variable length string 
     
    629630   NAME: OCITypeElemCharSetForm - Get a fixed or variable length String's 
    630631                                  character set specification form. 
    631    PARAMETERS:  
     632   PARAMETERS: 
    632633        env (IN/OUT) - OCI environment handle initialized in object mode 
    633634        err (IN/OUT) - error handle. If there is an error, it is 
     
    653654deprecated extern (C) sword OCITypeElemParameterizedType (OCIEnv* env, OCIError* err, OCITypeElem* elem, OCIType** type_stored); 
    654655/* 
    655    NAME: OCITypeElemParameterizedType  
    656    PARAMETERS:  
     656   NAME: OCITypeElemParameterizedType 
     657   PARAMETERS: 
    657658        env (IN/OUT) - OCI environment handle initialized in object mode 
    658659        err (IN/OUT) - error handle. If there is an error, it is 
     
    661662                OCIErrorGet(). 
    662663        elem (IN) - pointer to the type element descriptor in the object cache 
    663         type_stored (OUT) - If the function completes successfully,  
     664        type_stored (OUT) - If the function completes successfully, 
    664665               and the parameterized type is complex, 'type_stored' is NULL. 
    665                Otherwise, 'type_stored' points to the type descriptor (in the  
    666                object cache) of the type that is stored in the parameterized  
    667                type.  The caller must allocate space for the OCIType*  
     666               Otherwise, 'type_stored' points to the type descriptor (in the 
     667               object cache) of the type that is stored in the parameterized 
     668               type.  The caller must allocate space for the OCIType* 
    668669               before calling this routine and must not write into the space. 
    669670   REQUIRES: 
     
    679680   RETURNS: 
    680681        OCI_SUCCESS if the function completes successfully. 
    681         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     682        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    682683        OCI_ERROR if 
    683684            1) any of the parameters is null. 
    684685            2) 'type_stored' is not NULL but points to NULL data. 
    685686   NOTES: 
    686         Complex parameterized types will be in a future release (once  
    687         typedefs are supported.  When setting the parameterized type  
     687        Complex parameterized types will be in a future release (once 
     688        typedefs are supported.  When setting the parameterized type 
    688689        information, the user must typedef the contents if it's a 
    689690        complex parameterized type.  Ex. for varray<varray<car>>, use 
    690         'typedef varray<car> varcar' and then use varray<varcar>.  
     691        'typedef varray<car> varcar' and then use varray<varcar>. 
    691692 */ 
    692693 
     
    720721deprecated extern (C) sword OCITypeAttrByName (OCIEnv* env, OCIError* err, OCIType* tdo, oratext* name, ub4 n_length, OCITypeElem** elem); 
    721722/* 
    722    NAME: OCITypeAttrByName - OCI Get an Attribute By Name.  
    723    PARAMETERS:  
     723   NAME: OCITypeAttrByName - OCI Get an Attribute By Name. 
     724   PARAMETERS: 
    724725        env (IN/OUT) - OCI environment handle initialized in object mode 
    725726        err (IN/OUT) - error handle. If there is an error, it is 
     
    728729                OCIErrorGet(). 
    729730        tdo (IN) - pointer to to the type descriptor in the object cache 
    730         name (IN) - the attribute's name  
     731        name (IN) - the attribute's name 
    731732        n_length (IN) - length (in bytes) of the 'name' parameter 
    732         elem (OUT) - If this function completes successfully, 'elem' points to  
     733        elem (OUT) - If this function completes successfully, 'elem' points to 
    733734               the selected type element descriptor pertaining to the 
    734735               attributein the object cache. 
    735736   REQUIRES: 
    736         1) All type accessors require that the type be pinned before calling  
    737            any accessor.  
    738         2) if 'tdo' is not null, it must point to a valid type descriptor  
     737        1) All type accessors require that the type be pinned before calling 
     738           any accessor. 
     739        2) if 'tdo' is not null, it must point to a valid type descriptor 
    739740           in the object cache. 
    740741   DESCRIPTION: 
    741         Get an attribute given its name.   
    742    RETURNS: 
    743         OCI_SUCCESS if the function completes successfully. 
    744         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     742        Get an attribute given its name. 
     743   RETURNS: 
     744        OCI_SUCCESS if the function completes successfully. 
     745        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    745746        OCI_ERROR if 
    746747            1) any of the required parameters is null. 
    747             2) the type does not contain an attribute with the input 'name'.  
     748            2) the type does not contain an attribute with the input 'name'. 
    748749            3) 'name' is NULL. 
    749750   NOTES: 
    750         The type descriptor, 'tdo', must be unpinned when the accessed  
     751        The type descriptor, 'tdo', must be unpinned when the accessed 
    751752        information is no longer needed. 
    752753        Schema and type names are CASE-SENSITIVE. If they have been created 
     
    758759/* 
    759760   NAME: OCITypeAttrNext - OCI Get an Attribute By Iteration. 
    760    PARAMETERS:  
     761   PARAMETERS: 
    761762        env (IN/OUT) - OCI environment handle initialized in object mode 
    762763        err (IN/OUT) - error handle. If there is an error, it is 
     
    766767        iterator_ort (IN/OUT) - iterator for retrieving the next attribute; 
    767768               see OCITypeIterNew() to initialize iterator. 
    768         elem (OUT) - If this function completes successfully, 'elem' points to  
     769        elem (OUT) - If this function completes successfully, 'elem' points to 
    769770               the selected type element descriptor pertaining to the 
    770771               attributein the object cache. 
    771772   REQUIRES: 
    772         1) All type accessors require that the type be pinned before calling  
    773             any accessor.  
    774         2) if 'tdo' is not null, it must point to a valid type descriptor  
     773        1) All type accessors require that the type be pinned before calling 
     774            any accessor. 
     775        2) if 'tdo' is not null, it must point to a valid type descriptor 
    775776           in the object cache. 
    776777   DESCRIPTION: 
     
    780781        OCI_NO_DATA if there are no more attributes to iterate on; use 
    781782            OCITypeIterSet() to reset the iterator if necessary. 
    782         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     783        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    783784        OCI_ERROR if 
    784785            1) any of the required parameters is null. 
    785786   NOTES: 
    786         The type must be unpinned when the accessed information is no  
     787        The type must be unpinned when the accessed information is no 
    787788        longer needed. 
    788789 */ 
     
    792793/* 
    793794   NAME: OCITypeCollElem 
    794    PARAMETERS:  
     795   PARAMETERS: 
    795796        env (IN/OUT) - OCI environment handle initialized in object mode 
    796797        err (IN/OUT) - error handle. If there is an error, it is 
     
    818819   RETURNS: 
    819820        OCI_SUCCESS if the function completes successfully. 
    820         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     821        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    821822        OCI_ERROR if 
    822823            1) any of the parameters is null. 
    823824            2) the type TDO does not point to a valid collection's type. 
    824825   NOTES: 
    825         Complex parameterized types will be in a future release (once  
    826         typedefs are supported.  When setting the parameterized type  
     826        Complex parameterized types will be in a future release (once 
     827        typedefs are supported.  When setting the parameterized type 
    827828        information, the user must typedef the contents if it's a 
    828829        complex parameterized type.  Ex. for varray<varray<car>>, use 
    829         'typedef varray<car> varcar' and then use varray<varcar>.  
     830        'typedef varray<car> varcar' and then use varray<varcar>. 
    830831 */ 
    831832 
     
    834835/* 
    835836   NAME: OCITypeCollSize - OCI Get a Collection's Number of Elements. 
    836    PARAMETERS:  
     837   PARAMETERS: 
    837838        env (IN/OUT) - OCI environment handle initialized in object mode 
    838839        err (IN/OUT) - error handle. If there is an error, it is 
     
    846847        defined as a domain. 
    847848   DESCRIPTION: 
    848         Get the number of elements stored in a fixed array or the maximum  
     849        Get the number of elements stored in a fixed array or the maximum 
    849850        number of elements in a variable array. 
    850    RETURNS: 
    851         OCI_SUCCESS if the function completes successfully. 
    852         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
    853         OCI_ERROR if 
    854             1) any of the parameters is null. 
    855             2) 'tdo' does not point to a domain with a collection type. 
    856    NOTES: 
    857         Complex parameterized types will be in a future release (once  
    858         typedefs are supported.  When setting the parameterized type  
    859         information, the user must typedef the contents if it's a 
    860         complex parameterized type.  Ex. for varray<varray<car>>, use 
    861         'typedef varray<car> varcar' and then use varray<varcar>.  
    862  */ 
    863  
    864  
    865 extern (C) sword OCITypeCollExtTypeCode (OCIEnv* env, OCIError* err, OCIType* tdo, OCITypeCode* sqt_code); 
    866 /* 
    867    NAME: ortcsqt - OCI Get a Collection element's DTY constant. 
    868    PARAMETERS: 
    869         env (IN/OUT) - OCI environment handle initialized in object mode 
    870         err (IN/OUT) - error handle. If there is an error, it is 
    871                 recorded in 'err' and this function returns OCI_ERROR. 
    872                 The error recorded in 'err' can be retrieved by calling 
    873                 OCIErrorGet(). 
    874         tdo (IN) - pointer to the type descriptor in the object cache 
    875         sqt_code (OUT) - SQLT code of type element. 
    876    REQUIRES: 
    877         1) All type accessors require that the type be pinned before calling 
    878            any accessor. 
    879         2) All input parameters must not be NULL and must be valid. 
    880    DESCRIPTION: 
    881         Get the SQLT constant associated with an domain's element type. 
    882         The SQLT codes are defined in <sqldef.h> and are needed for OCI/OOCI 
    883         use. 
    884851   RETURNS: 
    885852        OCI_SUCCESS if the function completes successfully. 
     
    889856            2) 'tdo' does not point to a domain with a collection type. 
    890857   NOTES: 
     858        Complex parameterized types will be in a future release (once 
     859        typedefs are supported.  When setting the parameterized type 
     860        information, the user must typedef the contents if it's a 
     861        complex parameterized type.  Ex. for varray<varray<car>>, use 
     862        'typedef varray<car> varcar' and then use varray<varcar>. 
     863 */ 
     864 
     865 
     866extern (C) sword OCITypeCollExtTypeCode (OCIEnv* env, OCIError* err, OCIType* tdo, OCITypeCode* sqt_code); 
     867/* 
     868   NAME: ortcsqt - OCI Get a Collection element's DTY constant. 
     869   PARAMETERS: 
     870        env (IN/OUT) - OCI environment handle initialized in object mode 
     871        err (IN/OUT) - error handle. If there is an error, it is 
     872                recorded in 'err' and this function returns OCI_ERROR. 
     873                The error recorded in 'err' can be retrieved by calling 
     874                OCIErrorGet(). 
     875        tdo (IN) - pointer to the type descriptor in the object cache 
     876        sqt_code (OUT) - SQLT code of type element. 
     877   REQUIRES: 
     878        1) All type accessors require that the type be pinned before calling 
     879           any accessor. 
     880        2) All input parameters must not be NULL and must be valid. 
     881   DESCRIPTION: 
     882        Get the SQLT constant associated with an domain's element type. 
     883        The SQLT codes are defined in <sqldef.h> and are needed for OCI/OOCI 
     884        use. 
     885   RETURNS: 
     886        OCI_SUCCESS if the function completes successfully. 
     887        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
     888        OCI_ERROR if 
     889            1) any of the parameters is null. 
     890            2) 'tdo' does not point to a domain with a collection type. 
     891   NOTES: 
    891892        The type must be unpinned when the accessed information is no 
    892893        longer needed. 
    893894 */ 
    894   
     895 
    895896 
    896897deprecated extern (C) ub4 OCITypeMethodOverload (OCIEnv* env, OCIError* err, OCIType* tdo, oratext method_name, ub4 m_length); 
     
    926927deprecated extern (C) sword OCITypeMethodByName (OCIEnv* env, OCIError* err, OCIType* tdo, oratext* method_name, ub4 m_length, OCITypeMethod** mdos); 
    927928/* 
    928    NAME: OCITypeMethodByName - OCI Get one or more Methods with Name.  
    929    PARAMETERS:  
     929   NAME: OCITypeMethodByName - OCI Get one or more Methods with Name. 
     930   PARAMETERS: 
    930931        env (IN/OUT) - OCI environment handle initialized in object mode 
    931932        err (IN/OUT) - error handle. If there is an error, it is 
     
    934935                OCIErrorGet(). 
    935936        tdo (IN) - pointer to to the type descriptor in the object cache 
    936         method_name (IN) - the methods' name   
     937        method_name (IN) - the methods' name 
    937938        m_length (IN) - length (in bytes) of the 'name' parameter 
    938939        mdos (OUT) - If this function completes successfully, 'mdos' points to 
     
    943944                be obtained by calling 'OCITypeMethodOverload()'. 
    944945   REQUIRES: 
    945         1) All type accessors require that the type be pinned before calling  
    946            any accessor.  
    947         2) if 'tdo' is not null, it must point to a valid type descriptor  
     946        1) All type accessors require that the type be pinned before calling 
     947           any accessor. 
     948        2) if 'tdo' is not null, it must point to a valid type descriptor 
    948949           in the object cache. 
    949950   DESCRIPTION: 
    950         Get one or more methods given the name.   
    951    RETURNS: 
    952         OCI_SUCCESS if the function completes successfully. 
    953         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     951        Get one or more methods given the name. 
     952   RETURNS: 
     953        OCI_SUCCESS if the function completes successfully. 
     954        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    954955        OCI_ERROR if 
    955956            1) any of the required parameters is null. 
     
    957958            3) 'mdos' is not NULL but points to NULL data. 
    958959   NOTES: 
    959         The type must be unpinned when the accessed information is no  
     960        The type must be unpinned when the accessed information is no 
    960961        longer needed. 
    961962        Schema and type names are CASE-SENSITIVE. If they have been created 
     
    967968/* 
    968969   NAME: OCITypeMethodNext - OCI Get a Method By Iteration. 
    969    PARAMETERS:  
     970   PARAMETERS: 
    970971        env (IN/OUT) - OCI environment handle initialized in object mode 
    971972        err (IN/OUT) - error handle. If there is an error, it is 
     
    975976        iterator_ort (IN/OUT) - iterator for retrieving the next method; 
    976977               see OCITypeIterNew() to set iterator. 
    977         mdo (OUT) - If this function completes successfully, 'mdo' points to  
    978                the selected method descriptor in the object cache.  Positions  
     978        mdo (OUT) - If this function completes successfully, 'mdo' points to 
     979               the selected method descriptor in the object cache.  Positions 
    979980               start at 1.  The caller must allocate space for the 
    980                OCITypeMethod* before calling this routine and must not write  
    981                nto the space.  
    982    REQUIRES: 
    983          1) All type accessors require that the type be pinned before calling  
    984             any accessor.  
    985         2) if 'tdo' is not null, it must point to a valid type descriptor  
     981               OCITypeMethod* before calling this routine and must not write 
     982               nto the space. 
     983   REQUIRES: 
     984         1) All type accessors require that the type be pinned before calling 
     985            any accessor. 
     986        2) if 'tdo' is not null, it must point to a valid type descriptor 
    986987           in the object cache. 
    987988   DESCRIPTION: 
     
    991992        OCI_NO_DATA if there are no more attributes to iterate on; use 
    992993            OCITypeIterSet() to reset the iterator if necessary. 
    993         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     994        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    994995        OCI_ERROR if 
    995996            1) any of the required parameters is null. 
    996997            2) 'mdo' is not NULL but points to NULL data. 
    997998   NOTES: 
    998         The type must be unpinned when the accessed information is no  
     999        The type must be unpinned when the accessed information is no 
    9991000        longer needed. 
    10001001 */ 
     
    10031004deprecated extern (C) oratext* OCITypeMethodName (OCIEnv* env, OCIError* err, OCITypeMethod* mdo, ub4* n_length); 
    10041005/* 
    1005    NAME: OCITypeMethodName - OCI Get a Method's NaMe.  
    1006    PARAMETERS:  
     1006   NAME: OCITypeMethodName - OCI Get a Method's NaMe. 
     1007   PARAMETERS: 
    10071008        env (IN/OUT) - OCI environment handle initialized in object mode 
    10081009        err (IN/OUT) - error handle. If there is an error, it is 
     
    10141015               must allocate space for the ub4 before calling this routine. 
    10151016   REQUIRES: 
    1016         1) All type accessors require that the type be pinned before calling  
    1017            any accessor.  
     1017        1) All type accessors require that the type be pinned before calling 
     1018           any accessor. 
    10181019        2) All input parameters must not be NULL and must be valid. 
    10191020   DESCRIPTION: 
     
    10221023        the non-unique name of the method or NULL if there is an error. 
    10231024   NOTES: 
    1024         The type must be unpinned when the accessed information is no  
     1025        The type must be unpinned when the accessed information is no 
    10251026        longer needed. 
    10261027 */ 
     
    10291030deprecated extern (C) OCITypeEncap OCITypeMethodEncap (OCIEnv* env, OCIError* err, OCITypeMethod* mdo); 
    10301031/* 
    1031    NAME: OCITypeMethodEncap - Get a Method's ENcapsulation (private/public).  
    1032    PARAMETERS:  
     1032   NAME: OCITypeMethodEncap - Get a Method's ENcapsulation (private/public). 
     1033   PARAMETERS: 
    10331034        env (IN/OUT) - OCI environment handle initialized in object mode 
    10341035        err (IN/OUT) - error handle. If there is an error, it is 
     
    10381039        mdo (IN) - pointer to the method descriptor in the object cache 
    10391040   REQUIRES: 
    1040         1) All type accessors require that the type be pinned before calling  
    1041            any accessor.  
     1041        1) All type accessors require that the type be pinned before calling 
     1042           any accessor. 
    10421043        2) All input parameters must not be NULL and must be valid. 
    10431044   DESCRIPTION: 
     
    10461047        the encapsulation (private, or public) of the method 
    10471048   NOTES: 
    1048         The type must be unpinned when the accessed information is no  
     1049        The type must be unpinned when the accessed information is no 
    10491050        longer needed. 
    10501051 */ 
     
    10551056   NAME: OCITypeMethodFlags - OCI Get a Method's FLags 
    10561057                              (inline, constant, virtual, constructor, 
    1057                               destructor).  
    1058    PARAMETERS:  
     1058                              destructor). 
     1059   PARAMETERS: 
    10591060        env (IN/OUT) - OCI environment handle initialized in object mode 
    10601061        err (IN/OUT) - error handle. If there is an error, it is 
     
    10641065        mdo (IN) - pointer to the method descriptor in the object cache 
    10651066   REQUIRES: 
    1066         1) All type accessors require that the type be pinned before calling  
    1067            any accessor.  
     1067        1) All type accessors require that the type be pinned before calling 
     1068           any accessor. 
    10681069        2) All input parameters must not be NULL and must be valid. 
    10691070   DESCRIPTION: 
     
    10741075        the method 
    10751076   NOTES: 
    1076         The type must be unpinned when the accessed information is no  
     1077        The type must be unpinned when the accessed information is no 
    10771078        longer needed. 
    10781079 */ 
     
    10821083/* 
    10831084   NAME: OCITypeMethodMap - OCI Get the Method's MAP function. 
    1084    PARAMETERS:  
     1085   PARAMETERS: 
    10851086        env (IN/OUT) - OCI environment handle initialized in object mode 
    10861087        err (IN/OUT) - error handle. If there is an error, it is 
     
    10891090                OCIErrorGet(). 
    10901091        tdo (IN) - pointer to to the type descriptor in the object cache 
    1091         mdo (OUT) - If this function completes successfully, and there is a  
    1092                map function for this type, 'mdo' points to the selected method  
     1092        mdo (OUT) - If this function completes successfully, and there is a 
     1093               map function for this type, 'mdo' points to the selected method 
    10931094               descriptor in the object cache.  Otherwise, 'mdo' is null. 
    10941095   REQUIRES: 
    1095         1) All type accessors require that the type be pinned before calling  
    1096            any accessor.  
     1096        1) All type accessors require that the type be pinned before calling 
     1097           any accessor. 
    10971098        2) All required input parameters must not be NULL and must be valid. 
    10981099   DESCRIPTION: 
     
    11041105   RETURNS: 
    11051106        OCI_SUCCESS if the function completes successfully. 
    1106         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     1107        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    11071108        OCI_ERROR if 
    11081109            the type does not contain a map function. 
    11091110   NOTES: 
    1110         The type must be unpinned when the accessed information is no  
     1111        The type must be unpinned when the accessed information is no 
    11111112        longer needed. 
    11121113 */ 
     
    11161117/* 
    11171118   NAME: OCITypeMethodOrder - OCI Get the Method's ORder function. 
    1118    PARAMETERS:  
     1119   PARAMETERS: 
    11191120        env (IN/OUT) - OCI environment handle initialized in object mode 
    11201121        err (IN/OUT) - error handle. If there is an error, it is 
     
    11231124                OCIErrorGet(). 
    11241125        tdo (IN) - pointer to to the type descriptor in the object cache 
    1125         mdo (OUT) - If this function completes successfully, and there is a  
    1126                map function for this type, 'mdo' points to the selected method  
     1126        mdo (OUT) - If this function completes successfully, and there is a 
     1127               map function for this type, 'mdo' points to the selected method 
    11271128               descriptor in the object cache.  Otherwise, 'mdo' is null. 
    11281129   REQUIRES: 
    1129         1) All type accessors require that the type be pinned before calling  
    1130            any accessor.  
     1130        1) All type accessors require that the type be pinned before calling 
     1131           any accessor. 
    11311132        2) All required input parameters must not be NULL and must be valid. 
    11321133   DESCRIPTION: 
     
    11381139   RETURNS: 
    11391140        OCI_SUCCESS if the function completes successfully. 
    1140         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     1141        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    11411142        OCI_ERROR if 
    11421143            the type does not contain a map function. 
    11431144   NOTES: 
    1144         The type must be unpinned when the accessed information is no  
     1145        The type must be unpinned when the accessed information is no 
    11451146        longer needed. 
    11461147 */ 
     
    11491150deprecated extern (C) ub4 OCITypeMethodParams (OCIEnv* env, OCIError* err, OCITypeMethod* mdo); 
    11501151/* 
    1151    NAME: OCITypeMethodParams - OCI Get a Method's Number of Parameters.  
    1152    PARAMETERS:  
     1152   NAME: OCITypeMethodParams - OCI Get a Method's Number of Parameters. 
     1153   PARAMETERS: 
    11531154        env (IN/OUT) - OCI environment handle initialized in object mode 
    11541155        err (IN/OUT) - error handle. If there is an error, it is 
     
    11581159        mdo (IN) - pointer to the method descriptor in the object cache 
    11591160   REQUIRES: 
    1160         1) All type accessors require that the type be pinned before calling  
    1161            any accessor.  
     1161        1) All type accessors require that the type be pinned before calling 
     1162           any accessor. 
    11621163        2) All input parameters must not be NULL and must be valid. 
    11631164   DESCRIPTION: 
     
    11661167        the number of parameters in the method 
    11671168   NOTES: 
    1168         The type must be unpinned when the accessed information is no  
     1169        The type must be unpinned when the accessed information is no 
    11691170        longer needed. 
    11701171 */ 
     
    11741175/* 
    11751176   NAME: OCITypeResult - OCI Get a method's result type descriptor. 
    1176    PARAMETERS:  
     1177   PARAMETERS: 
    11771178        env (IN/OUT) - OCI environment handle initialized in object mode 
    11781179        err (IN/OUT) - error handle. If there is an error, it is 
     
    11811182                OCIErrorGet(). 
    11821183        mdo (IN) - pointer to the method descriptor in the object cache 
    1183         elem (OUT) - If this function completes successfully, 'rdo' points to  
     1184        elem (OUT) - If this function completes successfully, 'rdo' points to 
    11841185               the selected result (parameter) descriptor in the object cache. 
    11851186   REQUIRES: 
    1186         1) All type accessors require that the type be pinned before calling  
     1187        1) All type accessors require that the type be pinned before calling 
    11871188           any accessor. 
    11881189        2) 'elem' MUST be the address of an OCITypeElem pointer. 
     
    11911192   RETURNS: 
    11921193        OCI_SUCCESS if the function completes successfully. 
    1193         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     1194        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    11941195        OCI_ERROR if 
    11951196            1) any of the required parameters is null. 
    11961197            2) method returns no results. 
    11971198   NOTES: 
    1198         The method must be unpinned when the accessed information is no  
     1199        The method must be unpinned when the accessed information is no 
    11991200        longer needed. 
    12001201 */ 
     
    12031204deprecated extern (C) sword OCITypeParamByPos (OCIEnv* env, OCIError* err, OCITypeMethod* mdo, ub4 position, OCITypeElem** elem); 
    12041205/* 
    1205    NAME: OCITypeParamByPos - OCI Get a Parameter in a method By Position.  
    1206    PARAMETERS:  
     1206   NAME: OCITypeParamByPos - OCI Get a Parameter in a method By Position. 
     1207   PARAMETERS: 
    12071208        env (IN/OUT) - OCI environment handle initialized in object mode 
    12081209        err (IN/OUT) - error handle. If there is an error, it is 
     
    12121213        mdo (IN) - pointer to the method descriptor in the object cache 
    12131214        position (IN) - the parameter's position.  Positions start at 1. 
    1214         elem (OUT) - If this function completes successfully, 'elem' points to  
     1215        elem (OUT) - If this function completes successfully, 'elem' points to 
    12151216               the selected parameter descriptor in the object cache. 
    12161217   REQUIRES: 
    1217         1) All type accessors require that the type be pinned before calling  
    1218            any accessor.  
    1219    DESCRIPTION: 
    1220         Get a parameter given its position in the method.  Positions start  
    1221         at 1.   
    1222    RETURNS: 
    1223         OCI_SUCCESS if the function completes successfully. 
    1224         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     1218        1) All type accessors require that the type be pinned before calling 
     1219           any accessor. 
     1220   DESCRIPTION: 
     1221        Get a parameter given its position in the method.  Positions start 
     1222        at 1. 
     1223   RETURNS: 
     1224        OCI_SUCCESS if the function completes successfully. 
     1225        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    12251226        OCI_ERROR if 
    12261227            1) any of the required parameters is null. 
     
    12281229               method. 
    12291230   NOTES: 
    1230         The type must be unpinned when the accessed information is no  
     1231        The type must be unpinned when the accessed information is no 
    12311232        longer needed. 
    12321233 */ 
     
    12351236deprecated extern (C) sword OCITypeParamByName (OCIEnv* env, OCIError* err, OCITypeMethod* mdo, oratext* name, ub4 n_length, OCITypeElem** elem); 
    12361237/* 
    1237    NAME: OCITypeParamByName - OCI Get a Parameter in a method By Name.  
    1238    PARAMETERS:  
     1238   NAME: OCITypeParamByName - OCI Get a Parameter in a method By Name. 
     1239   PARAMETERS: 
    12391240        env (IN/OUT) - OCI environment handle initialized in object mode 
    12401241        err (IN/OUT) - error handle. If there is an error, it is 
     
    12451246        name (IN) - the parameter's name 
    12461247        n_length (IN) - length (in bytes) of the 'name' parameter 
    1247         elem (OUT) - If this function completes successfully, 'elem' points to  
     1248        elem (OUT) - If this function completes successfully, 'elem' points to 
    12481249               the selected parameter descriptor in the object cache. 
    12491250   REQUIRES: 
    1250         1) All type accessors require that the type be pinned before calling  
    1251            any accessor.  
    1252         2) if 'mdo' is not null, it must point to a valid method descriptor  
     1251        1) All type accessors require that the type be pinned before calling 
     1252           any accessor. 
     1253        2) if 'mdo' is not null, it must point to a valid method descriptor 
    12531254           in the object cache. 
    12541255   DESCRIPTION: 
    1255         Get a parameter given its name.   
    1256    RETURNS: 
    1257         OCI_SUCCESS if the function completes successfully. 
    1258         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     1256        Get a parameter given its name. 
     1257   RETURNS: 
     1258        OCI_SUCCESS if the function completes successfully. 
     1259        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    12591260        OCI_ERROR if 
    12601261            1) any of the required parameters is null. 
    1261             2) the method does not contain a parameter with the input 'name'.  
    1262    NOTES: 
    1263         The type must be unpinned when the accessed information is no  
     1262            2) the method does not contain a parameter with the input 'name'. 
     1263   NOTES: 
     1264        The type must be unpinned when the accessed information is no 
    12641265        longer needed. 
    12651266 */ 
     
    12691270/* 
    12701271   NAME: OCITypeParamPos - OCI Get a parameter's position in a method 
    1271    PARAMETERS:  
     1272   PARAMETERS: 
    12721273        env (IN/OUT) - OCI environment handle initialized in object mode 
    12731274        err (IN/OUT) - error handle. If there is an error, it is 
     
    12781279        name (IN) - the parameter's name 
    12791280        n_length (IN) - length (in bytes) of the 'name' parameter 
    1280         position (OUT) - If this function completes successfully, 'position'  
    1281                points to the position of the parameter in the method starting  
     1281        position (OUT) - If this function completes successfully, 'position' 
     1282               points to the position of the parameter in the method starting 
    12821283               at position 1. position MUST point to space for a ub4. 
    1283         elem (OUT) - If this function completes successfully, and  
    1284                the input 'elem' is not NULL, 'elem' points to the selected  
     1284        elem (OUT) - If this function completes successfully, and 
     1285               the input 'elem' is not NULL, 'elem' points to the selected 
    12851286               parameter descriptor in the object cache. 
    12861287   REQUIRES: 
    1287         1) All type accessors require that the type be pinned before calling  
    1288            any accessor.  
    1289         2) if 'mdo' is not null, it must point to a valid method descriptor  
     1288        1) All type accessors require that the type be pinned before calling 
     1289           any accessor. 
     1290        2) if 'mdo' is not null, it must point to a valid method descriptor 
    12901291           in the object cache. 
    12911292   DESCRIPTION: 
     
    12931294   RETURNS: 
    12941295        OCI_SUCCESS if the function completes successfully. 
    1295         OCI_INVALID_HANDLE if 'env' or 'err' is null.  
     1296        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
    12961297        OCI_ERROR if 
    12971298            1) any of the parameters is null. 
    1298             2) the method does not contain a parameter with the input 'name'.  
    1299    NOTES: 
    1300         The type must be unpinned when the accessed information is no  
     1299            2) the method does not contain a parameter with the input 'name'. 
     1300   NOTES: 
     1301        The type must be unpinned when the accessed information is no 
    13011302        longer needed. 
    13021303 */ 
     
    13061307/* 
    13071308   NAME: OCITypeElemParamMode - OCI Get a parameter's mode 
    1308    PARAMETERS:  
     1309   PARAMETERS: 
    13091310        env (IN/OUT) - OCI environment handle initialized in object mode 
    13101311        err (IN/OUT) - error handle. If there is an error, it is 
     
    13151316                (represented by an OCITypeElem) 
    13161317   REQUIRES: 
    1317         1) All type accessors require that the type be pinned before calling  
    1318            any accessor.  
     1318        1) All type accessors require that the type be pinned before calling 
     1319           any accessor. 
    13191320        2) All input parameters must not be NULL and must be valid. 
    13201321   DESCRIPTION: 
     
    13231324        the mode (in, out, or in/out) of the parameter 
    13241325   NOTES: 
    1325         The type must be unpinned when the accessed information is no  
     1326        The type must be unpinned when the accessed information is no 
    13261327        longer needed. 
    13271328 */ 
     
    13301331deprecated extern (C) oratext* OCITypeElemDefaultValue (OCIEnv* env, OCIError* err, OCITypeElem* elem, ub4* d_v_length); 
    13311332/* 
    1332    NAME: OCITypeElemDefaultValue - OCI Get the element's Default Value.  
    1333    PARAMETERS:  
     1333   NAME: OCITypeElemDefaultValue - OCI Get the element's Default Value. 
     1334   PARAMETERS: 
    13341335        env (IN/OUT) - OCI environment handle initialized in object mode 
    13351336        err (IN/OUT) - error handle. If there is an error, it is 
     
    13401341                (represented by an OCITypeElem) 
    13411342        d_v_length (OUT) - length (in bytes) of the returned default value. 
    1342                The caller must allocate space for the ub4 before calling this  
     1343               The caller must allocate space for the ub4 before calling this 
    13431344               routine. 
    13441345   REQUIRES: 
    1345         1) All type accessors require that the type be pinned before calling  
    1346            any accessor.  
     1346        1) All type accessors require that the type be pinned before calling 
     1347           any accessor. 
    13471348        2) All input parameters must not be NULL and must be valid. 
    13481349   DESCRIPTION: 
     
    13521353        The default value (text) of the parameter. 
    13531354   NOTES: 
    1354         The type must be unpinned when the accessed information is no  
    1355         longer needed. 
    1356  */ 
    1357   
     1355        The type must be unpinned when the accessed information is no 
     1356        longer needed. 
     1357 */ 
     1358 
    13581359 
    13591360deprecated extern (C) sword OCITypeVTInit (OCIEnv* env, OCIError* err); 
     
    13761377        OCI_ERROR if internal errors occurrs during initialization. 
    13771378 */ 
    1378   
     1379 
    13791380 
    13801381deprecated extern (C) sword OCITypeVTInsert (OCIEnv* env, OCIError* err, oratext* schema_name, ub4 s_n_length, oratext* type_name, ub4 t_n_length, oratext* user_version, ub4 u_v_length); 
     
    13871388                The error recorded in 'err' can be retrieved by calling 
    13881389                OCIErrorGet(). 
    1389         schema_name (IN, optional) - name of schema associated with the  
     1390        schema_name (IN, optional) - name of schema associated with the 
    13901391                  type.  By default, the user's schema name is used. 
    13911392        s_n_length (IN) - length of the 'schema_name' parameter 
     
    14201421                The error recorded in 'err' can be retrieved by calling 
    14211422                OCIErrorGet(). 
    1422         schema_name (IN, optional) - name of schema associated with the  
     1423        schema_name (IN, optional) - name of schema associated with the 
    14231424                  type.  By default, the user's schema name is used. 
    14241425        s_n_length (IN) - length of the 'schema_name' parameter 
     
    14621463       tc               - The TypeCode for the type. The Typecode could 
    14631464                          correspond to a User Defined Type or a Built-in type. 
    1464                           Currently, the permissible values for User Defined  
     1465                          Currently, the permissible values for User Defined 
    14651466                          Types are OCI_TYPECODE_OBJECT for an Object Type 
    14661467                          (structured), OCI_TYPECODE_VARRAY for a VARRAY 
     
    14701471                          the attribute types. For Collection types, 
    14711472                          OCITypeSetCollection() needs to be called. 
    1472                           Subsequently, OCITypeEndCreate() needs to be called  
     1473                          Subsequently, OCITypeEndCreate() needs to be called 
    14731474                          to finish the creation process. 
    14741475                          The permissible values for Built-in type codes are 
     
    14971498   PARAMETERS: 
    14981499       svchp (IN)      -  The OCI Service Context. 
    1499        errhp (IN/OUT)  -  The OCI error handle. If there is an error, it is  
     1500       errhp (IN/OUT)  -  The OCI error handle. If there is an error, it is 
    15001501                          recorded in errhp and this function returns 
    15011502                          OCI_ERROR. Diagnostic information can be obtained by 
     
    15241525   PARAMETERS: 
    15251526       svchp (IN)       - The OCI Service Context. 
    1526        errhp (IN/OUT)   - The OCI error handle. If there is an error, it is  
     1527       errhp (IN/OUT)   - The OCI error handle. If there is an error, it is 
    15271528                          recorded in errhp and this function returns 
    15281529                          OCI_ERROR. Diagnostic information can be obtained by 
     
    16001601    return param_flag && OCI_TYPEPARAM_REQUIRED; 
    16011602} 
     1603 
     1604} 
  • trunk/bbconv/dbi/oracle/imp/xa.d

    r11 r115  
    1 /** 
     1/** 
    22 * Oracle import library. 
    33 * 
     
    77 *  Oracle 10g revision 2 
    88 * 
    9  *  Import library version 0.03 
     9 *  Import library version 0.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
     
    1716const uint XIDDATASIZE          = 128;      /// Size in bytes. 
    1817const uint MAXGTRIDSIZE         = 64;       /// Maximum size in bytes of gtrid. 
     18 
     19version (dbi_oracle) { 
     20 
    1921const uint MAXBQUALSIZE         = 64;       /// Maximum size in bytes of bqual. 
    2022 
     
    115117const long XAER_DUPID           = -8;       /// The XID already exists. 
    116118const long XAER_OUTSIDE         = -9;       /// Resource manager doing work outside global transaction. 
     119 
     120} 
  • trunk/bbconv/dbi/pg/PgDatabase.d

    r34 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.pg.PgDatabase; 
    96 
    10 version (Ares) { 
    11     private import util.string : asString = toString; 
    12     debug (UnitTest) private import std.io.Console; 
    13 } else { 
    14     private import std.string : asString = toString; 
    15     debug (UnitTest) private import std.stdio; 
    16 
     7version (dbi_pg) { 
     8 
     9    private import tango.stdc.stringz : toDString = fromStringz, toCString = toStringz; 
     10    debug (UnitTest) private static import tango.io.Stdout; 
     11 
    1712private import dbi.Database, dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement; 
    1813private import dbi.pg.imp, dbi.pg.PgError, dbi.pg.PgResult; 
     
    2015/** 
    2116 * An implementation of Database for use with PostgreSQL databases. 
    22  * 
    23  * Bugs: 
    24  *  Column types aren't retrieved. 
    2517 * 
    2618 * See_Also: 
     
    9183     * 
    9284     * See_Also:: 
    93      *  http://www.postgresql.org/docs/8.1/static/libpq.html 
     85     *  http://www.postgresql.org/docs/8.2/static/libpq.html 
    9486     */ 
    9587    override void connect (char[] params, char[] username = null, char[] password = null) { 
     
    10395            params ~= " password=" ~ password ~ ""; 
    10496        } 
    105         connection = PQconnectdb(params.ptr); 
    106         m_errorCode = cast(int)PQstatus(connection); 
    107         if (m_errorCode != ConnStatusType.CONNECTION_OK && m_errorCode) { 
    108             throw new DBIException(asString(PQerrorMessage(connection)), m_errorCode); 
     97        connection = PQconnectdb(toCString(params)); 
     98        errorCode = cast(int)PQstatus(connection); 
     99        if (errorCode != ConnStatusType.CONNECTION_OK && errorCode) { 
     100            throw new DBIException(toDString(PQerrorMessage(connection)), errorCode); 
    109101        } 
    110102    } 
     
    120112    } 
    121113 
     114    /* Escape a _string using the database's native method, if possible. 
     115     * 
     116     * Params: 
     117     *  string = The _string to escape. 
     118     * 
     119     * Returns: 
     120     *  The escaped _string. 
     121     */ 
     122    override char[] escape (char[] string) { 
     123        if (string == "") { 
     124            return string; 
     125        } 
     126 
     127        char[] result; 
     128        result.length = string.length * 2; 
     129 
     130        // It's okay to send string.ptr here because string doesnt need to be 0-term 
     131        result.length = PQescapeStringConn(connection, result.ptr, string.ptr, string.length, null);; 
     132 
     133        return result; 
     134    } 
     135 
    122136    /** 
    123137     * Execute a SQL statement that returns no results. 
     
    130144     */ 
    131145    override void execute (char[] sql) { 
    132         PGresult* res = PQexec(connection, (sql.dup ~ "\0").ptr); 
     146        PGresult* res = PQexec(connection, toCString(sql)); 
    133147        scope(exit) PQclear(res); 
    134         m_errorCode = cast(int)PQresultStatus(res); 
    135         if (m_errorCode != ExecStatusType.PGRES_COMMAND_OK && m_errorCode != ExecStatusType.PGRES_TUPLES_OK) { 
    136             throw new DBIException(asString(PQerrorMessage(connection)), m_errorCode, specificToGeneral(PQresultErrorField(res, PG_DIAG_SQLSTATE))); 
     148        errorCode = cast(int)PQresultStatus(res); 
     149        if (errorCode != ExecStatusType.PGRES_COMMAND_OK && errorCode != ExecStatusType.PGRES_TUPLES_OK) { 
     150            throw new DBIException(toDString(PQerrorMessage(connection)), errorCode, specificToGeneral(PQresultErrorField(res, PG_DIAG_SQLSTATE))); 
    137151        } 
    138152    } 
     
    151165     */ 
    152166    override PgResult query (char[] sql) { 
    153         PGresult* res = PQexec(connection, (sql.dup ~ "\0").ptr); 
     167        PGresult* res = PQexec(connection, toCString(sql)); 
    154168        ExecStatusType status = PQresultStatus(res); 
    155         m_errorCode = cast(int)PQresultStatus(res); 
    156         if (m_errorCode != ExecStatusType.PGRES_COMMAND_OK && m_errorCode != ExecStatusType.PGRES_TUPLES_OK) { 
    157             throw new DBIException(asString(PQerrorMessage(connection)), m_errorCode, specificToGeneral(PQresultErrorField(res, PG_DIAG_SQLSTATE))); 
    158         } 
    159         return new PgResult(res); 
     169        errorCode = cast(int)PQresultStatus(res); 
     170        if (errorCode != ExecStatusType.PGRES_COMMAND_OK && errorCode != ExecStatusType.PGRES_TUPLES_OK) { 
     171            throw new DBIException(toDString(PQerrorMessage(connection)), errorCode, specificToGeneral(PQresultErrorField(res, PG_DIAG_SQLSTATE))); 
     172        } 
     173        return new PgResult(connection, res); 
    160174    } 
    161175 
     
    171185     */ 
    172186    deprecated override int getErrorCode () { 
    173         return m_errorCode; 
     187        return errorCode; 
    174188    } 
    175189 
     
    185199     */ 
    186200    deprecated override char[] getErrorMessage () { 
    187         return m_errorString; 
     201        return "not implemented"; 
     202    } 
     203 
     204    /** 
     205     * Get the integer id of the last row to be inserted. 
     206     * 
     207     * Returns: 
     208     *  The id of the last row inserted into the database. 
     209     */ 
     210    override long getLastInsertID() { 
     211        // TODO: Somehow use PQoidValue with the last INSERT result 
     212        return 0; 
    188213    } 
    189214 
    190215    private: 
    191216    PGconn* connection; 
    192     int m_errorCode; 
    193     char[] m_errorString; 
     217    int errorCode; 
    194218} 
    195219 
    196220unittest { 
    197     version (Ares) { 
    198         void s1 (char[] s) { 
    199             Cout("" ~ s ~ "\n"); 
    200         } 
    201  
    202         void s2 (char[] s) { 
    203             Cout("   ..." ~ s ~ "\n"); 
    204         } 
    205     } else { 
    206         void s1 (char[] s) { 
    207             writefln("%s", s); 
    208         } 
    209  
    210         void s2 (char[] s) { 
    211             writefln("   ...%s", s); 
    212         } 
    213     } 
     221    void s1 (char[] s) { 
     222        tango.io.Stdout.Stdout(s).newline(); 
     223    } 
     224 
     225    void s2 (char[] s) { 
     226        tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
     227    } 
    214228 
    215229    s1("dbi.pg.PgDatabase:"); 
     
    231245    assert (row.get("name") == "John Doe"); 
    232246    assert (row.get("dateofbirth") == "1970-01-01"); 
    233     /** Todo: PostgreSQL type retrieval is not functioning */ 
    234     //assert (row.getFieldType(1) == FIELD_TYPE_STRING); 
    235     //assert (row.getFieldDecl(1) == "char(40)"); 
     247    assert (row.getFieldType(1) == 1042); 
     248//  assert (row.getFieldDecl(1) == "char(40)"); 
    236249    res.finish(); 
    237250 
     
    259272    db.close(); 
    260273} 
     274 
     275} 
  • trunk/bbconv/dbi/pg/PgError.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.pg.PgError; 
     6 
     7version (dbi_pg) { 
     8 
    99 
    1010private import dbi.ErrorCode; 
     
    185185    return ErrorCode.Unknown; 
    186186} 
     187 
     188} 
  • trunk/bbconv/dbi/pg/PgResult.d

    r11 r115  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.pg.PgResult; 
    96 
    10 version (Ares) { 
    11     private static import std.regexp; 
    12     private import util.string : asString = toString; 
     7version (dbi_pg) { 
     8 
     9version (Phobos) { 
     10    private import std.string : trim = strip, toDString = toString; 
    1311} else { 
    14     private import std.string : strip, asString = toString; 
     12    private import tango.stdc.stringz : toDString = fromStringz; 
     13    private import tango.text.Util : trim; 
    1514} 
    16 private import dbi.Result, dbi.Row; 
    17 private import dbi.pg.imp
     15private import dbi.DBIException, dbi.Result, dbi.Row; 
     16private import dbi.pg.imp, dbi.pg.PgError
    1817 
    1918/** 
     
    2524class PgResult : Result { 
    2625    public: 
    27     this (PGresult* results) { 
     26    this (PGconn* conn, PGresult* results) { 
    2827        this.results = results; 
    2928        numRows = PQntuples(results); 
     
    3837     */ 
    3938    override Row fetchRow () { 
    40         version (Ares) { 
    41             char[] strip (char[] string) { 
    42                 return std.regexp.sub(std.regexp.sub(string, "^[ \t\v\r\n\f]+", ""), " [\t\v\r\n\f]+$", ""); 
    43             } 
    44         } 
    45  
    4639        if (index >= numRows) { 
    4740            return null; 
     
    4942        Row r = new Row(); 
    5043        for (int a = 0; a < numFields; a++) { 
    51             r.addField(strip(asString(PQfname(results, a))), strip(asString(PQgetvalue(results, index, a))), "", 0); 
     44            r.addField(trim(toDString(PQfname(results, a))), trim(toDString(PQgetvalue(results, index, a))), "", PQftype(results, a)); 
    5245        } 
    5346        index++; 
     
    7164    const int numFields; 
    7265} 
     66} 
  • trunk/bbconv/dbi/pg/all.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
     
    129} 
    1310 
    14 public import   dbi.pg.PgDatabase, 
     11version (dbi_pg) { 
     12 
     13    public import   dbi.pg.PgDatabase, 
    1514        dbi.pg.PgResult, 
    1615        dbi.all; 
     16     
     17} 
  • trunk/bbconv/dbi/pg/imp.d

    r11 r115  
    55 * 
    66 * Version: 
    7  *  PostgreSQL version 8.1.4 
    8  * 
    9  *  Import library version 1.03 
     7 *  PostgreSQL version 8.2.1 
     8 * 
     9 *  Import library version 1.04 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    1514module dbi.pg.imp; 
    1615 
    17 private import std.c.stdio; 
    18  
     16version (dbi_pg) { 
     17 
     18 
     19version (Phobos) { 
     20    private import std.c.stdio; 
     21} else { 
     22    private import tango.stdc.stdio; 
     23
    1924 
    2025version (Windows) { 
     
    2227} else version (linux) { 
    2328    pragma (lib, "libpq.a"); 
     29} else version (Posix) { 
     30    pragma (lib, "libpq.a"); 
    2431} else version (darwin) { 
    2532    pragma (lib, "libpq.a"); 
    2633} else { 
    27     static assert (0); 
    28 
    29  
    30 version (SSL) { 
    31     private import ssl; 
     34    pragma (msg, "You will need to manually link in the PostgreSQL library."); 
    3235} 
    3336 
     
    209212struct pgNotify { 
    210213    char* relname;          /// Notification condition name. 
    211     int be_pid;         /// Process ID of server process. 
     214    int be_pid;         /// Process ID of notifying server process. 
    212215    char* extra;            /// Notification parameter. 
    213216    /* Fields below here are private to libpq; apps should not use 'em */ 
     
    637640 
    638641/** 
    639  * Get the SSL structure associated with a connection. 
     642 * Get the OpenSSL structure associated with a connection. 
    640643 * 
    641644 * Params: 
     
    645648 *  The SSL structure used in the connection or null if SSL is not in use. 
    646649 */ 
    647 version (SSL) { 
    648     SSL* PQgetssl (PGconn* conn); 
    649 } else { 
    650     void* PQgetssl (PGconn* conn); 
    651 
     650void* PQgetssl (PGconn* conn); 
    652651 
    653652/** 
     
    940939/** 
    941940 * Deprecated: 
    942  *  These functions have poor error handling, nonblocking transfers, binary data,  
     941 *  These functions have poor error handling, nonblocking transfers, binary data, 
    943942 *  or easy end of data detection.  Use PQputCopyData, PQputCopyEnd, and PQgetCopyData instead. 
    944943 */ 
     
    973972 */ 
    974973int PQisnonblocking (PGconn* conn); 
     974 
     975/** 
     976 * todo 
     977 */ 
     978int PQisthreadsafe (); 
    975979 
    976980/** 
     
    12711275 
    12721276/** 
     1277 * todo 
     1278 */ 
     1279int PQnparams (PGresult* res); 
     1280 
     1281/** 
     1282 * todo 
     1283 */ 
     1284Oid PQparamtype (PGresult* res, int param_num); 
     1285 
     1286/** 
     1287 * todo 
     1288 */ 
     1289PGresult* PQdescribePrepared (PGconn* conn, char* stmt); 
     1290 
     1291/** 
     1292 * todo 
     1293 */ 
     1294PGresult* PQdescribePortal (PGconn* conn, char* portal); 
     1295 
     1296/** 
     1297 * todo 
     1298 */ 
     1299int PQsendDescribePrepared (PGconn* conn, char* stmt); 
     1300 
     1301/** 
     1302 * todo 
     1303 */ 
     1304int PQsendDescribePortal (PGconn* conn, char* portal); 
     1305 
     1306/** 
    12731307 * Free all memory associated with a result.  This includes all returned strings. 
    12741308 * 
     
    15651599 
    15661600/** 
    1567  * 
     1601 * todo 
    15681602 */ 
    15691603int PQmblen (char* s, int encoding); 
    15701604 
    15711605/** 
    1572  * 
     1606 * todo 
    15731607 */ 
    15741608int PQdsplen (char* s, int encoding); 
    15751609 
    15761610/** 
    1577  * 
     1611 * todo 
    15781612 */ 
    15791613int PQenv2encoding (); 
     1614 
     1615/** 
     1616 * todo 
     1617 */ 
     1618char* PQencryptPassword (char* passwd, char* user); 
     1619 
     1620} 
  • trunk/bbconv/dbi/sqlite/SqliteDatabase.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.sqlite.SqliteDatabase; 
    96 
    10 version (Ares) { 
    11     private import util.string : asString = toString; 
    12     debug (UnitTest) private import std.io.Console; 
    13 } else { 
    14     private import std.string : asString = toString; 
    15     debug (UnitTest) private import std.stdio; 
    16 
    17 private import dbi.Database, dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement; 
     7version (dbi_sqlite) { 
     8 
     9 
     10private import tango.stdc.stringz : toDString = fromStringz, toCString = toStringz; 
     11private import tango.util.log.Log; 
     12     
     13private import dbi.Database, dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement, dbi.Registry, dbi.PreparedStatement; 
    1814private import dbi.sqlite.imp, dbi.sqlite.SqliteError, dbi.sqlite.SqliteResult; 
    1915 
     
    2521 */ 
    2622class SqliteDatabase : Database { 
     23     
     24    private Logger logger; 
    2725    public: 
    2826 
     
    3028     * Create a new instance of SqliteDatabase, but don't open a database. 
    3129     */ 
    32     this () {    
     30    this () { 
     31        logger = Log.getLogger("dbi.sqlite.Database"); 
    3332    } 
    3433 
     
    4039     */ 
    4140    this (char[] dbFile) { 
     41        logger = Log.getLogger("dbi.sqlite.Database"); 
    4242        connect(dbFile); 
    4343    } 
     
    6161     */ 
    6262    override void connect (char[] params, char[] username = null, char[] password = null) { 
    63         if ((errorCode = sqlite3_open(params, &database)) != SQLITE_OK) { 
     63        logger.trace("connecting: " ~ params); 
     64        if ((errorCode = sqlite3_open(toCString(params), &database)) != SQLITE_OK) { 
    6465            throw new DBIException("Could not open or create " ~ params, errorCode, specificToGeneral(errorCode)); 
    6566        } 
     
    7071     */ 
    7172    override void close () { 
     73        logger.trace("closing database now"); 
    7274        if (database !is null) { 
    7375            if ((errorCode = sqlite3_close(database)) != SQLITE_OK) { 
    74                 throw new DBIException(asString(sqlite3_errmsg(database)), sql, errorCode, specificToGeneral(errorCode)); 
     76                throw new DBIException(asString(sqlite3_errmsg(database)), errorCode, specificToGeneral(errorCode)); 
    7577            } 
    7678            database = null; 
     
    8890     */ 
    8991    override void execute (char[] sql) { 
     92        logger.trace("executing: " ~ sql); 
    9093        char** errorMessage; 
    91         this.sql = sql; 
    92         if ((errorCode = sqlite3_exec(database, sql, null, null, errorMessage)) != SQLITE_OK) { 
    93             throw new DBIException(asString(sqlite3_errmsg(database)), sql, errorCode, specificToGeneral(errorCode)); 
     94        if ((errorCode = sqlite3_exec(database, sql.dup.ptr, null, null, errorMessage)) != SQLITE_OK) { 
     95            throw new DBIException(toDString(sqlite3_errmsg(database)), sql, errorCode, specificToGeneral(errorCode)); 
    9496        } 
    9597    } 
     
    108110     */ 
    109111    override SqliteResult query (char[] sql) { 
     112        logger.trace("querying: " ~ sql); 
    110113        char** errorMessage; 
    111114        sqlite3_stmt* stmt; 
    112         this.sql = sql; 
    113         if ((errorCode = sqlite3_prepare(database, sql, sql.length, &stmt, errorMessage)) != SQLITE_OK) { 
    114             throw new DBIException(asString(sqlite3_errmsg(database)), sql, errorCode, specificToGeneral(errorCode)); 
     115        if ((errorCode = sqlite3_prepare(database, toCString(sql), sql.length, &stmt, errorMessage)) != SQLITE_OK) { 
     116            throw new DBIException(toDString(sqlite3_errmsg(database)), sql, errorCode, specificToGeneral(errorCode)); 
    115117        } 
    116118        return new SqliteResult(stmt); 
     
    142144     */ 
    143145    deprecated override char[] getErrorMessage () { 
    144         return asString(sqlite3_errmsg(database)); 
     146        return toDString(sqlite3_errmsg(database)); 
     147    } 
     148 
     149    /** 
     150     * Get the integer id of the last row to be inserted. 
     151     * 
     152     * Returns: 
     153     *  The id of the last row inserted into the database. 
     154     */ 
     155    override long getLastInsertID() { 
     156        return sqlite3_last_insert_rowid(database); 
    145157    } 
    146158 
     
    149161     */ 
    150162 
    151     /** 
    152      * Get the rowid of the last insert. 
    153      * 
    154      * Returns: 
    155      *  The row of the last insert or 0 if no inserts have been done. 
    156      */ 
    157     long getLastInsertRowId () { 
    158         return sqlite3_last_insert_rowid(database); 
    159     } 
    160163 
    161164    /** 
     
    172175     * Get a list of all the table names. 
    173176     * 
    174      * Returns:  
     177     * Returns: 
    175178     *  An array of all the table names. 
    176179     */ 
     
    242245    bool isOpen = false; 
    243246    int errorCode; 
    244     char[] sql; 
    245247 
    246248    /** 
     
    250252        char[][] items; 
    251253        Row[] rows = queryFetchAll("SELECT name FROM sqlite_master WHERE type='" ~ type ~ "'"); 
    252         for (int idx = 0; idx < rows.length; idx++) { 
    253             items ~= rows[idx].get(0); 
     254        for (size_t i = 0; i < rows.length; i++) { 
     255            items ~= rows[i].get(0); 
    254256        } 
    255257        return items; 
     
    266268        return false; 
    267269    } 
     270     
     271    IPreparedStatement createStatement(char[] statement) 
     272    { 
     273        sqlite3_stmt* stmt; 
     274        char* pzTail; 
     275        int res; 
     276        if((res = sqlite3_prepare_v2(database, toCString(statement), statement.length, &stmt, &pzTail)) != SQLITE_OK) { 
     277            char* errmsg = sqlite3_errmsg(db_); 
     278            logger.error("sqlite3_prepare_v2 for statement: \"" ~ statement ~ "\" returned: " ~ Integer.toUtf8(res) ~ ", errmsg: " ~ toDString(errmsg)); 
     279            return null; 
     280        } 
     281        return new SqlitePreparedStatement(stmt, database); 
     282    } 
    268283} 
    269284 
     285private class SqliteRegister : Registerable { 
     286     
     287    private Logger logger; 
     288     
     289    this() { 
     290        logger = Log.getLogger("dbi.sqlite"); 
     291    } 
     292     
     293    public char[] getPrefix() { 
     294        return "sqlite"; 
     295    } 
     296     
     297    public Database getInstance(char[] url) { 
     298        logger.trace("creating Sqlite database: " ~ url); 
     299        return new SqliteDatabase(url); 
     300    } 
     301} 
     302 
    270303unittest { 
    271     version (Ares) { 
    272         void s1 (char[] s) { 
    273             Cout("" ~ s ~ "\n"); 
    274         } 
    275  
    276         void s2 (char[] s) { 
    277             Cout("   ..." ~ s ~ "\n"); 
    278         } 
    279     } else { 
    280         void s1 (char[] s) { 
    281             writefln("%s", s); 
    282         } 
    283  
    284         void s2 (char[] s) { 
    285             writefln("   ...%s", s); 
    286         } 
    287     } 
     304    void s1 (char[] s) { 
     305        tango.io.Stdout.Stdout(s).newline(); 
     306    } 
     307 
     308    void s2 (char[] s) { 
     309        tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
     310    } 
    288311 
    289312    s1("dbi.sqlite.SqliteDatabase:"); 
     
    343366    assert (db.hasView("doesnotexist") == false); 
    344367 
     368    s2("close"); 
    345369    db.close(); 
    346370} 
     371 
     372} 
  • trunk/bbconv/dbi/sqlite/SqliteError.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.sqlite.SqliteError; 
     6 
     7version (dbi_sqlite) { 
    98 
    109private import dbi.ErrorCode; 
     
    8382    return ErrorCode.Unknown; 
    8483} 
     84} 
  • trunk/bbconv/dbi/sqlite/SqliteResult.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
    85module dbi.sqlite.SqliteResult; 
    96 
    10 version (Ares) { 
    11     private import util.string : asString = toString; 
    12 } else { 
    13     private import std.string : asString = toString; 
    14 
     7version (dbi_sqlite) { 
     8 
     9private import tango.stdc.stringz : asString = fromStringz; 
     10     
    1511private import dbi.Result, dbi.Row; 
    1612private import dbi.sqlite.imp; 
     
    5854    sqlite3_stmt* stmt; 
    5955} 
     56 
     57} 
  • trunk/bbconv/dbi/sqlite/all.d

    r11 r115  
    11/** 
    22 * Authors: The D DBI project 
    3  * 
    4  * Version: 0.2.4 
    5  * 
    63 * Copyright: BSD license 
    74 */ 
     
    129} 
    1310 
     11version (dbi_sqlite) { 
     12 
    1413public import   dbi.sqlite.SqliteDatabase, 
    1514        dbi.sqlite.SqliteResult, 
    1615        dbi.all; 
     16 
     17} 
  • trunk/bbconv/dbi/sqlite/imp.d

    r11 r115  
    1 /** 
     1/** 
    22 * SQLite import library. 
    33 * 
     
    55 * 
    66 * Version: 
    7  *  SQLite version 3.3.8 
    8  * 
    9  *  Import library version 0.04 
     7 *  SQLite version 3.3.11 
     8 * 
     9 *  Import library version 0.05 
    1010 * 
    1111 * Authors: The D DBI project 
    12  * 
    1312 * Copyright: BSD license 
    1413 */ 
    15  
    1614module dbi.sqlite.imp; 
     15 
     16version (dbi_sqlite) { 
    1717 
    1818version (Windows) { 
     
    2020} else version (linux) { 
    2121    pragma (lib, "libsqlite.so"); 
     22} else version (Posix) { 
     23    pragma (lib, "libsqlite.so"); 
    2224} else version (darwin) { 
    23     pragma (lib, "libsqlite.so");   
     25    pragma (lib, "libsqlite.so"); 
    2426} else { 
    25     static assert (0); 
    26 
    27  
    28 private import std.c.stdarg; 
     27    pragma (msg, "You will need to manually link in the SQLite library."); 
     28
     29 
     30version (Phobos) { 
     31    private import std.c.stdarg; 
     32} else { 
     33    private import tango.stdc.stdarg; 
     34
    2935 
    3036/** 
     
    171177const int SQLITE_IGNORE         = 2;    /// Don't allow access, but don't generate an error. 
    172178 
    173 const void function(void*) SQLITE_STATIC = cast(void function(void*))0; /// The data doesn't need to be freed by SQLite.   
     179const void function(void*) SQLITE_STATIC = cast(void function(void*))0; /// The data doesn't need to be freed by SQLite. 
    174180const void function(void*) SQLITE_TRANSIENT = cast(void function(void*))-1; /// SQLite should make a private copy of the data. 
    175181 
     
    604610 */ 
    605611int sqlite3_overload_function (sqlite3* database, char* zFuncName, int nArg); 
     612 
    606613/** 
    607614 * 
     
    617624 * 
    618625 */ 
     626int sqlite3_prepare_v2 (sqlite3* database, char* zSql, int nBytes, sqlite3_stmt** stmt, char** zTail); 
     627 
     628/** 
     629 * 
     630 */ 
     631int sqlite3_prepare16_v2 (sqlite3* database, void* zSql, int nBytes, sqlite3_stmt** stmt, void** zTail); 
     632 
     633/** 
     634 * 
     635 */ 
    619636void sqlite3_progress_handler (sqlite3* database, int n, int function(void*) callback, void* arg); 
    620637 
     
    813830 */ 
    814831int sqlite3_value_type (sqlite3_value* value); 
     832 
     833} 
  • trunk/bbconv/ini.bnf

    r16 r115  
    22 
    33.import("enki.BaseParser"); 
    4 .import("std.string"); 
    5 .import("std.file"); 
     4.import("tango.io.device.File"); 
    65 
    76.define("bool","eoi","true","End of Input"); 
     
    2928     
    3029    public this(String filename){ 
    31         String data = cast(String)std.file.read(filename); 
     30        String data = cast(String)File.get(filename); 
    3231        super.initalize(data); 
    3332        auto res = parse_Syntax(); 
  • trunk/bbconv/ini.d

    r16 r115  
    66version(build) pragma(export_version,EnkiUTF8); 
    77 
    8 debug private import std.stdio
     8debug private import tango.io.Stdout
    99private import enki.types; 
    1010private import enki.BaseParser; 
    11 private import std.string; 
    12 private import std.file; 
     11private import tango.io.device.File; 
    1312 
    1413 
     
    2827     
    2928    public this(String filename){ 
    30         String data = cast(String)std.file.read(filename); 
     29        String data = cast(String)File.get(filename); 
    3130        super.initalize(data); 
    3231        auto res = parse_Syntax(); 
    3332    } 
    34      
    35      
    36      
     33 
    3734    /* 
    3835     
     
    4239    */ 
    4340    public ResultT!(bool) parse_Syntax(){ 
    44         debug writefln("parse_Syntax()"); 
     41        debug Stdout.formatln("parse_Syntax()"); 
    4542        uint start1 = position; 
    4643        //no declarations 
     
    6360                    uint start5 = position; 
    6461                    if((parse_Comment().success) || (parse_Entry().success)){ 
     62                        clearErrors(); 
    6563                        goto loop5; 
    6664                    }else{ 
     
    7977            goto mismatch2; 
    8078        match3: 
    81             {/*do nothing*/} 
     79            clearErrors(); 
    8280            goto match1; 
    8381        } 
    8482    match1: 
    85         debug writefln("parse_Syntax() PASS"); 
     83        debug Stdout.formatln("parse_Syntax() PASS"); 
    8684        return ResultT!(bool)(true); 
    8785    mismatch2: 
     
    9896    */ 
    9997    public ResultT!(String) parse_Entry(){ 
    100         debug writefln("parse_Entry()"); 
     98        debug Stdout.formatln("parse_Entry()"); 
    10199        uint start6 = position; 
    102100        String bind_key; 
     
    117115                    uint start10 = position; 
    118116                    if((parse_ws().success && terminal("=").success)){ 
     117                        clearErrors(); 
    119118                        goto loopend13; 
    120119                    }else{ 
     
    128127                    uint start11 = position; 
    129128                    if((parse_any().assignCat!(String)(bind_key))){ 
     129                        clearErrors(); 
    130130                        goto loop12; 
    131131                    }else{ 
     
    149149                    uint start14 = position; 
    150150                    if((parse_Comment().success) || (parse_eol().success)){ 
     151                        clearErrors(); 
    151152                        goto loopend16; 
    152153                    }else{ 
     
    160161                    uint start15 = position; 
    161162                    if((parse_any().assignCat!(String)(bind_value))){ 
     163                        clearErrors(); 
    162164                        goto loop15; 
    163165                    }else{ 
     
    176178            goto mismatch9; 
    177179        match10: 
    178             {/*do nothing*/} 
     180            clearErrors(); 
    179181            goto match8; 
    180182        } 
    181183    match8: 
    182         debug writefln("parse_Entry() PASS"); 
     184        debug Stdout.formatln("parse_Entry() PASS"); 
    183185        addEntry(bind_key,bind_value); 
    184186        return ResultT!(String)(sliceData(start6,position)); 
     
    195197    */ 
    196198    public ResultT!(bool) parse_Comment(){ 
    197         debug writefln("parse_Comment()"); 
     199        debug Stdout.formatln("parse_Comment()"); 
    198200        uint start16 = position; 
    199201        //no declarations 
     
    222224                    uint start20 = position; 
    223225                    if((parse_any().success)){ 
     226                        clearErrors(); 
    224227                        goto loop22; 
    225228                    }else{ 
     
    238241            goto mismatch19; 
    239242        match20: 
    240             {/*do nothing*/} 
     243            clearErrors(); 
    241244            goto match18; 
    242245        } 
    243246    match18: 
    244         debug writefln("parse_Comment() PASS"); 
     247        debug Stdout.formatln("parse_Comment() PASS"); 
    245248        return ResultT!(bool)(true); 
    246249    mismatch19: 
  • trunk/bbconv/parser.bnf

    r29 r115  
    22 
    33.import("enki.BaseParser"); 
    4 .import("std.stdio"); 
     4.import("tango.io.Stdout"); 
    55.import("bbcode"); 
    66 
     
    2323        } 
    2424         
    25         writefln("data failed convertion\n[%s]\n[%s]\n",getErrorReport(),bbcode); 
     25        Stdout.formatln("data failed convertion\n[{}]\n[Stdout.formatln{}]\n",getErrorReport(),bbcode); 
    2626        return bbcode; 
    2727    } 
  • trunk/bbconv/parser.d

    r29 r115  
    66version(build) pragma(export_version,EnkiUTF8); 
    77 
    8 debug private import std.stdio
     8debug private import tango.io.Stdout
    99private import enki.types; 
    1010private import enki.BaseParser; 
    11 private import std.stdio
     11private import tango.io.Stdout
    1212private import bbcode; 
    1313 
     
    2424        } 
    2525         
    26         writefln("data failed convertion\n[%s]\n[%s]\n",getErrorReport(),bbcode); 
     26        Stdout.formatln("data failed convertion\n[{}]\n[Stdout.formatln{}]\n",getErrorReport(),bbcode); 
    2727        return bbcode; 
    2828    } 
     
    3636    */ 
    3737    public ResultT!(BBCode) parse_Syntax(){ 
    38         debug writefln("parse_Syntax()"); 
     38        debug Stdout.formatln("parse_Syntax()"); 
    3939        uint start1 = position; 
    4040        BBCodeEntity[] bind_ents; 
     
    7878        } 
    7979    match1: 
    80         debug writefln("parse_Syntax() PASS"); 
     80        debug Stdout.formatln("parse_Syntax() PASS"); 
    8181        ResultT!(BBCode) passed = ResultT!(BBCode)(new BBCode(bind_ents)); 
    8282        return passed; 
     
    9595    */ 
    9696    public ResultT!(BBCodeEntity) parse_BBCodeEntity(){ 
    97         debug writefln("parse_BBCodeEntity()"); 
     97        debug Stdout.formatln("parse_BBCodeEntity()"); 
    9898        uint start6 = position; 
    9999        BBCodeEntity bind_ent; 
     
    112112        } 
    113113    match8: 
    114         debug writefln("parse_BBCodeEntity() PASS"); 
     114        debug Stdout.formatln("parse_BBCodeEntity() PASS"); 
    115115        return ResultT!(BBCodeEntity)(bind_ent); 
    116116    mismatch9: 
     
    127127    */ 
    128128    public ResultT!(Code) parse_Code(){ 
    129         debug writefln("parse_Code()"); 
     129        debug Stdout.formatln("parse_Code()"); 
    130130        uint start8 = position; 
    131131        String bind_content; 
     
    183183        } 
    184184    match10: 
    185         debug writefln("parse_Code() PASS"); 
     185        debug Stdout.formatln("parse_Code() PASS"); 
    186186        ResultT!(Code) passed = ResultT!(Code)(new Code(bind_content)); 
    187187        return passed; 
     
    200200    */ 
    201201    public ResultT!(Quote) parse_Quote(){ 
    202         debug writefln("parse_Quote()"); 
     202        debug Stdout.formatln("parse_Quote()"); 
    203203        uint start14 = position; 
    204204        BBCodeEntity[] bind_ents; 
     
    307307        } 
    308308    match17: 
    309         debug writefln("parse_Quote() PASS"); 
     309        debug Stdout.formatln("parse_Quote() PASS"); 
    310310        ResultT!(Quote) passed = ResultT!(Quote)(new Quote(bind_ents,bind_who)); 
    311311        return passed; 
     
    324324    */ 
    325325    public ResultT!(Bold) parse_Bold(){ 
    326         debug writefln("parse_Bold()"); 
     326        debug Stdout.formatln("parse_Bold()"); 
    327327        uint start25 = position; 
    328328        BBCodeEntity[] bind_ents; 
     
    380380        } 
    381381    match31: 
    382         debug writefln("parse_Bold() PASS"); 
     382        debug Stdout.formatln("parse_Bold() PASS"); 
    383383        ResultT!(Bold) passed = ResultT!(Bold)(new Bold(bind_ents)); 
    384384        return passed; 
     
    397397    */ 
    398398    public ResultT!(Italics) parse_Italics(){ 
    399         debug writefln("parse_Italics()"); 
     399        debug Stdout.formatln("parse_Italics()"); 
    400400        uint start31 = position; 
    401401        BBCodeEntity[] bind_ents; 
     
    453453        } 
    454454    match38: 
    455         debug writefln("parse_Italics() PASS"); 
     455        debug Stdout.formatln("parse_Italics() PASS"); 
    456456        ResultT!(Italics) passed = ResultT!(Italics)(new Italics(bind_ents)); 
    457457        return passed; 
     
    470470    */ 
    471471    public ResultT!(Underline) parse_Underline(){ 
    472         debug writefln("parse_Underline()"); 
     472        debug Stdout.formatln("parse_Underline()"); 
    473473        uint start37 = position; 
    474474        BBCodeEntity[] bind_ents; 
     
    526526        } 
    527527    match45: 
    528         debug writefln("parse_Underline() PASS"); 
     528        debug Stdout.formatln("parse_Underline() PASS"); 
    529529        ResultT!(Underline) passed = ResultT!(Underline)(new Underline(bind_ents)); 
    530530        return passed; 
     
    543543    */ 
    544544    public ResultT!(Image) parse_Image(){ 
    545         debug writefln("parse_Image()"); 
     545        debug Stdout.formatln("parse_Image()"); 
    546546        uint start43 = position; 
    547547        String bind_url; 
     
    599599        } 
    600600    match52: 
    601         debug writefln("parse_Image() PASS"); 
     601        debug Stdout.formatln("parse_Image() PASS"); 
    602602        ResultT!(Image) passed = ResultT!(Image)(new Image(bind_url)); 
    603603        return passed; 
     
    616616    */ 
    617617    public ResultT!(Url) parse_Url(){ 
    618         debug writefln("parse_Url()"); 
     618        debug Stdout.formatln("parse_Url()"); 
    619619        uint start49 = position; 
    620620        String bind_url; 
     
    715715        } 
    716716    match59: 
    717         debug writefln("parse_Url() PASS"); 
     717        debug Stdout.formatln("parse_Url() PASS"); 
    718718        ResultT!(Url) passed = ResultT!(Url)(new Url(bind_url,bind_name)); 
    719719        return passed; 
     
    732732    */ 
    733733    public ResultT!(Email) parse_Email(){ 
    734         debug writefln("parse_Email()"); 
     734        debug Stdout.formatln("parse_Email()"); 
    735735        uint start59 = position; 
    736736        String bind_email; 
     
    789789        } 
    790790    match73: 
    791         debug writefln("parse_Email() PASS"); 
     791        debug Stdout.formatln("parse_Email() PASS"); 
    792792        ResultT!(Email) passed = ResultT!(Email)(new Email(bind_email)); 
    793793        return passed; 
     
    806806    */ 
    807807    public ResultT!(Color) parse_Color(){ 
    808         debug writefln("parse_Color()"); 
     808        debug Stdout.formatln("parse_Color()"); 
    809809        uint start64 = position; 
    810810        String bind_color; 
     
    888888        } 
    889889    match80: 
    890         debug writefln("parse_Color() PASS"); 
     890        debug Stdout.formatln("parse_Color() PASS"); 
    891891        ResultT!(Color) passed = ResultT!(Color)(new Color(bind_color,bind_ents)); 
    892892        return passed; 
     
    905905    */ 
    906906    public ResultT!(Size) parse_Size(){ 
    907         debug writefln("parse_Size()"); 
     907        debug Stdout.formatln("parse_Size()"); 
    908908        uint start73 = position; 
    909909        String bind_size; 
     
    987987        } 
    988988    match90: 
    989         debug writefln("parse_Size() PASS"); 
     989        debug Stdout.formatln("parse_Size() PASS"); 
    990990        ResultT!(Size) passed = ResultT!(Size)(new Size(bind_size,bind_ents)); 
    991991        return passed; 
     
    10041004    */ 
    10051005    public ResultT!(List) parse_List(){ 
    1006         debug writefln("parse_List()"); 
     1006        debug Stdout.formatln("parse_List()"); 
    10071007        uint start82 = position; 
    10081008        bool bind_isAlpha; 
     
    10931093        } 
    10941094    match100: 
    1095         debug writefln("parse_List() PASS"); 
     1095        debug Stdout.formatln("parse_List() PASS"); 
    10961096        ResultT!(List) passed = ResultT!(List)(new List(bind_isAlpha,bind_isNumeric,bind_ents)); 
    10971097        return passed; 
     
    11101110    */ 
    11111111    public ResultT!(ListItem) parse_ListItem(){ 
    1112         debug writefln("parse_ListItem()"); 
     1112        debug Stdout.formatln("parse_ListItem()"); 
    11131113        uint start91 = position; 
    11141114        bool bind_isStart; 
     
    11891189        } 
    11901190    match109: 
    1191         debug writefln("parse_ListItem() PASS"); 
     1191        debug Stdout.formatln("parse_ListItem() PASS"); 
    11921192        ResultT!(ListItem) passed = ResultT!(ListItem)(new ListItem(bind_isStart,bind_ents)); 
    11931193        return passed; 
     
    12061206    */ 
    12071207    public ResultT!(BBText) parse_StartToken(){ 
    1208         debug writefln("parse_StartToken()"); 
     1208        debug Stdout.formatln("parse_StartToken()"); 
    12091209        uint start100 = position; 
    12101210        String bind_tok; 
     
    12221222        } 
    12231223    match121: 
    1224         debug writefln("parse_StartToken() PASS"); 
     1224        debug Stdout.formatln("parse_StartToken() PASS"); 
    12251225        ResultT!(BBText) passed = ResultT!(BBText)(new BBText(bind_tok)); 
    12261226        return passed; 
     
    12391239    */ 
    12401240    public ResultT!(BBText) parse_BBText(){ 
    1241         debug writefln("parse_BBText()"); 
     1241        debug Stdout.formatln("parse_BBText()"); 
    12421242        uint start102 = position; 
    12431243        String bind_tok; 
     
    13011301        } 
    13021302    match123: 
    1303         debug writefln("parse_BBText() PASS"); 
     1303        debug Stdout.formatln("parse_BBText() PASS"); 
    13041304        ResultT!(BBText) passed = ResultT!(BBText)(new BBText(bind_tok)); 
    13051305        return passed; 
     
    13181318    */ 
    13191319    public ResultT!(Newline) parse_Newline(){ 
    1320         debug writefln("parse_Newline()"); 
     1320        debug Stdout.formatln("parse_Newline()"); 
    13211321        uint start109 = position; 
    13221322         
     
    13331333        } 
    13341334    match133: 
    1335         debug writefln("parse_Newline() PASS"); 
     1335        debug Stdout.formatln("parse_Newline() PASS"); 
    13361336        ResultT!(Newline) passed = ResultT!(Newline)(new Newline()); 
    13371337        return passed; 
     
    13491349    */ 
    13501350    public ResultT!(bool) parse_UID(){ 
    1351         debug writefln("parse_UID()"); 
     1351        debug Stdout.formatln("parse_UID()"); 
    13521352        uint start111 = position; 
    13531353        //no declarations 
     
    14091409        } 
    14101410    match135: 
    1411         debug writefln("parse_UID() PASS"); 
     1411        debug Stdout.formatln("parse_UID() PASS"); 
    14121412        return ResultT!(bool)(true); 
    14131413    mismatch136: