field : alias name arguments selection_set
3555
def p_field_optional1_3(self, p):
        
        p[0] = Field(name=p[2], alias=p[1], arguments=p[3], selections=p[4])
917485
private static String join(List<Field> fields, String sep, String fieldPrefix) {
    	return joinAndGetValueForSelect(fields, sep, fieldPrefix);
    }
1323723
def _set_selectedLayerNames(self, value):
        
        select = [self.layers(name) for name in value]
        self.selectedLayers = select
596489
def derive_and_set_name_fields_and_slug(
            self, set_name_sort=True, set_slug=True
    ):
        
        # name_full is the primary required name field. It must be set.
        if is_empty(self.name_full):
            if not is_empty(self.name_display):
                self.name_full = self.name_display
            else:
                raise ValueError(
                    u"%s.name_full cannot be empty at save" % type(self).__name__)
        # if empty, `name_sort` == `name_full`
        if set_name_sort and is_empty(self.name_sort):
            self.name_sort = self.derive_sort_name()
        # if empty, `slug` is set to slugified `name_full`
        if set_slug and is_empty(self.slug):
            self.slug = slugify(self.name_display or self.name_full)
749461
def p_field_optional2_4(self, p):
        
        p[0] = Field(name=p[2], alias=p[1], selections=p[3])
1215897
def widget_kwargs_for_field(self, field_name):
        
        if self._meta.widgets:
            return self._meta.widgets.get(field_name, {})
        return {}
1353991
private void appendSelectionCriteria(TableAlias alias, PathInfo pathInfo, SelectionCriteria c, StringBuffer buf)
    {
        appendColName(alias, pathInfo, c.isTranslateAttribute(), buf);
        buf.append(c.getClause());
        appendParameter(c.getValue(), buf);
    }
886643
def p_field_optional1_4(self, p):
        
        p[0] = Field(name=p[2], alias=p[1], arguments=p[3], directives=p[4])
1032922
public function selectFields($fields, $tableAlias, &$join)
    {
        //
        if (!$fields) {
            return '*';
        } elseif (is_string($fields)) {
            return $fields;
        } elseif (!is_array($fields)) {
            static::error('selectFields require array');
        }

        //
        $join = '';

        //
        $aliasTable = [];

        //
        $selectFields = [];

        //
        foreach ($fields as $field => $definition) {
            if (is_numeric($field)) {
                $field = $definition;
                $definition = null;
            }

            //
            if (!$definition) {
                $selectFields[] = $this->selectFieldsSingletoneField(
                    $field,
                    $tableAlias
                );
                continue;
            }

            //
            if (is_string($definition)) {
                $selectFields[] = $definition.' AS '.$field;
                continue;
            }

            //
            if (is_array($definition)) {
                $class = $definition['Class'];

                //
                $aliasTable[$class] = isset($aliasTable[$class])
                                    ? $aliasTable[$class] + 1
                                    : 1;

                //
                $joinAlias = $aliasTable[$class] > 1
                           ? $class.''.$aliasTable[$class]
                           : $class;

                //
                $joinTable = $definition['Table'];

                //
                $joinKey = $joinAlias.'.'.$definition['JoinKey'];

                //
                $fieldFrom = $definition['FieldFrom'];

                if ($fieldFrom == '__FIELD__') {
                    $fieldFrom = $field;
                }

                //
                $join .= " LEFT JOIN {$joinTable} AS {$joinAlias}"
                       ." ON {$joinKey} = {$fieldFrom}";

                if (is_array($definition['FieldTo'])) {
                    foreach ($definition['FieldTo'] as $nextFieldTo) {
                        $fieldAlias = $field.'__'.$nextFieldTo;
                        $fieldTo = $joinAlias.'.'.$nextFieldTo;
                        $selectFields[] = $fieldTo.' AS '.$fieldAlias;
                    }
                }

                continue;
            }
        }

        return implode(', ', $selectFields);
    }
490354
def alias_setting(*keys, to: nil)
      flat_setting = flatten_keys(keys)
      alias_keys = Array(to)
      alias_key = flatten_keys(alias_keys)

      if alias_key == flat_setting
        raise ArgumentError, 'Alias matches setting key'
      end

      if fetch(alias_key)
        raise ArgumentError, 'Setting already exists with an alias ' \
                             "'#{alias_keys.map(&:inspect).join(', ')}'"
      end

      @aliases[alias_key] = flat_setting
    end
697492
def selectisinstance(table, field, value, complement=False):
    """"""

    return selectop(table, field, value, isinstance, complement=complement)
138920
function SqlSelect (model, args) {
    // capture input
    this.model = model
    this.args = _.cloneDeep(args)
    // make sure where is defined in args
    this.args.where = requireValidOptionalObject(this.args.where)

    // map of alias => table
    this.aliases = {}
    // map of table => alias - since the same table can be used multiple times
    // in query the canonical alias for a table is the one that data is being
    // selected from 
    this.tableAliases = {}

    // primary table name
    this.table = model.name
    // primary table alias
    this.alias = this.getAlias(this.table)

    // list of related model names joined on
    this.joinRelationNames = []
    // map of related models joined on with join config
    this.joinRelations = {}

    // list of columns to select
    this.select = []
    // list of join statements
    this.join = []
    // list of where statements
    this.where = []
    // list of order statements
    this.order = []
    // limit for query
    this.limit = undefined
    // offset for query
    this.offset = undefined

    // params for query placeholder => value
    this.params = {}

    // check if query is select by id
    this.checkSelectById()
    // check if query should select only ids
    this.checkSelectOnlyIds()

    // execute simple selectById if this is an id query with no extra flags
    if (this.isSelectById) {
        this.selectById()
    }
    // execute generic query builder
    else {
        // add access control checks
        this.addAccessControl()
        // build joins on relations
        this.buildJoinRelations()
        // build list of columns from the primary table to select
        this.buildSelect()
        // get the queried revision(s) of objects
        this.buildRevision()
        // build where args
        _.each(this.args.where, (value, name) => this.buildWhere(name, value))
        // build order args
        this.buildOrder()
        // build full sql SELECT statement
        this.buildSql()
    }
}
1332587
def alias_list(self, args: argparse.Namespace) -> None:
        """"""
        if args.name:
            for cur_name in utils.remove_duplicates(args.name):
                if cur_name in self.aliases:
                    self.poutput("alias create {} {}".format(cur_name, self.aliases[cur_name]))
                else:
                    self.perror("Alias '{}' not found".format(cur_name), traceback_war=False)
        else:
            sorted_aliases = utils.alphabetical_sort(self.aliases)
            for cur_alias in sorted_aliases:
                self.poutput("alias create {} {}".format(cur_alias, self.aliases[cur_alias]))
476352
def connection_field_ast(field)
      f_ast = field_ast(field, connection_arguments)
      return nil if f_ast.nil?
      edges_fields = [edges_field_ast(field.type.unwrap.get_field('edges'))]
      if f_ast.respond_to?(:merge) # GraphQL-Ruby 1.9+
        f_ast.merge(selections: f_ast.selections + edges_fields)
      else
        f_ast.selections.concat(edges_fields)
        f_ast
      end
    end
1169875
def names
      NAME_FIELDS.map { |k| has_field?(k) ? @fields[k].tokens : nil }.flatten.compact
    end
1016632
def select_by_field(self, base, field, value):
        """"""
        Ac = self.ACCES
        return groups.Collection(Ac(base, i) for i, row in self.items() if row[field] == value)
712627
def unique_field(self, field_name):
        """"""
        self.fields_set.options["unique"] = True
        return self.select_field(field_name)