mercredi 22 avril 2015

SQLite.swift: Best way to implement model classes representing rows of a given table?

This is only question I've asked (so far) that doesn't need much/any explanation.

I had got as far as this with solving it:

  • each class might have an initialiseTable() kind of like function which would be called when the DB schema is initialised?
  • Static constants in each class for column Expression<T>

I guess the part I'm pondering about most is filling instances of model classes with Query results.

As always, thanks in advance for help :)

Link to the awesome SQLite.swift for those who haven't come across it yet.

Aucun commentaire:

Enregistrer un commentaire