Skip to content

Grammar

Josh Wright edited this page Jan 14, 2021 · 3 revisions

Grammar

Used for compiling query builders into raw SQL statements.

open class Grammar

Methods

compileSelect(query:)

open func compileSelect(query: Query) throws -> SQL

compileJoins(_:joins:)

open func compileJoins(_ query: Query, joins: [JoinClause]?) -> SQL?

compileGroups(_:groups:)

open func compileGroups(_ query: Query, groups: [String]) -> SQL?

compileHavings(_:)

open func compileHavings(_ query: Query) -> SQL?

compileOrders(_:orders:)

open func compileOrders(_ query: Query, orders: [OrderClause]) -> SQL?

compileLimit(_:limit:)

open func compileLimit(_ query: Query, limit: Int?) -> SQL?

compileOffset(_:offset:)

open func compileOffset(_ query: Query, offset: Int?) -> SQL?

compileInsert(_:values:)

open func compileInsert(_ query: Query, values: [OrderedDictionary<String, Parameter>]) throws -> SQL

compileUpdate(_:values:)

open func compileUpdate(_ query: Query, values: [String: Parameter]) throws -> SQL

compileUpdateColumns(_:values:)

open func compileUpdateColumns(_ query: Query, values: [String: Parameter]) -> SQL

compileDelete(_:)

open func compileDelete(_ query: Query) throws -> SQL

compileCreate(table:ifNotExists:columns:)

open func compileCreate(table: String, ifNotExists: Bool, columns: [CreateColumn]) -> SQL

compileRename(table:to:)

open func compileRename(table: String, to: String) -> SQL

compileDrop(table:)

open func compileDrop(table: String) -> SQL

compileAlter(table:dropColumns:addColumns:)

open func compileAlter(table: String, dropColumns: [String], addColumns: [CreateColumn]) -> [SQL]

compileRenameColumn(table:column:to:)

open func compileRenameColumn(table: String, column: String, to: String) -> SQL

compileCreateIndexes(table:indexes:)

open func compileCreateIndexes(table: String, indexes: [CreateIndex]) -> [SQL]

compileDropIndex(table:indexName:)

open func compileDropIndex(table: String, indexName: String) -> SQL

typeString(for:)

open func typeString(for type: ColumnType) -> String

jsonLiteral(from:)

open func jsonLiteral(from jsonString: String) -> String
Alchemy
Types
Protocols
Global Typealiases
Global Variables
Global Functions
Fusion
Types
Protocols
Papyrus
Types
Protocols
Clone this wiki locally