MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / MyCompiler

Class MyCompiler

test/sql/test_compiler.py:547–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545 s2 = select(s1).limit(10)
546
547 class MyCompiler(compiler.SQLCompiler):
548 def get_select_precolumns(self, select, **kw):
549 result = ""
550 if select._limit:
551 result += "FIRST %s " % self.process(
552 literal(select._limit), **kw
553 )
554 if select._offset:
555 result += "SKIP %s " % self.process(
556 literal(select._offset), **kw
557 )
558 return result
559
560 def limit_clause(self, select, **kw):
561 return ""
562
563 dialect = default.DefaultDialect()
564 dialect.statement_compiler = MyCompiler

Callers 1

test_nested_apiMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_nested_apiMethod · 0.56