public virtual bool GetCachedTables(string defaultDb, DResult handler, DRows row, DRowsetHeader rh, uint flags) { ulong index = GetCallIndex(); lock (m_csCache) { //don't make m_csCache locked across calling SendRequest, which may lead to cross-SendRequest dead-lock //in case a client asynchronously sends lots of requests without use of client side queue. m_mapRowset[index] = new KeyValuePair <DRowsetHeader, DRows>(rh, row); } if (!SendRequest(DB_CONSTS.idGetCachedTables, defaultDb, flags, index, (ar) => { int res, dbMS; string errMsg; ar.Load(out dbMS).Load(out res).Load(out errMsg); lock (m_csCache) { m_ms = (UDB.tagManagementSystem)dbMS; m_mapRowset.Remove(index); } if (handler != null) { handler(res, errMsg); } })) { lock (m_csCache) { m_mapRowset.Remove(index); } return(false); } return(true); }
public bool PrimaryKeys(string CatalogName, string SchemaName, string TableName, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { return(DoMeta(idSQLPrimaryKeys, CatalogName, SchemaName, TableName, handler, row, rh, discarded)); }
public bool GetCachedTables(string defaultDb, DResult handler, DRows row, DRowsetHeader rh) { return(GetCachedTables(defaultDb, handler, row, rh, DB_CONSTS.ENABLE_TABLE_UPDATE_MESSAGES)); }
public bool Columns(string CatalogName, string SchemaName, string TableName, string ColumnName, DExecuteResult handler, DRows row, DRowsetHeader rh) { return(DoMeta(idSQLColumns, CatalogName, SchemaName, TableName, ColumnName, handler, row, rh, null)); }
public bool ProcedureColumns(string CatalogName, string SchemaName, string ProcName, string ColumnName, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { return(DoMeta(idSQLProcedureColumns, CatalogName, SchemaName, ProcName, ColumnName, handler, row, rh, discarded)); }
private bool DoMeta <T0, T1, T2>(ushort id, T0 t0, string s0, string s1, string s2, T1 t1, T2 t2, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { ulong index = GetCallIndex(); //don't make m_csDB locked across calling SendRequest, which may lead to client dead-lock //in case a client asynchronously sends lots of requests without use of client side queue. lock (m_csDB) { m_mapRowset[index] = new KeyValuePair <DRowsetHeader, DRows>(rh, row); } if (!SendRequest(id, t0, s0, s1, s2, t1, t2, index, (ar) => { ProcessODBC(handler, ar, id, index); }, discarded, null)) { lock (m_csDB) { m_mapRowset.Remove(index); } return(false); } return(true); }
public bool ColumnPrivileges(string CatalogName, string SchemaName, string TableName, string ColumnName, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { return(DoMeta(idSQLColumnPrivileges, CatalogName, SchemaName, TableName, ColumnName, handler, row, rh, discarded)); }
public bool Statistics(string CatalogName, string SchemaName, string TableName, ushort unique, ushort reserved, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { ulong index = GetCallIndex(); //don't make m_csDB locked across calling SendRequest, which may lead to client dead-lock //in case a client asynchronously sends lots of requests without use of client side queue. lock (m_csDB) { m_mapRowset[index] = new KeyValuePair <DRowsetHeader, DRows>(rh, row); } if (!SendRequest(idSQLStatistics, CatalogName, SchemaName, TableName, unique, reserved, index, (ar) => { ProcessODBC(handler, ar, idSQLStatistics, index); }, discarded, null)) { lock (m_csDB) { m_mapRowset.Remove(index); } return(false); } return(true); }
public bool ForeignKeys(string PKCatalogName, string PKSchemaName, string PKTableName, string FKCatalogName, string FKSchemaName, string FKTableName, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { return(DoMeta(idSQLForeignKeys, PKCatalogName, PKSchemaName, PKTableName, FKCatalogName, FKSchemaName, FKTableName, handler, row, rh, discarded)); }
public bool SpecialColumns(short identifierType, string CatalogName, string SchemaName, string TableName, short scope, short nullable, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { return(DoMeta(idSQLSpecialColumns, identifierType, CatalogName, SchemaName, TableName, scope, nullable, handler, row, rh, discarded)); }
public bool Statistics(string CatalogName, string SchemaName, string TableName, ushort unique, ushort reserved, DExecuteResult handler, DRows row, DRowsetHeader rh) { return(Statistics(CatalogName, SchemaName, TableName, unique, reserved, handler, row, rh, null)); }
public bool Procedures(string CatalogName, string SchemaName, string ProcName, DExecuteResult handler, DRows row, DRowsetHeader rh) { return(DoMeta(idSQLProcedures, CatalogName, SchemaName, ProcName, handler, row, rh, null)); }
public bool TablePrivileges(string CatalogName, string SchemaName, string TableName, DExecuteResult handler, DRows row, DRowsetHeader rh) { return(DoMeta(idSQLTablePrivileges, CatalogName, SchemaName, TableName, handler, row, rh, null)); }
private bool DoMeta <T0, T1, T2>(ushort id, T0 t0, string s0, string s1, string s2, T1 t1, T2 t2, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { ulong index = GetCallIndex(); //don't make m_csDB locked across calling SendRequest, which may lead to client dead-lock //in case a client asynchronously sends lots of requests without use of client side queue. lock (m_csDB) { m_mapRowset[index] = new KeyValuePair <DRowsetHeader, DRows>(rh, row); } if (!SendRequest(id, t0, s0, s1, s2, t1, t2, index, (ar) => { ulong fail_ok; int res; string errMsg; ar.Load(out res).Load(out errMsg).Load(out fail_ok); lock (m_csDB) { m_lastReqId = id; m_affected = 0; m_dbErrCode = res; m_dbErrMsg = errMsg; m_mapRowset.Remove(index); } if (handler != null) { handler(this, res, errMsg, 0, fail_ok, null); } }, discarded, null)) { lock (m_csDB) { m_mapRowset.Remove(index); } return(false); } return(true); }
public bool Statistics(string CatalogName, string SchemaName, string TableName, ushort unique, ushort reserved, DExecuteResult handler, DRows row, DRowsetHeader rh, DDiscarded discarded) { ulong index = GetCallIndex(); //don't make m_csDB locked across calling SendRequest, which may lead to client dead-lock //in case a client asynchronously sends lots of requests without use of client side queue. lock (m_csDB) { m_mapRowset[index] = new KeyValuePair <DRowsetHeader, DRows>(rh, row); } if (!SendRequest(idSQLStatistics, CatalogName, SchemaName, TableName, unique, reserved, index, (ar) => { ulong fail_ok; int res; string errMsg; ar.Load(out res).Load(out errMsg).Load(out fail_ok); lock (m_csDB) { m_lastReqId = idSQLStatistics; m_affected = 0; m_dbErrCode = res; m_dbErrMsg = errMsg; m_mapRowset.Remove(index); } if (handler != null) { handler(this, res, errMsg, 0, fail_ok, null); } }, discarded, null)) { lock (m_csDB) { m_mapRowset.Remove(index); } return(false); } return(true); }
public virtual bool PrimaryKeys(string CatalogName, string SchemaName, string TableName, DExecuteResult handler, DRows row, DRowsetHeader rh) { return(DoMeta(idSQLPrimaryKeys, CatalogName, SchemaName, TableName, handler, row, rh)); }