Overrides the Query method get_compiler in order to return
            an instance of the above custom compiler.
495458
def get_compiler(self, using=None, connection=None):
        
        # Copy the body of this method from Django except the final
        # return statement. We will ignore code coverage for this.
        if using is None and connection is None:  # pragma: no cover
            raise ValueError("Need either using or connection")
        if using:
            connection = connections[using]
        # Check that the compiler will be able to execute the query
        for alias, aggregate in self.annotation_select.items():
            connection.ops.check_expression_support(aggregate)
        # Instantiate the custom compiler.
        return {
            CTEUpdateQuery: CTEUpdateQueryCompiler,
            CTEInsertQuery: CTEInsertQueryCompiler,
            CTEDeleteQuery: CTEDeleteQueryCompiler,
            CTEAggregateQuery: CTEAggregateQueryCompiler,
        }.get(self.__class__, CTEQueryCompiler)(self, connection, using)
227804
def compile_string(string, compiler_class=Compiler, **kwargs):
    
    compiler = compiler_class(**kwargs)
    return compiler.compile_string(string)
581468
public function getCompiler()
    {
        if (!$this->compiler instanceof AbstractCompiler) {
            if (null === $this->compiler) {
                throw new \Exception('Compiler not set');
            }
            $compiler = $this->getView()->getHelperPluginManager()->getServiceLocator()->get($this->compiler);
            if (!$compiler instanceof AbstractCompiler) {
                throw new \Exception(sprintf(
                    'Invalid compiler type: %s not instance of Spork\CSS\AbstractCompiler',
                    is_object($compiler) ? get_class($compiler) : gettype($compiler)));
            }
            $this->compiler = $compiler;
        }
        
        return $this->compiler;
    }
718382
def compile_select(self, query):
        
        sql = super(MySqlQueryGrammar, self).compile_select(query)

        if query.unions:
            sql = '(%s) %s' % (sql, self._compile_unions(query))

        return sql
982024
protected synchronized Object getCompiledExpression() {
        if (compiledExpression == null) {
            try {
                compiledExpression = Ognl.parseExpression(getExpression());
            }
            catch (OgnlException e) {
                throw new IllegalArgumentException("[" + getExpression() + "] is not a valid OGNL expression", e);
            }
        }
        return compiledExpression;
    }
310743
public function get()
    {
        $compiler = new ClassCompiler(
            $this->className,
            $this->niceMock,
            $this->constructorArgs,
            $this->disableConstructor,
            $this->disableClone
        );
        if ($this->customClassName) {
            $compiler->setCustomClassName($this->customClassName);
        }
        $compiler->setRules($this->rules);
        foreach ($this->expose as $method) {
            $compiler->addExpose($method);
        }
        $mockInstance = $compiler->newInstance();
        $this->testCase->addMockInstance($this, $mockInstance);
        $this->restoreState($mockInstance);

        foreach ($this->properties as $name => $value) {
            $this->testCase->setProperty($mockInstance, $name, $value);
        }

        return $mockInstance;
    }
1247146
def compile(self, source, options={}):
    
    options = dict(options)
    if "paths" in options:
      options["paths"] += self.paths
    else:
      options["paths"] = self.paths

    if "compress" not in options:
      options["compress"] = self.compress

    return self.context.call("compiler", source, options, self.plugins, self.imports)
1235773
def get_method(self, name):
        
        # TODO could use a generator here
        prog = re.compile(name)
        l = []
        for i in self.get_classes():
            for j in i.get_methods():
                if prog.match(j.get_name()):
                    l.append(j)
        return l
12543
private function getNamedCompiler($compiler)
    {
        if (!isset($this->namedCompilers[$compiler])) {
            $this->namedCompilers[$compiler] = new $compiler($this);
        }

        return $this->namedCompilers[$compiler];
    }
169723
protected Serializable getCompiledExpression() {
        if (compiledExpression == null) {
            compiledExpression = MVEL.compileExpression(getExpression(), PARSER_CONTEXT);
        }
        return compiledExpression;
    }
348643
def emit_code_from_ir(sql_query_tree, compiler_metadata):
    
    context = CompilationContext(
        query_path_to_selectable=dict(),
        query_path_to_location_info=sql_query_tree.query_path_to_location_info,
        query_path_to_output_fields=sql_query_tree.query_path_to_output_fields,
        query_path_to_filters=sql_query_tree.query_path_to_filters,
        query_path_to_node=sql_query_tree.query_path_to_node,
        compiler_metadata=compiler_metadata,
    )

    return _query_tree_to_query(sql_query_tree.root, context)
989685
private function getCompileFunction()
    {
        switch (strtolower($this->sqlOperation)) {
            case self::QUERY_TYPE_INSERT:
                return 'compileInsert';
                break;

            case 'insertgetid':
                return 'compileInsertGetId';
                break;

            case self::QUERY_TYPE_UPDATE:
                return 'compileUpdate';
                break;

            case self::QUERY_TYPE_DELETE:
                return 'compileDelete';
                break;

            case self::QUERY_TYPE_TRUNCATE:
                return 'compileTruncate';
                break;

            default:
                return 'compileSelect';
                break;
        }
    }
1082545
public static CompileStates instance(Context context) {
        CompileStates instance = context.get(compileStatesKey);
        if (instance == null) {
            instance = new CompileStates(context);
        }
        return instance;
    }
280784
def get_preparer(mixed: Union[SQLCompiler, Engine,
                              Dialect]) -> IdentifierPreparer:
    
    dialect = get_dialect(mixed)
    # noinspection PyUnresolvedReferences
    return dialect.preparer(dialect)
175669
def compile(self):
        
        # Can't tell if this is a hack or not. Revisit later
        self.context.set_query(self)

        # If any subqueries, translate them and add to beginning of query as
        # part of the WITH section
        with_frag = self.format_subqueries()

        # SELECT
        select_frag = self.format_select_set()

        # FROM, JOIN, UNION
        from_frag = self.format_table_set()

        # WHERE
        where_frag = self.format_where()

        # GROUP BY and HAVING
        groupby_frag = self.format_group_by()

        # ORDER BY
        order_frag = self.format_order_by()

        # LIMIT
        limit_frag = self.format_limit()

        # Glue together the query fragments and return
        query = '\n'.join(
            filter(
                None,
                [
                    with_frag,
                    select_frag,
                    from_frag,
                    where_frag,
                    groupby_frag,
                    order_frag,
                    limit_frag,
                ],
            )
        )
        return query
71925
public Compiler createCompiler() {
        if (jspCompiler != null ) {
            return jspCompiler;
        }
        jspCompiler = null;
        if (options.getCompilerClassName() != null) {
            jspCompiler = createCompiler(options.getCompilerClassName());
        } else {
            if (options.getCompiler() == null) {
                jspCompiler = createCompiler("org.apache.jasper.compiler.JDTCompiler");
                if (jspCompiler == null) {
                    jspCompiler = createCompiler("org.apache.jasper.compiler.AntCompiler");
                }
            } else {
                jspCompiler = createCompiler("org.apache.jasper.compiler.AntCompiler");
                if (jspCompiler == null) {
                    jspCompiler = createCompiler("org.apache.jasper.compiler.JDTCompiler");
                }
            }
        }
        if (jspCompiler == null) {
            throw new IllegalStateException(Localizer.getMessage("jsp.error.compiler.config",
                    options.getCompilerClassName(), options.getCompiler()));
        }
        jspCompiler.init(this, jsw);
        return jspCompiler;
    }
907702
protected function getCompileService()
    {
        if ($this->compileService === null) {
            $this->compileService = GeneralUtility::makeInstance(CompileService::class);
        }
        return $this->compileService;
    }