You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQLite does not have an especific DATE/DATETIME column type, plus the user can store a iso8601 format on a TEXT column.
Trying to make a full export, the code below, does not match any posibility, so it ends up throwing an error. To solve it (I'm far for knowing what I'm doing) I added a date formatter to cover this possibility:
File: ExportToJson
var iso8601formatter = ISO8601DateFormatter()
class func createRowValues(values: [[String: Any]], pos: Int,
names: [String],
types: [String] ) throws -> [Any] {
var row: [Any] = []
for jpos in 0..<names.count {
if values[pos][names[jpos]] is String && (TEXTAFFINITY
.contains(types[jpos].components(separatedBy: "(")[0]
.uppercased())
|| BLOBAFFINITY.contains(types[jpos].uppercased())
|| NUMERICAFFINITY.contains(types[jpos].uppercased())
|| iso8601formatter.date(from: values[pos][names[jpos]] as! String) != nil
Expected behavior:
Just making the JSON export
Steps to reproduce:
Declare a column of type text and storing an iso8601 string like "2024-10-24T11:35:00Z"
Related code:
insert short code snippets here
Other information:
Capacitor doctor:
insert the output from `npx cap doctor` here
The text was updated successfully, but these errors were encountered:
Plugin version:
6.0.2
Platform(s):
iOS
Current behavior:
SQLite does not have an especific DATE/DATETIME column type, plus the user can store a iso8601 format on a TEXT column.
Trying to make a full export, the code below, does not match any posibility, so it ends up throwing an error. To solve it (I'm far for knowing what I'm doing) I added a date formatter to cover this possibility:
File: ExportToJson
var iso8601formatter = ISO8601DateFormatter()
Expected behavior:
Just making the JSON export
Steps to reproduce:
Declare a column of type text and storing an iso8601 string like "2024-10-24T11:35:00Z"
Related code:
Other information:
Capacitor doctor:
The text was updated successfully, but these errors were encountered: