Skip to content

Instantly share code, notes, and snippets.

@identity2
Created June 8, 2019 05:15
Show Gist options
  • Save identity2/09c8b80833d8ed86d71983fd1e16914d to your computer and use it in GitHub Desktop.
Save identity2/09c8b80833d8ed86d71983fd1e16914d to your computer and use it in GitHub Desktop.
add contact
func addContact(_ contact: Contact) {
let queryString = "INSERT INTO Contact (ID, Name, Phone, City) VALUES (\(contact.id), \(contact.name), \(contact.phoneNumber), \(contact.city))"
mainDB!.executeUpdate(queryString, withArgumentsIn: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment