配置精确索引列。如：
 class SomeModel
   include Unidom::Common::Concerns::ExactColumn
   exact_column :phone_number, :identification_number
 end
180638
def exact_column(*names)

      exact_column_names = exact_column_names||[]
      exact_column_names += names

      names.each do |name|
        name = name.to_s
        instance_eval do
          scope :"#{name}_is", ->(value) { where "#{name}_exact_signature" => exact_signature(self, name, value) }
          before_save do send "#{name}_exact_signature=", self.class.exact_signature(self.class, name, send(name)) end
        end
      end

    end
1065629
def +(other)
      case other
      when Offset
        Offset.new(self.line + other.line, self.column + other.column)
      when Integer
        Offset.new(self.line + other, self.column)
      else
        raise ArgumentError, "can't convert #{other} into #{self.class}"
      end
    end
499150
function _fnAddColumn( oSettings, nTh )
		{
			var oDefaults = DataTable.defaults.columns;
			var iCol = oSettings.aoColumns.length;
			var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {
				"sSortingClass": oSettings.oClasses.sSortable,
				"sSortingClassJUI": oSettings.oClasses.sSortJUI,
				"nTh": nTh ? nTh : document.createElement('th'),
				"sTitle":    oDefaults.sTitle    ? oDefaults.sTitle    : nTh ? nTh.innerHTML : '',
				"aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],
				"mDataProp": oDefaults.mDataProp ? oDefaults.oDefaults : iCol
			} );
			oSettings.aoColumns.push( oCol );
			
			/* Add a column specific filter */
			if ( oSettings.aoPreSearchCols[ iCol ] === undefined || oSettings.aoPreSearchCols[ iCol ] === null )
			{
				oSettings.aoPreSearchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch );
			}
			else
			{
				var oPre = oSettings.aoPreSearchCols[ iCol ];
				
				/* Don't require that the user must specify bRegex, bSmart or bCaseInsensitive */
				if ( oPre.bRegex === undefined )
				{
					oPre.bRegex = true;
				}
				
				if ( oPre.bSmart === undefined )
				{
					oPre.bSmart = true;
				}
				
				if ( oPre.bCaseInsensitive === undefined )
				{
					oPre.bCaseInsensitive = true;
				}
			}
			
			/* Use the column options function to initialise classes etc */
			_fnColumnOptions( oSettings, iCol, null );
		}
1337879
function() {
		var columndefs = inputEx.widget.dtInPlaceEdit.superclass.setColumnDefs.call(this);
		
		// index fields declaration by keys
		var fieldsByKey = {};
		for(var k = 0 ; k < this.options.fields.length ; k++) {
		   
		   // Retro-compatibility with inputParms
         if (lang.isObject(this.options.fields[k].inputParams)) {
            fieldsByKey[this.options.fields[k].inputParams.name] = this.options.fields[k];
         // New prefered way to use options of a field
         } else {
            fieldsByKey[this.options.fields[k].name] = this.options.fields[k];
         }
		   
		}
		for(var i = 0 ; i < columndefs.length ; i++) {
			var columnDef = columndefs[i];
			if( YAHOO.lang.isUndefined(columnDef.editor) && !!fieldsByKey[columnDef.key] ) {
	          columnDef.editor = new inputEx.widget.CellEditor(fieldsByKey[columnDef.key]);
	      }
		}
		
		return columndefs;
	}
912463
function(columnNames) {
        var columnModel = this.columnModel;
        var mergedColumnNames = _.pluck(columnModel.get('complexHeaderColumns'), 'name');

        return _.filter(mergedColumnNames, function(mergedColumnName) {
            var unitColumnNames = columnModel.getUnitColumnNamesIfMerged(mergedColumnName);

            return _.every(unitColumnNames, function(name) {
                return _.contains(columnNames, name);
            });
        });
    }
463499
def prev_column
      # TODO take care of multipliers
      _calculate_column_offsets unless @coffsets
      c = @column_pointer.previous
      cp = @coffsets[c]
      #$log.debug " prev #{c} , #{cp} "
      @curpos = cp if cp
      up() if c > @column_pointer.last_index
      fire_column_event :ENTER_COLUMN
    end
1251904
def column_label(col_or_sym)
      col_name =
          case col_or_sym
          when String, Symbol
            col_or_sym
          else
            col_or_sym.name
          end
      @controller_model ||= controller.send(:model)
      I18n.t(col_name,
          scope:    "view.#{controller_path}.#{@controller_model.name.underscore}",
          default:  @controller_model.human_attribute_name(col_name))
    end
1306038
void checkColumnsMatch(int[] col, Table other, int[] othercol) {

        for (int i = 0; i < col.length; i++) {
            Type type      = colTypes[col[i]];
            Type otherType = other.colTypes[othercol[i]];

            if (type.typeComparisonGroup != otherType.typeComparisonGroup) {
                throw Error.error(ErrorCode.X_42562);
            }
        }
    }
1143894
def exact(self, column, *values):
        
        df = self._exact(column, *values)
        if df is None:
            self.err("Can not select exact data")
        self.df = df
588676
function smooshColumn(addressesCol, newCol) {
  if (!defined(newCol)) {
    return;
  }
  if (newCol.values.length === addressesCol.values.length) {
    for (var i = 0; i < addressesCol.values.length; i++) {
      if (addressesCol.values[i] !== null && newCol.values[i] !== null) {
        addressesCol.values[i] =
          addressesCol.values[i] + " " + newCol.values[i];
      }
    }
  }
}
1359540
def column
      cast_type = ActiveRecord::Base.connection.lookup_cast_type(definition)
      @column ||= self.class.column_factory.new(
        name,
        default_value,
        cast_type,
        definition,
        null_value
      )
    end
313090
void resolveColumnReferencesInGroupBy() {
        if (unresolvedExpressions == null || unresolvedExpressions.isEmpty()) {
            return;
        }

        /**
         * Hsql HashSet does not work properly to remove duplicates, I doubt the hash
         * function or equal function on expression work properly or something else
         * is wrong. So use list
         *
         */
        // resolve GROUP BY columns/expressions
        HsqlList newUnresolvedExpressions = new ArrayListIdentity();

        int size = unresolvedExpressions.size();
        for (int i = 0; i < size; i++) {
            Object obj = unresolvedExpressions.get(i);
            newUnresolvedExpressions.add(obj);
            if (i + 1 < size && obj == unresolvedExpressions.get(i+1)) {
                // unresolvedExpressions is a public member that can be accessed from anywhere and
                // I (xin) am 90% percent sure about the hsql adds the unresolved expression twice
                // together for our targeted GROUP BY alias case.
                // so we want to skip the repeated expression also.
                // For other unresolved expression, it may differs.
                i += 1;
            }
            if (obj instanceof ExpressionColumn == false) {
                continue;
            }
            ExpressionColumn element = (ExpressionColumn) obj;
            if (element.tableName != null) {
                // this alias does not belong to any table
                continue;
            }

            // group by alias which is thought as an column
            if (element.getType() != OpTypes.COLUMN) {
                continue;
            }

            // find the unsolved expression in the groupBy list
            int k = indexLimitVisible;
            int endGroupbyIndex = indexLimitVisible + groupByColumnCount;
            for (; k < endGroupbyIndex; k++) {
                if (element == exprColumns[k]) {
                    break;
                }
            }
            if (k == endGroupbyIndex) {
                // not found in selected list
                continue;
            }
            assert(exprColumns[k].getType() == OpTypes.COLUMN);

            ExpressionColumn exprCol = (ExpressionColumn) exprColumns[k];
            String alias = exprCol.getColumnName();
            if (alias == null) {
                // we should not handle this case (group by constants)
                continue;
            }

            // Find it in the SELECT list.  We need to look at all
            // the select list elements to see if there are more
            // than one.
            int matchcount = 0;
            for (int j = 0; j < indexLimitVisible; j++) {
                Expression selectCol = exprColumns[j];
                if (selectCol.alias == null) {
                    // columns referenced by their alias must have an alias
                    continue;
                }
                if (alias.equals(selectCol.alias.name)) {
                    matchcount += 1;
                    // This may be an alias to an aggregate
                    // column.  But we'll find that later, so
                    // don't check for it here.
                    exprColumns[k] = selectCol;
                    exprColumnList.set(k, selectCol);
                    if (matchcount == 1) {
                        newUnresolvedExpressions.remove(element);
                    }
                }
            }
            if (matchcount > 1) {
                throw new HsqlException(String.format("Group by expression \"%s\" is ambiguous", alias), "", 0);
            }
        }
        unresolvedExpressions = newUnresolvedExpressions;
    }
1011715
def content_columns
      model_name(@object).constantize.content_columns.collect { |c| c.name.to_sym }.compact rescue []
    end
881832
static Column getColumnAnnotation(Field f, Method set, Method get) {

        // 三个地方都有可能出现column
        Column column = f.getAnnotation(Column.class);
        // FIXME 如果不遵循java bean规范，get set 可能为 null，抛出NullPointerException
        Column gColumn = get.getAnnotation(Column.class);
        Column sColumn = set.getAnnotation(Column.class);

        // 预先获取出get与set所在的类
        Class<?> sClass = set.getDeclaringClass();
        Class<?> gClass = get.getDeclaringClass();

        // 如果get上定义了annotation，且get定义的地方是子类
        if (gColumn != null && !gClass.isAssignableFrom(sClass)) {
            return gColumn;
        }

        // 如果是set上定义的annotation，且set方法不在父类中定义
        if (sColumn != null && !sClass.isAssignableFrom(gClass)) {
            return sColumn;
        }

        return column;
    }
35681
private boolean isCounterColumnType(TableInfo tableInfo, String defaultValidationClass)
    {
        return (csmd != null && csmd.isCounterColumn(databaseName, tableInfo.getTableName()))
                || (defaultValidationClass != null
                        && (defaultValidationClass.equalsIgnoreCase(CounterColumnType.class.getSimpleName()) || defaultValidationClass
                                .equalsIgnoreCase(CounterColumnType.class.getName())) || (tableInfo.getType()
                        .equals(CounterColumnType.class.getSimpleName())));
    }
1217988
def column_type(col_name)
      cache = Cache.instance
      cache.klass_hash[@_klass_str] ||= {}
      if v = cache.klass_hash[@_klass_str][col_name.to_s]
        cache.hit += 1
        v
      else
        cache.miss += 1
        col = @_klass_str.constantize.columns.find{|c|
          c.name == col_name.to_s
        }
        if col
          cache.klass_hash[@_klass_str][col_name.to_s] = col.type
        end
      end
    end
797224
function(api, modelDefinition) {
		this.parentAPI = api;
		this.childModels = [];

		this.initialized = false;

		this.model = modelDefinition.model;
		this.path = this.model.tableName.toLowerCase();
		this.modelRouter = Express.Router();
		this.primaryKey = Helpers.getPrimaryKey(this.model);

		/**
		 * Array of valid columns in the class minus the primary key
		 * However the primary key is only 'not valid' to be set if it is
		 * marked as auto-generated.
		 */
		this.validColumns = _.keys(this.model.rawAttributes);

		if(this.model.rawAttributes[this.primaryKey]._autoGenerated)
			this.validColumns.splice(this.validColumns.indexOf(this.primaryKey), 1);

		this._initializeOptions(modelDefinition);
		this._initializeAssociationOptions(modelDefinition);
		this._initializeRoutes(modelDefinition);

		this.filter = Helpers.mergeTriplicate({
			// If this is filled out, don't allow these parameters to be used.
			blacklist: [],

			// If this is filled out, ONLY allow these parameters to be used.
			whitelist: [],

			// Include these fields in output
			include: [],

			// Exclude these fields from output
			exclude: []
		}, this.model.filter || {}, modelDefinition.filter || {});
	}