Example #1
0
 // Function from file: dbcore.dm
 public bool Close(  )
 {
     this.item.len    = 0;
     this.columns     = null;
     this.conversions = null;
     return(DB13.close(this._db_query));
 }
Example #2
0
        public Database_Query(Database query = null, params object[] _) : base(query)
        {
            ByTable _args = new ByTable(new object[] { query }).Extend(_);

            DB13.op(this, 5, (_args.len > 1 ? _args : _args[1]));
            return;
        }
Example #3
0
        public void Add(dynamic query = null, params object[] _)
        {
            ByTable _args = new ByTable(new object[] { query }).Extend(_);

            DB13.op(this, 5, (_args.len > 1 ? _args : _args[1]));
            return;
        }
Example #4
0
 // Function from file: dbcore.dm
 public ByTable Columns(  )
 {
     if (!(this.columns != null))
     {
         this.columns = DB13.columns(this._db_query, typeof(DBColumn));
     }
     return(this.columns);
 }
Example #5
0
        // Function from file: dbcore.dm
        public bool Execute(string sql_query = null, dynamic cursor_handler = null)
        {
            sql_query      = sql_query ?? this.sql;
            cursor_handler = cursor_handler ?? this.default_cursor;

            this.Close();
            return(DB13.execute(this._db_query, sql_query, this.db_connection._db_con, cursor_handler, null));
        }
Example #6
0
 // Function from file: dbcore.dm
 public DBConnection(dynamic dbi_handler = null, dynamic username = null, dynamic password_handler = null, dynamic cursor_handler = null)
 {
     this.dbi            = dbi_handler;
     this.user           = username;
     this.password       = password_handler;
     this.default_cursor = cursor_handler;
     this._db_con        = DB13.new_con();
     return;
 }
Example #7
0
 public dynamic Execute(Database database = null)
 {
     if (database != null && !(database is Database))
     {
         database = new Database(database);
     }
     this.database = database != null || this.database;
     return(DB13.op(this, 8, this.database));
 }
Example #8
0
        // Function from file: dbcore.dm
        public bool IsConnected(  )
        {
            bool success = false;


            if (!GlobalVars.config.sql_enabled)
            {
                return(false);
            }
            success = DB13.is_connected(this._db_con);
            return(success);
        }
Example #9
0
        // Function from file: dbcore.dm
        public DBQuery(string sql_query = null, DBConnection connection_handler = null, dynamic cursor_handler = null)
        {
            if (Lang13.Bool(sql_query))
            {
                this.sql = sql_query;
            }

            if (connection_handler != null)
            {
                this.db_connection = connection_handler;
            }

            if (Lang13.Bool(cursor_handler))
            {
                this.default_cursor = cursor_handler;
            }
            this._db_query = DB13.new_query();
            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            return;
        }
Example #10
0
        // Function from file: dbcore.dm
        public bool Connect(string dbi_handler = null, string user_handler = null, string password_handler = null, bool?cursor_handler = null)
        {
            dbi_handler      = dbi_handler ?? this.dbi;
            user_handler     = user_handler ?? this.user;
            password_handler = password_handler ?? this.password;


            if (!GlobalVars.config.sql_enabled)
            {
                return(false);
            }

            if (!(this != null))
            {
                return(false);
            }
            cursor_handler = Lang13.BoolNullable(this.default_cursor);

            if (!(cursor_handler == true))
            {
                cursor_handler = false;
            }
            return(DB13.connect(this._db_con, dbi_handler, user_handler, password_handler, cursor_handler, null));
        }
Example #11
0
 // Function from file: dbcore.dm
 public bool NextRow(  )
 {
     return(DB13.next_row(this._db_query, this.item, this.conversions));
 }
Example #12
0
 // Function from file: dbcore.dm
 public string ErrorMsg(  )
 {
     return(DB13.error_msg(this._db_con));
 }
Example #13
0
 // Function from file: dbcore.dm
 public string Quote(dynamic str = null)
 {
     return(DB13.quote(this._db_con, str));
 }
Example #14
0
 public virtual void Open(Database filename = null)
 {
     DB13.op(this, 0, filename);
     return;
 }
Example #15
0
 public override dynamic Close(  )
 {
     return(DB13.op(this, 10));
 }
Example #16
0
 public dynamic Reset(  )
 {
     return(DB13.op(this, 11));
 }
Example #17
0
 public virtual dynamic Close(  )
 {
     DB13.op(this, 1);
     return(null);
 }
Example #18
0
 public dynamic GetRowData(  )
 {
     return(DB13.op(this, 18));
 }
Example #19
0
 public dynamic ErrorMsg(  )
 {
     return(DB13.op(this, 3));
 }
Example #20
0
 public dynamic GetColumn(dynamic column = null)
 {
     return(DB13.op(this, 17, column - 1));
 }
Example #21
0
 public void Clear(  )
 {
     DB13.op(this, 4);
     return;
 }
Example #22
0
 // Function from file: dbcore.dm
 public int RowsAffected(  )
 {
     return(DB13.rows_affected(this._db_query));
 }
Example #23
0
 public dynamic NextRow(  )
 {
     return(DB13.op(this, 9));
 }
Example #24
0
 public dynamic RowsAffected(  )
 {
     return(DB13.op(this, 12));
 }
Example #25
0
 // Function from file: dbcore.dm
 public bool Disconnect(  )
 {
     return(DB13.close(this._db_con));
 }
Example #26
0
 public dynamic Error(  )
 {
     return(DB13.op(this, 2));
 }
Example #27
0
 // Function from file: dbcore.dm
 public int RowCount(  )
 {
     return(DB13.row_count(this._db_query));
 }
Example #28
0
 public dynamic Columns(dynamic column = null)
 {
     return(DB13.op(this, 16, (Lang13.Bool(Lang13.IsNumber(column)) ? column - 1 : column)));
 }