0

Working on a swift project, I wanna use sqlite3 for data base. I have read many articles in which they used to follow FMDB.Instead of using that, is there any other alternate ways ??
In Objective C, they created instance for sqlite3 which is declared as typedef struct like

sqlite3 *db;


and they used this instance through the program to access the database.
Similarly how can I create an instance for typedef struct in Swift ?????

nhgrif
  • 61,578
  • 25
  • 134
  • 173

1 Answers1

0

This is the structure type in Swift

struct sqlite3 {
    var width = 0
    var height = 0
}

And instance example:

var db: sqlite3 = sqlite3()
ridvankucuk
  • 2,407
  • 1
  • 23
  • 41