mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.2.1.1
This commit is contained in:
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.dbs; import gplx.*;
|
||||
import gplx.criterias.*;
|
||||
import gplx.core.criterias.*;
|
||||
import gplx.lists.*; /*GfoNde*/
|
||||
class TdbDeleteWkr implements Db_qryWkr {
|
||||
public Object Exec(Db_engine engineObj, Db_qry cmdObj) {
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.dbs; import gplx.*;
|
||||
import gplx.criterias.*; import gplx.dbs.sqls.*;
|
||||
import gplx.core.criterias.*; import gplx.dbs.sqls.*;
|
||||
import gplx.lists.*; /*ComparerAble*/ import gplx.stores.*; /*GfoNdeRdr*/
|
||||
class TdbSelectWkr implements Db_qryWkr {
|
||||
public Object Exec(Db_engine engineObj, Db_qry cmdObj) {
|
||||
@@ -24,7 +24,7 @@ class TdbSelectWkr implements Db_qryWkr {
|
||||
if (cmd.From().Tbls().Count() > 1) throw Err_.new_key_("gplx.tdbs", "joins not supported for tdbs").Add("sql", cmd.Xto_sql());
|
||||
|
||||
TdbTable tbl = engine.FetchTbl(cmd.From().BaseTable().TblName());
|
||||
GfoNdeList rv = (cmd.Where() == Db_qry_.WhereAll && cmd.Limit() == Db_qry_select.Limit_disabled) ? rv = tbl.Rows() : FilterRecords(tbl, cmd.Where().Crt(), cmd.Limit());
|
||||
GfoNdeList rv = (cmd.Where() == Db_qry_.WhereAll && cmd.Limit() == Db_qry_select.Limit_disabled) ? rv = tbl.Rows() : FilterRecords(tbl, cmd.Where(), cmd.Limit());
|
||||
if (cmd.GroupBy() != null)
|
||||
rv = TdbGroupByWkr.GroupByExec(cmd, rv, tbl);
|
||||
if (cmd.OrderBy() != null) { // don't use null pattern here; if null ORDER BY, then don't call .Sort on GfoNdeList
|
||||
|
||||
@@ -16,15 +16,15 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.dbs; import gplx.*;
|
||||
import gplx.criterias.*;
|
||||
import gplx.core.criterias.*;
|
||||
import gplx.lists.*; /*GfoNde*/
|
||||
class TdbUpdateWkr implements Db_qryWkr {
|
||||
public Object Exec(Db_engine engineObj, Db_qry cmdObj) {
|
||||
TdbEngine engine = TdbEngine.cast_(engineObj); Db_qry_update cmd = (Db_qry_update)cmdObj;
|
||||
|
||||
int rv = 0;
|
||||
TdbTable tbl = engine.FetchTbl(cmd.BaseTable());
|
||||
Criteria crt = cmd.Where().Crt();
|
||||
TdbTable tbl = engine.FetchTbl(cmd.Base_table());
|
||||
Criteria crt = cmd.Where();
|
||||
for (int i = 0; i < tbl.Rows().Count(); i++) {
|
||||
GfoNde row = (GfoNde)tbl.Rows().FetchAt_asGfoNde(i);
|
||||
if (crt.Matches(row)) {
|
||||
|
||||
Reference in New Issue
Block a user