Commit Graph
62 Commits
Author SHA1 Message Date
Gwendal Roué 4e57bf5a0e Fix a youth error: DatabaseDateComponents initializer from DateComponents is no longer failable 2018-04-21 15:27:21 +02:00
Gwendal Roué 6c5d6ba631 SQLiteDateParser: tighten vsscanf format 2018-04-21 10:37:03 +02:00
Gwendal Roué 1311f6c87c SQLiteDateParser: fix nanosecond parsing 2018-04-21 10:17:07 +02:00
Gwendal Roué 632bce5521 SQLiteDateParser: don't parse garbage into nanoseconds 2018-04-20 19:41:34 +02:00
Gwendal Roué 316d28746b SQLiteDateParser: optimize nanoseconds parsing 2018-04-20 19:26:42 +02:00
Gwendal Roué 9efe4a6efa Add a sanity check 2018-04-20 19:18:46 +02:00
Gwendal Roué 85fbf64068 Add missing imports (should fix travis issues) 2018-04-20 19:17:24 +02:00
Gwendal Roué 282255b841 No need for useScanfStrategy any longer 2018-04-20 19:14:58 +02:00
Gwendal Roué 266040747e Date adopts StatementColumnConvertible 2018-04-20 18:42:12 +02:00
Gwendal Roué 11a4a6acbd Documentation 2018-04-20 18:41:58 +02:00
Gwendal Roué c70689fe54 Check useScanfStrategy in DatabaseDateComponents.init(sqliteStatement:index:)
...so that we can eventually compare gains
2018-04-20 18:34:19 +02:00
Gwendal Roué 936b31f1f0 DatabaseDateComponents adopts StatementColumnConvertible
We'll need benchmarks to evaluate the gain, here
2018-04-20 14:04:12 +02:00
Gwendal Roué 8915672ce5 SQLiteDateParser: parse C strings
Since the goal of this PR is efficiency, we'll soon parse Date and
DatabaseDateComponents right from raw SQLite buffers.
2018-04-20 13:51:20 +02:00
Gwendal Roué 0640f90fc1 (whitespace) 2018-04-20 13:32:50 +02:00
Gwendal Roué d1a0e8d906 SQLiteDateParser.components(from:) is not public 2018-04-20 13:31:57 +02:00
Gwendal Roué e9a668ca56 SQLiteDateParser: no more static methods 2018-04-20 13:31:35 +02:00
Gwendal Roué 27194c802d SQLiteDateParser: use withUnsafeMutablePointer instead of allocations
OK, not really: the nanosecond components remains in the heap.
But we may find a way to put 11 chars on the stack.
2018-04-20 13:30:26 +02:00
Gwendal Roué 7aabfeaeac SQLiteDateParser: get rid of the mutex 2018-04-20 13:09:22 +02:00
Matt Greenfield 3b546dedd8 truncate nanosecond precision to 3 sig figs 2018-04-17 15:17:09 +07:00
Matt Greenfield 33066133fc truncate date/time strings that include seconds precision beyond the nanosecond scale 2018-04-17 14:32:33 +07:00
Matt Greenfield dad163771f not all nanosecond fractions have 3 sig figs, so can't hard code the acceptable string lengths 2018-04-17 12:38:23 +07:00
Matt Greenfield bb59f5e6f7 0.123 is not the same thing as 0.000123 2018-04-17 11:05:47 +07:00
Matt Greenfield 7a1aa88edb fractions of seconds are not the same thing as integer counts of nanoseconds 2018-04-16 19:18:49 +07:00
Matt Greenfield b444d376f4 differentiate between SS and SS.SSS formats 2018-04-16 17:39:41 +07:00
Matt Greenfield 59d7909f50 return correct Format for partial date/time combinations 2018-04-16 17:21:00 +07:00
Matt Greenfield 362c4baeca initial scanf() based date string parser 2018-04-16 14:02:15 +07:00
Gwendal Roué 85d3c584ef Swift 4.1 compatibility (SE-0184 , SE-0187) 2018-03-12 18:20:10 +01:00
Gwendal Roué 247cbdd0d0 Date and NSDate interpret database numbers as unix timestamps. 2017-09-05 08:58:17 +02:00
Gwendal Roué 06a8c8b940 GRDB is now able to store and load zero-length blobs. 2017-09-03 10:09:00 +02:00
Gwendal Roué 2785e69fc1 Data adopts StatementColumnConvertible 2017-08-29 19:27:47 +02:00
Gwendal Roué dc75ca4caf SE-0166 2017-08-18 14:22:14 +02:00
Gwendal Roué 60e6c7d250 Remove DatabaseCoder 2017-06-20 07:54:19 +02:00
Gwendal Roué 973f38727d More Xcode-9 fixes 2017-06-09 06:44:26 +02:00
David Hart deaac5808d Make the bug-fix conditional to continue building on 3.1 2017-06-09 06:44:26 +02:00
David Hart 22dc01610e Fix compilation with Xcode 9 in compatibilty mode 2017-06-09 06:44:26 +02:00
Gwendal Roué 10e669423f Use the dbValue identifier for variables of type DatabaseValue 2017-06-01 08:35:14 +02:00
Andrey Fidrya 1751fb38e5 SPM support 2017-04-08 21:32:58 +03:00
Gwendal Roué 6bcab179d1 Classify all try! and fatalError into TODO, Programmer Error, or GRDB bug that needs to be fixed. 2016-11-30 08:56:45 +01:00
Gwendal Roué 628c375b8c Documentation 2016-10-10 15:31:05 +02:00
Gwendal Roué 027b1f711c URL, UUID and Date now adopt DatabaseValueConvertible through NSURL, NSUUID and NSDate, thanks to the new support for Foundation's ReferenceConvertible. 2016-10-08 16:54:32 +02:00
Gwendal Roué 5a572b25a0 Refactor the query interface types to enhance extensibility 2016-09-27 23:11:21 +02:00
Gwendal Roué 854c070b82 Xcode Version 8.0 beta 6 (8S201h) 2016-08-16 17:47:57 +02:00
Gwendal Roué 2d78d04d52 Update for Xcode Version 8.0 beta 4 (8S188o) 2016-08-01 22:33:50 +02:00
Gwendal Roué ebe147ee34 Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	GRDB.xcodeproj/project.pbxproj
	GRDB/Core/Row.swift
	README.md
	TODO.md
2016-08-01 18:47:42 +02:00
Gwendal Roué 0fb1eec3cd Row adopts DictionaryLiteralConvertible 2016-07-31 06:18:16 +02:00
Gwendal Roué ebdd6c5a4d Update for Xcode Version 8.0 beta 3 (8S174q) 2016-07-19 14:01:46 +02:00
Gwendal Roué 0c7cff5602 Update for Xcode Version 8.0 beta 2 (8S162m) 2016-07-07 05:30:43 +02:00
Gwendal Roué b624874768 Merge branch 'master' of github.com:groue/GRDB.swift into Swift3bis
Conflicts:
	GRDB.xcodeproj/project.pbxproj
	GRDB/Core/Database.swift
	GRDB/Core/DatabaseWriter.swift
	GRDB/Core/Statement.swift
	GRDB/FetchRequest/QueryInterfaceRequest.swift
	GRDB/FetchRequest/SQLCollation.swift
	GRDB/FetchRequest/SQLSelectQuery.swift
	GRDB/Record/FetchedRecordsController.swift
	README.md
	Tests/Private/StatementInformationTests.swift
	Tests/Public/Core/DatabaseValueConvertible/DatabaseValueConversionTests.swift
	Tests/Public/Core/SQLiteStatementConvertible/SQLiteStatementConversionTests.swift
2016-06-21 09:03:02 +02:00
Gwendal Roué cae3d7b321 Support for NSUUID 2016-06-20 22:37:31 +02:00
Gwendal Roué 181aea9aec Support for URL 2016-06-14 21:09:11 +02:00