adding joins struct

This commit is contained in:
Jonathan Guthrie 2016-09-25 00:18:06 -04:00
parent 9df8cb8623
commit 9b03d8b28c
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
//
// Joins.swift
// PerfectCRUD
//
// Created by Jonathan Guthrie on 2016-09-24.
//
//
import Foundation
public struct DataSourceJoin {
public var table: String = ""
public var direction: JoinType
public var onCondition: String = ""
public init() {
direction = .normal
}
public init(table: String, onCondition: String = "", direction: JoinType = .normal) {
self.table = table
self.direction = direction
self.onCondition = onCondition
}
}
public enum JoinType {
case INNER
case OUTER
case LEFT
case RIGHT
case STRAIGHT
case normal
}