stephencelis / SQLite.swift

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

Codable - Add Date support #872

Closed christianroman closed 3 years ago

christianroman commented 5 years ago

All tests passed.

tulioccalazans commented 5 years ago

When will this PR merged?

dennis-alpine commented 3 years ago

I had made this enhancement exactly like yours, then found this fork. But, I do have a question about line 136 in Coding.swift:

self.encoder.setters.append(Expression(key.stringValue) <- date.datatypeValue)

why did you do date.datatypeValue instead of as below?

self.encoder.setters.append(Expression(key.stringValue) <- date)