 	init(_ sql: String) throws {
 		let parser = SQLParser()
 		if !parser.parse(sql) {
-			throw SQLStatementError.syntaxError
+			throw SQLStatementError.syntaxError(query: sql)
 		}
 
 		// Top-level item must be a statement
 		guard let root = parser.root, case .statement(let statement) = root else {
-			throw SQLStatementError.syntaxError
+			throw SQLStatementError.invalidRootError
 		}
 
 		self = statement


struct SQLSchema {
	var columns = OrderedDictionary<SQLColumn, SQLType>()
}

struct SQLSelect {

	var name: String

	func sql(dialect: SQLDialect) -> String {
		return dialect.columnIdentifier(name.lowercased())
	}

	var hashValue: Int {
