[Adapdev-commits] Adapdev/src/Adapdev.Data/Sql OracleSelectQuery.cs,1.1,1.2
Status: Beta
Brought to you by:
intesar66
From: Sean M. <int...@us...> - 2005-06-02 03:26:09
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28755/src/Adapdev.Data/Sql Modified Files: OracleSelectQuery.cs Log Message: Updated OracleSelectQuery to properly handle SetLimit Updated CrypoTests to pass Modified SmartTreeView to track state of nodes across reloads Small modifications to the caching block Index: OracleSelectQuery.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/OracleSelectQuery.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OracleSelectQuery.cs 11 Apr 2005 11:24:06 -0000 1.1 --- OracleSelectQuery.cs 2 Jun 2005 03:26:00 -0000 1.2 *************** *** 11,14 **** --- 11,31 ---- } + protected override string GetLimit() + { + if(this.maxRecords > 0) + { + return " ROWNUM <= " + this.maxRecords; + } + return ""; + } + + public override string GetText() + { + string sql = "SELECT " + this.GetLimit() + this.GetColumns() + " FROM " + this._table + this._join + this.GetCriteria(); + if(sql.ToLower().IndexOf("where") < 1) sql+= " WHERE "; + else sql += " AND "; + sql += this.GetLimit() + this.GetOrderBy() + this.GetGroupBy(); + return sql; + } } } \ No newline at end of file |