Returns a new DataTable with rows only where the value at
        `fieldname` == `value`.
969071
def where(self, fieldname, value, negate=False):
        
        if negate:
            return self.mask([elem != value
                              for elem in self[fieldname]])
        else:
            return self.mask([elem == value
                              for elem in self[fieldname]])
775897
def comparable(self):
    """"""
    string_parts = []

    string_parts.append('table name: {0:s}'.format(self.table_name))
    string_parts.append('column name: {0:s}'.format(self.column_name))

    if self.row_condition is not None:
      row_condition_string = ' '.join([
          '{0!s}'.format(value) for value in self.row_condition])
      string_parts.append('row condition: "{0:s}"'.format(
          row_condition_string))

    if self.row_index is not None:
      string_parts.append('row index: {0:d}'.format(self.row_index))

    return self._GetComparable(sub_comparable_string=', '.join(string_parts))
1299144
def select(self, cols, mode='list'):
        
        if isinstance(cols, stringtypes):
            cols = _split_cols(cols)
        if not cols:
            cols = [f.name for f in self.fields]
        return select_rows(cols, self, mode=mode)
187671
def row(self, fields):
        """"""

        d = self.dict

        row = [None] * len(fields)

        for i, f in enumerate(fields):
            if f in d:
                row[i] = d[f]

        return row
411337
def select(table, index_track, field_name, op, value, includeMissing):
    '''
    '''
    result = []
    result_index = []
    counter = 0
    for row in table:
        if detect_fields(field_name, convert_to_dict(row)):
            final_value = get_value(row, field_name)
            if do_op(final_value, op, value):
                result.append(row)
                result_index.append(index_track[counter])
        else:
            if includeMissing:
                result.append(row)
                result_index.append(index_track[counter])
        counter += 1
    #table = result
    #index_track = result_index
    return (result, result_index)
1004997
def isequal(self, fieldname, value, places=7):
        
        return isequal(self, fieldname, value, places=places)
1680
def filter_by(self, **kwargs):
        
        query = self._copy()
        for field, value in kwargs.items():
            query.domain.append(
                (field, '=', value)
            )
        return query
186353
public Where<T, ID> ge(String columnName, Object value) throws SQLException {
		addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
				SimpleComparison.GREATER_THAN_EQUAL_TO_OPERATION));
		return this;
	}
135130
public DataRow findRowIgnoreCase(int columnIndex, String value)
	{
		for (DataRow dataRow : dataRows)
		{
			String columnValue = (String) dataRow.getColumn(columnIndex);
			if (value.equalsIgnoreCase(columnValue))
			{
				return dataRow;
			}
		}
		return null;
	}
760439
public DataTable createRow(String... values) throws TooManyColumnsException {
		rows.add(new DataRow(columns).setAll(values));
		return this;
	}
1057772
public Where<T, ID> gt(String columnName, Object value) throws SQLException {
		addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
				SimpleComparison.GREATER_THAN_OPERATION));
		return this;
	}
641104
def doSQLInsert(sqlString)
   
      sql = sqlString.dup
      dbname = ""
      state = nil
      fieldName = ""
      fieldValue = ""
      fieldNames = []
      fieldValues = []
      index = 0
      
      clearFieldValuePairList
      
      sql.gsub!("("," ")
      sql.gsub!(")"," ")

      sql.split(' ').each{ |token|
         case token
            when "INSERT", "INTO" 
               state = "getTable"
               next
            when "VALUES" 
               state = "getFieldValue"
               next
         end
         if state == "getTable"
            dbname = token.strip
            state =   "getFieldName"
         elsif state  == "getFieldName" 
            fieldName = token.dup
            fieldName.gsub!("],","")
            fieldName.gsub!('[','')
            fieldName.gsub!(']','')
            fieldName.gsub!(',','')
            fieldNames << fieldName
         elsif state  == "getFieldValue" 
            test = token.dup
            if test[-1,1] == "'" or test[-2,2] == "',"
               fieldValue << token.dup
               if fieldValue[-2,2] == "',"
                  fieldValue.gsub!("',",'')
               end
               fieldValue.gsub!('\'','')
               if fieldValue.length > 0 and fieldNames[index] 
                  addFieldValuePair(fieldNames[index],nil,nil,fieldValue)
                  fieldName = ""
                  fieldValue = ""
               end
               index += 1
            elsif token == ","
               addFieldValuePair(fieldNames[index],nil,nil,"")
               fieldName = ""
               fieldValue = ""
               index += 1
            else
               fieldValue << "#{token.dup} "
            end
         end
      }
      
      if dbname and @dbid.nil?
         dbid = findDBByname( dbname )
      else
         dbid = lookupChdbid( dbname )
      end
      dbid ||= @dbid

      recordid = nil
      if dbid
         recordid,updateid = addRecord(dbid,@fvlist)
      end   
      recordid
      
   end
823212
def get(self, field_name, default=None):
        """"""
        checkFieldName(field_name)
        return self.data.get(field_name, default)
889003
public CmsDataViewFilter copyWithValue(String value) {

        return new CmsDataViewFilter(m_id, m_niceName, m_helpText, m_options, value);
    }
1267046
@SuppressWarnings("deprecation")
    public static <T> DataSet newDataSet(Collection<String> columnNames, Collection<T> rowList) {
        if (N.isNullOrEmpty(columnNames) && N.isNullOrEmpty(rowList)) {
            // throw new IllegalArgumentException("Column name list and row list can not be both null or empty");
            return new RowDataSet(new ArrayList<String>(0), new ArrayList<List<Object>>(0));
        } else if (N.isNullOrEmpty(rowList)) {
            return new RowDataSet(new ArrayList<String>(columnNames), new ArrayList<List<Object>>(0));
        }

        final int rowSize = rowList.size();

        if (N.isNullOrEmpty(columnNames)) {
            final Set<String> columnNameSet = new LinkedHashSet<>();
            Set<Class<?>> clsSet = null;
            Map<Class<?>, Set<String>> clsSignedPropNameSetMap = new HashMap<>();

            Class<?> cls = null;
            Type<?> type = null;

            for (Object e : rowList) {
                if (e == null) {
                    continue;
                }

                cls = e.getClass();
                type = N.typeOf(cls);

                if (type.isMap()) {
                    columnNameSet.addAll(((Map<String, Object>) e).keySet());
                } else if (type.isEntity()) {
                    if (e instanceof DirtyMarker) {
                        Set<String> clsSignedPropNameSet = clsSignedPropNameSetMap.get(cls);

                        if (clsSignedPropNameSet == null) {
                            clsSignedPropNameSet = new HashSet<>();
                            clsSignedPropNameSetMap.put(cls, clsSignedPropNameSet);
                        }

                        Method method = null;

                        for (String signedPropName : ((DirtyMarker) e).signedPropNames()) {
                            if (clsSignedPropNameSet.add(signedPropName) == false) {
                                continue;
                            }

                            method = ClassUtil.getPropGetMethod(cls, signedPropName);

                            if (method != null) {
                                columnNameSet.add(ClassUtil.getPropNameByMethod(method));
                            }
                        }
                    } else {
                        if (clsSet == null) {
                            clsSet = new HashSet<>();
                        }

                        if (clsSet.contains(cls)) {
                            continue;
                        }

                        columnNameSet.addAll(ClassUtil.checkPropGetMethodList(cls).keySet());
                        clsSet.add(cls);
                    }
                } else {
                    throw new IllegalArgumentException("'columnNameList' is required if the sepcified row type is not Entity or Map");
                }
            }

            // re-order column.
            for (Map.Entry<Class<?>, Set<String>> entry : clsSignedPropNameSetMap.entrySet()) {
                final List<String> intersecion = N.intersection(ClassUtil.getPropGetMethodList(entry.getKey()).keySet(), columnNameSet);
                columnNameSet.removeAll(intersecion);
                columnNameSet.addAll(intersecion);
            }

            columnNames = new ArrayList<>(columnNameSet);

            if (N.isNullOrEmpty(columnNames)) {
                throw new IllegalArgumentException("Column name list can not be obtained from row list because it's empty or null");
            }
        }

        final int columnCount = columnNames.size();
        final List<String> columnNameList = new ArrayList<>(columnNames);
        final List<List<Object>> columnList = new ArrayList<>(columnCount);
        for (int i = 0; i < columnCount; i++) {
            columnList.add(new ArrayList<>(rowSize));
        }

        Type<?> type = null;
        for (Object e : rowList) {
            if (e == null) {
                for (int i = 0; i < columnCount; i++) {
                    columnList.get(i).add(null);
                }

                continue;
            }

            type = N.typeOf(e.getClass());

            if (type.isMap()) {
                Map<String, Object> props = (Map<String, Object>) e;

                for (int i = 0; i < columnCount; i++) {
                    columnList.get(i).add(props.get(columnNameList.get(i)));
                }
            } else if (type.isEntity()) {
                Class<?> cls = e.getClass();

                Method method = null;
                for (int i = 0; i < columnCount; i++) {
                    method = ClassUtil.getPropGetMethod(cls, columnNameList.get(i));

                    if (method == null) {
                        columnList.get(i).add(null);
                    } else {
                        columnList.get(i).add(ClassUtil.getPropValue(e, method));
                    }
                }
            } else if (type.isArray()) {
                if (type.isPrimitiveArray()) {
                    for (int i = 0; i < columnCount; i++) {
                        columnList.get(i).add(Array.get(e, i));
                    }
                } else {
                    Object[] array = (Object[]) e;

                    for (int i = 0; i < columnCount; i++) {
                        columnList.get(i).add(array[i]);
                    }
                }
            } else if (type.isCollection()) {
                final Iterator<Object> it = ((Collection<Object>) e).iterator();

                for (int i = 0; i < columnCount; i++) {
                    columnList.get(i).add(it.next());
                }
            } else {
                throw new IllegalArgumentException(
                        "Unsupported row type: " + ClassUtil.getCanonicalClassName(e.getClass()) + ". Only array, collection, map and entity are supported");
            }
        }

        return new RowDataSet(columnNameList, columnList);
    }
770826
public Where<T, ID> ne(String columnName, Object value) throws SQLException {
		addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
				SimpleComparison.NOT_EQUAL_TO_OPERATION));
		return this;
	}
279142
private Map<String, Object> buildFieldValues(String property, String value) {
		Map<String, Object> fieldValues = new HashMap<String, Object>();
		fieldValues.put(COLUMN_PROPERTY, property);
		fieldValues.put(COLUMN_VALUE, value);
		return fieldValues;
	}