-
Notifications
You must be signed in to change notification settings - Fork 14
Grammar
Josh Wright edited this page Jan 14, 2021
·
3 revisions
Used for compiling query builders into raw SQL statements.
open class Grammar
open func compileSelect(query: Query) throws -> SQL
open func compileJoins(_ query: Query, joins: [JoinClause]?) -> SQL?
open func compileGroups(_ query: Query, groups: [String]) -> SQL?
open func compileHavings(_ query: Query) -> SQL?
open func compileOrders(_ query: Query, orders: [OrderClause]) -> SQL?
open func compileLimit(_ query: Query, limit: Int?) -> SQL?
open func compileOffset(_ query: Query, offset: Int?) -> SQL?
open func compileInsert(_ query: Query, values: [OrderedDictionary<String, Parameter>]) throws -> SQL
open func compileUpdate(_ query: Query, values: [String: Parameter]) throws -> SQL
open func compileUpdateColumns(_ query: Query, values: [String: Parameter]) -> SQL
open func compileDelete(_ query: Query) throws -> SQL
open func compileCreate(table: String, ifNotExists: Bool, columns: [CreateColumn]) -> SQL
open func compileRename(table: String, to: String) -> SQL
open func compileDrop(table: String) -> SQL
open func compileAlter(table: String, dropColumns: [String], addColumns: [CreateColumn]) -> [SQL]
open func compileRenameColumn(table: String, column: String, to: String) -> SQL
open func compileCreateIndexes(table: String, indexes: [CreateIndex]) -> [SQL]
open func compileDropIndex(table: String, indexName: String) -> SQL
open func typeString(for type: ColumnType) -> String
open func jsonLiteral(from jsonString: String) -> String
Generated at 2021-01-13T22:24:59-0800 using swift-doc 1.0.0-beta.5.
Alchemy
Types
- AlterTableBuilder
- BCryptDigest
- BasicAuthMiddleware
- BcryptError
- BelongsToRelationship
- CORSMiddleware
- CORSMiddleware.AllowOriginSetting
- CORSMiddleware.Configuration
- ColumnType
- CreateColumn
- CreateColumnBuilder
- CreateIndex
- CreateTableBuilder
- DatabaseConfig
- DatabaseError
- DatabaseField
- DatabaseKeyMappingStrategy
- DatabaseValue
- DayUnit
- Env
- FrequencyTyped
- Grammar
- HTTPAuth
- HTTPAuth.Basic
- HTTPAuth.Bearer
- HTTPBody
- HTTPError
- HasManyRelationship
- HasOneRelationship
- HasRelationship
- HourUnit
- JoinClause
- JoinType
- Launch
- Log
- MIMEType
- MinuteUnit
- ModelQuery
- MySQLDatabase
- Operator
- OrderClause
- OrderClause.Sort
- OrderedDictionary
- PapyrusClientError
- PathParameter
- PathParameter.DecodingError
- PostgresDatabase
- Query
- Request
- Response
- Router
- RuneError
- SQL
- SQLJSON
- Scheduler
- Schema
- SecondUnit
- Services
- Socket
- StaticFileMiddleware
- StringLength
- Thread
- TokenAuthMiddleware
- WeekUnit
- Weekday
- WhereBoolean
- WhereColumn
- WhereIn
- WhereIn.InType
- WhereNested
- WhereRaw
- WhereValue