internal bool DropQuery(VistaDBSQLQuery query) { int indexQuery = -1; VistaDBSQLQuery[] newQueries; lock (syncRoot) { for (int i = 0; i < queries.Length; i++) { if (queries[i] == query) { indexQuery = i; break; } } if (indexQuery < 0) { return(false); } queries[indexQuery].FreeQuery(); newQueries = new VistaDBSQLQuery[queries.Length - 1]; for (int i = 0; i < newQueries.Length; i++) { if (i < indexQuery) { newQueries[i] = queries[i]; } else { newQueries[i] = queries[i + 1]; } } queries = newQueries; } return(true); }
/// <summary> /// Internal. Create new query for this connection. /// </summary> /// <returns></returns> internal VistaDBSQLQuery NewSQLQuery() { VistaDBSQLQuery query; VistaDBSQLQuery[] newQueries; query = new VistaDBSQLQuery(this); lock (syncRoot) { newQueries = new VistaDBSQLQuery[queries.Length + 1]; for (int i = 0; i < queries.Length; i++) { newQueries[i] = queries[i]; } queries = newQueries; queries[queries.GetUpperBound(0)] = query; } return(query); }
internal VistaDBColumnCollection(VistaDBSQLQuery p) { parent = p; }
internal bool DropQuery(VistaDBSQLQuery query) { int indexQuery = -1; VistaDBSQLQuery[] newQueries; lock(syncRoot) { for(int i = 0; i < queries.Length; i++) { if( queries[i] == query ) { indexQuery = i; break; } } if(indexQuery < 0) return false; queries[indexQuery].FreeQuery(); newQueries = new VistaDBSQLQuery[queries.Length - 1]; for(int i = 0; i < newQueries.Length; i++) { if( i < indexQuery ) newQueries[i] = queries[i]; else newQueries[i] = queries[i + 1]; } queries = newQueries; } return true; }
/// <summary> /// Internal. Create new query for this connection. /// </summary> /// <returns></returns> internal VistaDBSQLQuery NewSQLQuery() { VistaDBSQLQuery query; VistaDBSQLQuery[] newQueries; query = new VistaDBSQLQuery(this); lock(syncRoot) { newQueries = new VistaDBSQLQuery[queries.Length + 1]; for(int i = 0; i < queries.Length; i++ ) { newQueries[i] = queries[i]; } queries = newQueries; queries[queries.GetUpperBound(0)] = query; } return query; }