Build the base SELECT statement.
@return {String} The SELECT partial
343510
function buildSelectPartial() {
        var query = "SELECT ";
        query += self.sSelectSql ? self.sSelectSql : "*";
        query += " FROM ";
        query += self.sFromSql ? self.sFromSql : self.sTableName;
        return query;
    }
755788
function (sql) {
            var values = this.__opts.values;
            if (isArray(values) && !values.length) {
                return " ()";
            } else {
                return this._super(arguments);
            }
        }
694161
private static String buildJmolSelection(ResidueNumber[] residues) {
		StringBuilder cmd = new StringBuilder("select ");
		for(ResidueNumber res : residues) {
			if(res != null) {
				cmd.append(String.format("%d^%s:%s.CA or ", res.getSeqNum(),
						res.getInsCode()==null?" ":res.getInsCode(),
								res.getChainName()));
			}
		}
		cmd.append("none;");//easier than removing the railing 'or'
		return cmd.toString();
	}
999106
private function buildSelectColumns()
    {
        $columns = array();

        foreach ($this->query['select'] as $column => $as) {
            // Normal column select
            if (is_numeric($column)) {
                $columns[] = $this->columnName($as);
            }
            // Alias
            else {
                $columns[] = $this->columnName($column) . " AS `{$as}`";
            }
        }

        // Join columns and return
        return implode(', ', $columns);
    }
368026
function() {
    var container = document.createElement('mutation');
    var isStatement = !this.outputConnection;
    container.setAttribute('statement', isStatement);
    var isAt = this.getInput('AT').type == Blockly.INPUT_VALUE;
    container.setAttribute('at', isAt);
    return container;
  }
1237264
function() {
    var allOptions = this.dropdown.options;
    
    // Look for multiple selections
    if(this.multiple) {
        var values = [],
            i=0, j=allOptions.length;
        for(; i<j; i++) {
            if(allOptions[i].selected) {
                values.push(allOptions[i].value);
            }
        }
        return values;
    }
    // Only need to look for single selection
    else {
        return allOptions[allOptions.selectedIndex].value;
    }
}
1256079
protected function buildSelect()
	{
		//define a container fields array
		$fields = array();

		//
		$where = $order = $limit = $join ="";

		//
		$template = "SELECT %s %s FROM %s %s %s %s %s";

		//loop through the fields
		foreach ($this->fields as $table => $tableFields) 
		{
			//loop through the fields checking for aliases
			foreach ($tableFields as $field => $alias) 
			{
				//if field is string, return field name
				if ( is_string($field) && $field != 'COUNT(1)')
				{
					//add to fields array
					$fields[] = "{$table}.{$field} AS {$alias}";

				}
				elseif (is_string($field) && $field == 'COUNT(1)') 
				{
					//add to fields array
					$fields[] = "{$field} AS {$alias}";

				}
				//not an array, return alias
				else
				{
					//get alias as field name
					$fields[] = "{$table}.{$alias}";

				}

			}

		}

		//turn the fields into a string
		$fields = join(", ", $fields);

		//get the query joins
		$queryJoin = $this->joins;

		//check if the join parameter is empty
		if ( ! empty($queryJoin) ) 
		{
			$joinTables = "(" . join(", ", $queryJoin['tables']) . ")";
			$joinConditions = "(" . join(" AND ", $queryJoin['conditions']) . ")";
			//add the joins
			$join = " LEFT JOIN $joinTables ON $joinConditions";

		}

		//get the where clause
		$queryWhere = $this->wheres;

		//check if the wheres clause is empty
		if ( ! empty($queryWhere) ) 
		{
			//append where clause
			$joined = join(" AND ", $queryWhere);

			//assign string to $where var
			$where = "WHERE {$joined}";

		}

		//get the order clause
		$queryOrder = $this->orders;

		//check if the orders clause is empty
		if ( ! empty($queryOrder) ) 
		{
			//get the direction if order
			$orderDirection = $this->directions;

			//assign string to order variable
			$order = "ORDER BY {$queryOrder} {$orderDirection}";

		}

		//get the limits clause
		$queryLimit = $this->limits;

		//check if the limits clause is empty
		if ( ! empty($queryLimit) ) 
		{
			//get the offset
			$limitOffset = $this->offset;

			//if offset has been defined
			if ( $limitOffset ) 
			{
				//get the limit string with offset
				$limit = "LIMIT {$limitOffset}, {$queryLimit}";

			}
			//limit offset undefined
			else
			{
				//get the limit string
				$limit = "LIMIT {$queryLimit}";

			}

		}

		//return the formated query string in the format of $template
		return sprintf($template, $this->distinct, $fields, $this->froms, $join, $where, $order, $limit);

	}
1037663
protected function translateSelect()
    {
        // normal or distinct selection?
        $build = ($this->attr('distinct') ? 'select distinct' : 'select') . ' ';

        // build the selected fields 
        $fields = $this->attr('fields');

        if (!empty($fields)) 
        {
            foreach ($fields as $key => $field) 
            {
                list($column, $alias) = $field;

                if (!is_null($alias)) 
                {
                    $build .= $this->escape($column) . ' as ' . $this->escape($alias);
                }
                else 
                {
                    $build .= $this->escape($column);
                }

                $build .= ', ';
            }

            $build = substr($build, 0, -2);
        } 
        else 
        {
            $build .= '*';
        }

        // append the table
        $build .= ' from ' . $this->escapeTable();

        // build the join statements
        if ($this->attr('joins'))
        {
            $build .= $this->translateJoins();
        }

        // build the where statements
        if ($wheres = $this->attr('wheres'))
        {
            $build .= $this->translateWhere($wheres);
        }

        // build the groups
        if ($this->attr('groups'))
        {
            $build .= $this->translateGroupBy();
        }

        // build the order statement
        if ($this->attr('orders'))
        {
            $build .= $this->translateOrderBy();
        }
    
        // build offset and limit
        if ($this->attr('limit') || $this->attr('offset'))
        {
            $build .= $this->translateLimitWithOffset();
        }

        return $build;
    }
625323
protected function buildSelect()
    {
        if (empty($this->sqlParts['select'])) {
            $this->sqlParts['select'] = ['*'];
        }

        $builder = $this->getLookupBuilder();
        $columns = [];
        foreach ($this->sqlParts['select'] as $alias => $column) {
            if ($column instanceof Aggregation) {
                $columns[$alias] = $this->buildSelectFromAggregation($column);
            } elseif (is_string($column)) {
                if (false !== strpos($column, 'SELECT')) {
                    $columns[$alias] = $column;
                } else {
                    $columns[$alias] = $this->addColumnAlias($builder->fetchColumnName($column));
                }
            } else {
                $columns[$alias] = $column;
            }
        }

        $selectSql = $this->sqlParts['distinct'] ? 'SELECT DISTINCT ' : 'SELECT ';
        if (empty($columns)) {
            return $selectSql.'*';
        }

        if (false === is_array($columns)) {
            $columns = [$columns];
        }

        $select = [];
        foreach ($columns as $column => $subQuery) {
            if ($subQuery instanceof ToSqlInterface) {
                $subQuery = $subQuery->toSQL();
            } else {
                $subQuery = $this->getAdapter()->quoteSql($subQuery);
            }

            if (is_numeric($column)) {
                $column = $subQuery;
                $subQuery = '';
            }

            if (!empty($subQuery)) {
                if (false !== strpos($subQuery, 'SELECT')) {
                    $value = $this->columnAs(
                        '('.$subQuery.')',
                        $this->getQuotedName($column)
                    );
                } else {
                    $value = $this->columnAs(
                        $this->getQuotedName($subQuery),
                        $this->getQuotedName($column)
                    );
                }
            } else {
                $value = $this->normalizeColumns($column);
            }
            $select[] = $value;
        }

        return $selectSql.implode(', ', $select);
    }
1296633
function() {
            var selector = this.options.valueSelector;
            if (_.isFunction(selector)) {
                this.value = selector(this);
            } else if (_.isString(selector)) {
                this.value = this[selector]();
            } else {
                this.value = selector;
            }
            return this.value;
        }
752590
public function GetSelect() {
      // Close off any open query elements.
      $this->_EndQuery();
      
      $Sql = (!$this->_Distinct) ? 'select ' : 'select distinct ';

      // Don't escape the field if it is numeric or an asterisk (all columns)
      $Selects = array();
      foreach($this->_Selects as $Key => $Expr) {
         $Field = $Expr['Field'];
         $Function = $Expr['Function'];
         $Alias = $Expr['Alias'];
         $CaseOptions = ArrayValue('CaseOptions', $Expr);
         if ($Field != '*' && !is_numeric($Field))
            $Field = $this->EscapeIdentifier($Field);

         if ($Alias == '' && $Function != '')
            $Alias = $Field;

         // if (in_array(strtolower($Function), array('max', 'min', 'avg', 'sum', 'count')))
         if ($Function != '') {
				if(strpos($Function, '%s') !== FALSE)
					$Field = sprintf($Function, $Field);
				else
					$Field = $Function.'('.$Field.')';
			}

         if ($CaseOptions !== FALSE)
            $Field = 'case ' . $Field . $CaseOptions . ' end';

         if ($Alias != '')
            $Field .= ' as '.$this->QuoteIdentifier($Alias);

         if ($Field != '')
            $Selects[] = $Field;
      }
      $Sql .= (count($Selects) == 0) ? '*' : implode(', ', $Selects);

      if (count($this->_Froms) > 0)
         $Sql .= "\nfrom ".$this->_FromTables($this->_Froms);

      if (count($this->_Joins) > 0) {
         $Sql .= "\n";
         $Sql .= implode("\n", $this->_Joins);
      }

      if (count($this->_Wheres) > 0)
         $Sql .= "\nwhere ";

      $Sql .= implode("\n", $this->_Wheres);

      // Close any where groups that were left open.
      for ($i = 0; $i < $this->_OpenWhereGroupCount; ++$i) {
         $Sql .= ')';
      }
      $this->_OpenWhereGroupCount = 0;

      if (count($this->_GroupBys) > 0) {
         $Sql .= "\ngroup by ";

         // special consideration for table aliases
         if (count($this->_AliasMap) > 0 && $this->Database->DatabasePrefix)
            $Sql .= implode(', ', $this->_FilterTableAliases($this->_GroupBys));
         else
            $Sql .= implode(', ', $this->_GroupBys);
      }

      if (count($this->_Havings) > 0)
         $Sql .= "\nhaving ".implode("\n", $this->_Havings);

      if (count($this->_OrderBys) > 0)
         $Sql .= "\norder by ".implode(', ', $this->_OrderBys);

      if (is_numeric($this->_Limit)) {
         $Sql .= "\n";
         $Sql = $this->GetLimit($Sql, $this->_Limit, $this->_Offset);
      }

      return $Sql;
   }
281833
protected function getBaseSelect($count = FALSE)
    {
        $select = 'SELECT ';
        if ($count) {
            $select .= 'SQL_CALC_FOUND_ROWS ';
        }
        $select .= $this->getBaseSelector() . ' FROM ' . $this->getBaseTable();
        return $select;
    }
1277097
private function getSQLForSelect()
    {
        $query = 'SELECT ' . implode(', ', $this->sqlParts['select']);

        $query .= ($this->sqlParts['from'] ? ' FROM ' . implode(', ', $this->getFromClauses()) : '')
            . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : '')
            . ($this->sqlParts['groupBy'] ? ' GROUP BY ' . implode(', ', $this->sqlParts['groupBy']) : '')
            . ($this->sqlParts['having'] !== null ? ' HAVING ' . ((string) $this->sqlParts['having']) : '')
            . ($this->sqlParts['orderBy'] ? ' ORDER BY ' . implode(', ', $this->sqlParts['orderBy']) : '');

        if ($this->isLimitQuery()) {
            return $this->connection->getDatabasePlatform()->modifyLimitQuery(
                $query,
                $this->maxResults,
                $this->firstResult
            );
        }

        return $query;
    }
1115114
public function rawSelectAll()
        {
            $query = new Query($this);
            $query->generateSelectSQL(true);

            return Statement::getPreparedStatement($query)->execute();
        }
742667
function Select(el, options) {
      _classCallCheck(this, Select);

      // Don't init if browser default version
      var _this16 = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, Select, el, options));

      if (_this16.$el.hasClass('browser-default')) {
        return _possibleConstructorReturn(_this16);
      }

      _this16.el.M_Select = _this16;

      /**
       * Options for the select
       * @member Select#options
       */
      _this16.options = $.extend({}, Select.defaults, options);

      _this16.isMultiple = _this16.$el.prop('multiple');

      // Setup
      _this16.el.tabIndex = -1;
      _this16._keysSelected = {};
      _this16._valueDict = {}; // Maps key to original and generated option element.
      _this16._setupDropdown();

      _this16._setupEventHandlers();
      return _this16;
    }
390742
function() {
  var src = config.paths.src;
  var out = config.paths.out;

  src.base = src.base || 'src/';
  src.styles = src.styles || 'styles/';
  src.scripts = src.scripts || 'scripts/';
  src.esnextExtension = src.esnextExtension || '.es6';
  src.views = src.templates || '../views/';
  src.partials = src.partials !== null ? src.partials : 'partials/';

  out.base = out.base || 'public/';

  var processed = {
    src: {
      styles: src.base + src.styles + '**/*' + plugins.styles.ext,
      scripts: src.base + src.scripts,
      es6: src.base + src.scripts + '**/*' + src.esnextExtension,
      esnextExt: src.esnextExtension,
      js: src.base + src.scripts + '**/*.js',
      views: src.base + src.views + '**/*',
      partials: src.base + src.views + src.partials + '**/*' + plugins.tpls.ext,
      tmp: src.base + 'temp/'
    },
    out: {
      base: out.base,
      styles: out.base + (out.styles || 'css/'),
      js: out.base + (out.scripts || 'js/')
    }
  };

  return processed;
}
177234
public function getSelect()
    {
        if (null === $this->_select) {
            $db = $this->getAdapter();

            /**
             * Build select object
             */
            $select = new \Zend_Db_Select($db);
            $select->from('gems__surveys', array('gsu_export_code'))
                    ->where('gsu_export_code = ?')
                    ->where('gsu_id_survey NOT IN (?)', implode(', ', $this->_tested))
                    ->limit(1);

            // \MUtil_Echo::track($select->__toString());
            $this->_select = $select;
        }
        return $this->_select;
    }