/*! generates delete sql

@param data
DataAction object
@param request
DataRequestConfig object
@return
sql string, which delete record
192193
protected function delete_query($data,$request){
		$sql="DELETE FROM ".$request->get_source();
		$sql.=" WHERE ".$this->escape_name($this->config->id["db_name"])."='".$this->escape($data->get_id())."'";
		
		//if we have limited set - set constraints
		$where=$this->build_where($request->get_filters());
		if ($where) $sql.=" AND (".$where.")";
		
		return $sql;
	}
980712
@Override
	public synchronized void delete(int type, String url) throws DatabaseException {
    	try {
			psDeleteUrls.setInt(1, type);
			psDeleteUrls.setString(2, url);
			psDeleteUrls.executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		}
    }
1340735
private void remove(final String id, final StringBuilder sql) {
        sql.append("DELETE FROM ").append(getName()).append(" WHERE ").append(JdbcRepositories.getDefaultKeyName()).append(" = '").
                append(id).append("'");
    }
1041456
public int delete(String sql, Object value) {
        Class<?> parameterType = value != null ? value.getClass() : null;
        String msId = msUtils.deleteDynamic(sql, parameterType);
        return sqlSession.delete(msId, value);
    }
232048
@SuppressWarnings("unchecked")
	@Override
	public <E> SqlEntityDelete<E> delete(final Class<? extends E> entityType) {
		@SuppressWarnings("rawtypes")
		EntityHandler handler = this.getEntityHandler();
		if (!handler.getEntityType().isAssignableFrom(entityType)) {
			throw new IllegalArgumentException("Entity type not supported");
		}

		try {
			TableMetadata metadata = handler.getMetadata(this.transactionManager, entityType);

			SqlContext context = handler.createDeleteContext(this, metadata, entityType, false);
			context.setSqlKind(SqlKind.DELETE);

			return new SqlEntityDeleteImpl<>(this, handler, metadata, context);
		} catch (SQLException e) {
			throw new EntitySqlRuntimeException(SqlKind.DELETE, e);
		}
	}
622466
def DeleteRequest(self, request):
    """"""
    self.requests_to_delete.append(request)

    if request and request.HasField("request"):
      self.DeQueueClientRequest(request.request)

    data_store.DB.DeleteRequest(request)
384535
@Override
	public int delete(DataColumnConstraints dataColumnConstraints)
			throws SQLException {

		DeleteBuilder<DataColumnConstraints, Void> db = deleteBuilder();

		setUniqueWhere(db.where(), dataColumnConstraints.getConstraintName(),
				dataColumnConstraints.getConstraintType(),
				dataColumnConstraints.getValue());

		int deleted = db.delete();

		return deleted;
	}
105795
public String generateSqlDelete(String tableName) {
        try {
            return cacheSQLs.get("DELETE:" + tableName, () -> {
                return MessageFormat.format("DELETE FROM {0} WHERE {1}", tableName,
                        strWherePkClause);
            });
        } catch (ExecutionException e) {
            throw new DaoException(e);
        }
    }
1252705
public DeleteUsers deleteUsers(String dbid) throws ApiException {
        ApiResponse<DeleteUsers> resp = deleteUsersWithHttpInfo(dbid);
        return resp.getData();
    }
1334207
@DELETE
  @Path("me")
  @RolesAllowed({"ROLE_ADMIN", "ROLE_USER"})
  public Response delete(@Context HttpServletRequest request) {
    Long userId = (Long) request.getAttribute(OAuth2Filter.NAME_USER_ID);
    return delete(userId);
  }
1335791
public int deleteAll() throws SQLException {

		DeleteBuilder<Extensions, Void> db = deleteBuilder();
		int deleted = db.delete();

		return deleted;
	}
772750
protected function update_query($data,$request){
		$sql="UPDATE ".$request->get_source()." SET ";
		$temp=array();
		for ($i=0; $i < sizeof($this->config->text); $i++) { 
			$step=$this->config->text[$i];
			
			if ($data->get_value($step["name"])===Null)
				$step_value ="Null";
			else
				$step_value = "'".$this->escape($data->get_value($step["name"]))."'";
			$temp[$i]= $this->escape_name($step["db_name"])."=". $step_value;
		}
		if ($relation = $this->config->relation_id["db_name"]){
			$temp[]= $this->escape_name($relation)."='".$this->escape($data->get_value($relation))."'";
		}
		$sql.=implode(",",$temp)." WHERE ".$this->escape_name($this->config->id["db_name"])."='".$this->escape($data->get_id())."'";
		
		//if we have limited set - set constraints
		$where=$this->build_where($request->get_filters());
		if ($where) $sql.=" AND (".$where.")";
		
		return $sql;
	}
582770
public String delete(final Object obj) {
    final PersistMeta meta = EntityUtil.getMeta(obj.getClass());
    return new SQL() {
      {
        DELETE_FROM(getTableName(meta, obj));
        WHERE("id=#{id}");
      }
    }.toString();
  }
719086
@Override
	public synchronized void delete(long historyId, String tag) throws DatabaseException {
    	SqlPreparedStatementWrapper psDeleteTag = null;
        try {
        	psDeleteTag = DbSQL.getSingleton().getPreparedStatement("tag.ps.delete");
			psDeleteTag.getPs().setLong(1, historyId);
			psDeleteTag.getPs().setString(2, tag);
			psDeleteTag.getPs().executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psDeleteTag);
		}
    }
664046
public String delete(String path, Response data) {
		return request("DELETE", path, data, getDefaultOptions());
	}
519861
@Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        int result = -1;

        if (!controller.hasPreinitialized()) {
            throw new IllegalStateException("Controller has not been initialized.");
        }

        int patternCode = controller.getUriMatcher().match(uri);
        MatcherPattern pattern = controller.findMatcherPattern(patternCode);
        if (pattern == null) {
            throw new IllegalArgumentException("unknown uri : " + uri.toString());
        }

        Parameter parameter = new Parameter(uri, selection, selectionArgs);
        SQLiteDatabase db = this.getHelper().getWritableDatabase();

        result = onDelete(this.getHelper(), db, pattern, parameter);
        if (result >= 0) {
            this.onDeleteCompleted(result, uri, pattern, parameter);
        }
        return result;
    }
949512
static QueryMeta buildDeleteSql(ActiveRecord activeRecord) {
        QueryMeta     queryMeta = new QueryMeta();
        StringBuilder sqlBuf    = new StringBuilder("DELETE FROM " + activeRecord.getTableName());

        int[]        pos  = {1};
        List<Object> list = parseWhere(activeRecord, pos, sqlBuf);

        if (activeRecord.whereValues.isEmpty()) {
            throw new RuntimeException("Delete operation must take conditions.");
        } else {
            if (sqlBuf.indexOf(Const.SPACE + Const.SQL_WHERE + Const.SPACE) == -1) {
                sqlBuf.append(Const.SPACE + Const.SQL_WHERE + Const.SPACE);
            }
        }

        List<Object> temp = andWhere(activeRecord, pos, sqlBuf);
        if (null != temp) {
            list.addAll(temp);
        }

        String sql = sqlBuf.toString();

        sql = sql.replace(", WHERE", " WHERE").replace("AND  OR", "OR");
        if (sql.endsWith(Const.SQL_AND + Const.SPACE)) {
            sql = sql.substring(0, sql.length() - 5);
        }

        Object[] args = list.toArray();
        queryMeta.setSql(sql);
        queryMeta.setParams(args);
        return queryMeta;
    }