Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MySQLCRUD.swift #56

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.0
// swift-tools-version:4.2
// Package.swift
// Perfect-MySQL
//
Expand Down Expand Up @@ -31,7 +31,7 @@ let package = Package(
.library(name: "PerfectMySQL", targets: ["PerfectMySQL"])
],
dependencies: [
.package(url: "https://github.com/PerfectlySoft/Perfect-CRUD.git", from: "1.2.2"),
.package(url: "https://github.com/PerfectlySoft/Perfect-CRUD.git", from: "1.2.3"),
.package(url: "https://github.com/PerfectlySoft/\(clientPackage).git", from: "2.0.0"),
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/PerfectMySQL/MySQLCRUD.swift
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public struct MySQLDatabaseConfiguration: DatabaseConfigurationProtocol {
}

public func sqlExeDelegate(forSQL: String) throws -> SQLExeDelegate {
let noPrepCommands = ["CREATE", "DROP", "ALTER", "BEGIN", "COMMIT", "ROLLBACK"]
let noPrepCommands = ["CREATE", "DROP", "ALTER", "BEGIN", "COMMIT", "ROLLBACK", "LOCK", "UNLOCK"]
if nil != noPrepCommands.first(where: { forSQL.hasPrefix($0) }) {
return MySQLDirectExeDelegate(connection: connection, sql: forSQL)
}
Expand Down