Creates a planner for SQL commands. To change how the planner works,
modify this method.

@return the system's planner for SQL commands
436614
public static Planner newPlanner() {
		QueryPlanner qplanner;
		UpdatePlanner uplanner;

		try {
			qplanner = (QueryPlanner) queryPlannerCls.newInstance();
			uplanner = (UpdatePlanner) updatePlannerCls.newInstance();
		} catch (InstantiationException | IllegalAccessException e) {
			e.printStackTrace();
			return null;
		}

		return new Planner(qplanner, uplanner);
	}
1073836
public CliCommandBuilder setCommands(final Iterable<String> commands) {
        if (commands == null) {
            addCliArgument(CliArgument.COMMANDS, null);
            return this;
        }
        final StringBuilder cmds = new StringBuilder();
        for (final Iterator<String> iterator = commands.iterator(); iterator.hasNext(); ) {
            cmds.append(iterator.next());
            if (iterator.hasNext()) cmds.append(',');
        }
        addCliArgument(CliArgument.COMMANDS, cmds.toString());
        return this;
    }
1106444
@Programmatic
    @Override
    public Command create() {
        CommandJdo command = factoryService.instantiate(CommandJdo.class);
        command.setExecutor(Executor.OTHER);
        command.setPersistence(Persistence.IF_HINTED);
        return command;
    }
804969
private static CommandLine createCommandLine(DeploymentEntry deployment, Options commandLineOptions) {
		try {
			return deployment.getCommandLine(commandLineOptions);
		} catch (Exception e) {
			throw new SqlExecutionException("Invalid deployment options.", e);
		}
	}
1275799
protected PlanNode createCanonicalPlan( QueryContext context,
                                            SetQuery query ) {
        // Process the left and right parts of the query ...
        PlanNode left = createPlan(context, query.getLeft());
        PlanNode right = createPlan(context, query.getRight());

        // Wrap in a set operation node ...
        PlanNode plan = new PlanNode(Type.SET_OPERATION);
        plan.addChildren(left, right);
        plan.setProperty(Property.SET_OPERATION, query.operation());
        plan.setProperty(Property.SET_USE_ALL, query.isAll());

        // Process the orderings and limits ...
        plan = attachSorting(context, plan, query.orderings());
        plan = attachLimits(context, plan, query.getLimits());

        // Capture if we're limiting the results to 1 row and no offset and no sorting ...
        if (query.getLimits().isLimitedToSingleRowWithNoOffset() && query.orderings().isEmpty()) {
            context.getHints().isExistsQuery = true;
        }
        return plan;
    }
405702
public SqlBuilder orderBy(final List<Order> orders) {
    if (null != orders) {
      this.orders.addAll(orders);
    }
    return this;
  }
1287257
@NotNull
    public CommandExecutor build() {
        return new DefaultCommandExecutor(
                logger!=null ? logger : defaultLogger,
                cache!=null ? cache : new ExecutorCache(),
                extensions==null ? Collections.<ModeExtension>emptyList() : extensions
        );
    }
352153
public PreparedStatement getPreparedStatement(final SqlContext sqlContext) throws SQLException {
		Optional<LocalTransactionContext> txContext = currentTxContext();
		if (txContext.isPresent()) {
			return txContext.get().getPreparedStatement(sqlContext);
		} else {
			if (!this.unmanagedTransaction.isPresent()) {
				this.unmanagedTransaction = Optional
						.of(new LocalTransactionContext(this.connectionSupplier, this.sqlFilterManager));
			}
			return this.unmanagedTransaction.get().getPreparedStatement(sqlContext);
		}
	}
823522
protected static Map<String, WriteToBigQuery.FieldInfo<KV<String, Integer>>>
      configureGlobalWindowBigQueryWrite() {

    Map<String, WriteToBigQuery.FieldInfo<KV<String, Integer>>> tableConfigure =
        configureBigQueryWrite();
    tableConfigure.put(
        "processing_time",
        new WriteToBigQuery.FieldInfo<>(
            "STRING", (c, w) -> GameConstants.DATE_TIME_FORMATTER.print(Instant.now())));
    return tableConfigure;
  }
1161683
public static function master()
	{
		static $master = null;
		if (is_null($master)) $master = new SqlMaster(self::$ds_master);
		return $master;
	}
86381
String createDeleteAllPreparedSQLStatement() {

        final StringGrabber sgSQL = new StringGrabber();

        // Get the table name
        final DBTable table = mModelClazz.getAnnotation(DBTable.class);
        final String tableName = table.tableName();

        sgSQL.append("DELETE FROM " + tableName);

        return sgSQL.toString();
    }
33346
protected void appendSQL(final String _tablePrefix,
                             final StringBuilder _cmd)
    {
        if (sections.size() > 0) {
            if (isStarted()) {
                new SQLSelectPart(SQLPart.AND).appendSQL(_cmd);
                new SQLSelectPart(SQLPart.SPACE).appendSQL(_cmd);
            } else {
                new SQLSelectPart(SQLPart.WHERE).appendSQL(_cmd);
                new SQLSelectPart(SQLPart.SPACE).appendSQL(_cmd);
            }
            addSectionsSQL(_tablePrefix, _cmd, sections);
        }
    }
950190
public function SqlBuilder()
    {
        if (!$this->builder)
            $this->builder = new Sql\Builder($this->Connection());
        
        return $this->builder;
    }
132466
public WebDriver build() {
    if (options.isEmpty() && additionalCapabilities.isEmpty()) {
      throw new SessionNotCreatedException("Refusing to create session without any capabilities");
    }

    Plan plan = getPlan();

    CommandExecutor executor;
    if (plan.isUsingDriverService()) {
      AtomicReference<DriverService> serviceRef = new AtomicReference<>();

      executor = new SpecCompliantExecutor(
          () -> {
            if (serviceRef.get() != null && serviceRef.get().isRunning()) {
              throw new SessionNotCreatedException(
                  "Attempt to start the underlying service more than once");
            }
            try {
              DriverService service = plan.getDriverService();
              serviceRef.set(service);
              service.start();
              return service.getUrl();
            } catch (IOException e) {
              throw new SessionNotCreatedException(e.getMessage(), e);
            }
          },
          plan::writePayload,
          () -> serviceRef.get().stop());
    } else {
      executor = new SpecCompliantExecutor(() -> remoteHost, plan::writePayload, () -> {});
    }

    return new RemoteWebDriver(executor, new ImmutableCapabilities());
  }
492304
public PreparedStatementCreator count(final Dialect dialect) {
        return new PreparedStatementCreator() {
            public PreparedStatement createPreparedStatement(Connection con)
            throws SQLException {
                return getPreparedStatementCreator()
                .setSql(dialect.createCountSelect(builder.toString()))
                .createPreparedStatement(con);
            }
        };
    }
1182464
public String buildAllDataSql()
    {
        String sql="select * from ${tablename} ";
        String tablename= ModelHelper.getTableName(this.getClass());
        sql= StringUtil.replace(sql,"${tablename}",tablename);
        return sql;
    }
320580
protected function sql()
    {
        if ( null === $this->sql )
        {
            $this->sql = new Sql(
                $this->getDbAdapter(),
                $this->getTableInSchema( 'settings' )
            );
        }

        return $this->sql;
    }