stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.64k stars 1.56k forks source link

Referring to a database from one view controller in another view controller #1005

Closed AdvaithRege closed 4 years ago

AdvaithRege commented 4 years ago

Issue

I'm using the latest SQLite.swift on the latest xcode. I'm new to Swift and ran into an issue. I created a database in one view controller. What I need to do is access the database in another view controller, and update a specific user based on a clicked button. I was just wondering how to open up the database in another view controller and access the users and the attributes (so I can update it (ex. update the email)). Thanks!