Commit Graph
8949 Commits
Author SHA1 Message Date
Gwendal Roué 82482bdbf7 Date adopts StatementColumnConvertible 2018-06-07 08:36:29 +02:00
Gwendal Roué 062f916607 Documentation 2018-06-07 08:36:29 +02:00
Gwendal Roué 2b73c4f348 Check useScanfStrategy in DatabaseDateComponents.init(sqliteStatement:index:)
...so that we can eventually compare gains
2018-06-07 08:36:29 +02:00
Gwendal Roué 54b2135b74 DatabaseDateComponents adopts StatementColumnConvertible
We'll need benchmarks to evaluate the gain, here
2018-06-07 08:36:29 +02:00
Gwendal Roué bf3b4e7e02 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-06-07 08:36:29 +02:00
Gwendal Roué ad8b80bafd (whitespace) 2018-06-07 08:36:29 +02:00
Gwendal Roué 06476bc6fe SQLiteDateParser.components(from:) is not public 2018-06-07 08:36:29 +02:00
Gwendal Roué 0616209e58 SQLiteDateParser: no more static methods 2018-06-07 08:36:29 +02:00
Gwendal Roué 415f2971e5 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-06-07 08:36:29 +02:00
Gwendal Roué 3a7b2cc4a2 SQLiteDateParser: get rid of the mutex 2018-06-07 08:36:29 +02:00
Gwendal Roué 726e40984a Add SQLiteDateParser.swift to GRDBCustom and GRDBCipher
... so that all GRDB flavors can use the new technique.
GRDB has three distinct projects since #282.
2018-06-07 08:36:29 +02:00
Matt Greenfield 63a68978f0 truncate nanosecond precision to 3 sig figs 2018-06-07 08:36:29 +02:00
Matt Greenfield 13d973dde4 Revert "fix the tests to expect less nanosecond precision loss"
This reverts commit eba5df1fcc.
2018-06-07 08:36:29 +02:00
Matt Greenfield 8f5ef76e7e Revert "permit precision loss down to 3 sig figs"
This reverts commit 3bcc5b8064.
2018-06-07 08:36:29 +02:00
Matt Greenfield 36ac5fa53e truncate date/time strings that include seconds precision beyond the nanosecond scale 2018-06-07 08:36:29 +02:00
Matt Greenfield cda891ca02 permit precision loss down to 3 sig figs 2018-06-07 08:36:29 +02:00
Matt Greenfield ff4447713a fix the tests to expect less nanosecond precision loss 2018-06-07 08:36:29 +02:00
Matt Greenfield 70190e2a23 not all nanosecond fractions have 3 sig figs, so can't hard code the acceptable string lengths 2018-06-07 08:36:29 +02:00
Matt Greenfield 2682dae34b 0.123 is not the same thing as 0.000123 2018-06-07 08:36:29 +02:00
Matt Greenfield 3a1e695a39 fractions of seconds are not the same thing as integer counts of nanoseconds 2018-06-07 08:36:29 +02:00
Matt Greenfield 604f80f6fa differentiate between SS and SS.SSS formats 2018-06-07 08:36:29 +02:00
Matt Greenfield 5c0b88eb82 return correct Format for partial date/time combinations 2018-06-07 08:36:29 +02:00
Matt Greenfield 7e39fbaba0 add SQLiteDateParser to project file 2018-06-07 08:36:29 +02:00
Matt Greenfield 815424770b initial scanf() based date string parser 2018-06-07 08:36:29 +02:00
Gwendal Roué 30fcd95f1d Change podspec description 2018-06-07 08:31:57 +02:00
Gwendal Roué 4637930027 Improve "Good Practices for Designing Record Types" 2018-06-06 17:09:03 +02:00
Gwendal Roué 729ec6714c Improve "Good Practices for Designing Record Types" 2018-06-06 17:08:42 +02:00
Gwendal Roué b2683eb864 Improve "Good Practices for Designing Record Types" 2018-06-06 17:04:42 +02:00
Gwendal Roué e7bcf7c7db Funny how time you have for tweaking stuff when you're waiting for a watch app to launch... 2018-06-06 16:15:44 +02:00
Gwendal Roué d1c47c3364 Improve "Good Practices for Designing Record Types" 2018-06-06 16:12:21 +02:00
Gwendal Roué 44140cb1db README.md 2018-06-06 15:01:59 +02:00
Gwendal Roué 4bc6a77588 README.md 2018-06-06 14:02:48 +02:00
Gwendal Roué edd294550f Revert "README.md"
This reverts commit 69c2077037.
2018-06-06 13:59:52 +02:00
Gwendal Roué 69c2077037 README.md 2018-06-06 13:59:07 +02:00
Gwendal Roué b3f1997049 README.md 2018-06-06 13:57:44 +02:00
Gwendal Roué c2e624c78d README.md 2018-06-06 13:52:55 +02:00
Gwendal Roué ff69d3fbc3 Merge pull request #365 from groue/GRDB3-DelayedOrdering
Delayed Request Ordering
2018-06-06 07:44:23 +02:00
Gwendal Roué 018fac8c57 CHANGELOG.md 2018-06-05 23:07:00 +02:00
Gwendal Roué 0b1bc80c41 Document orderByPrimaryKey 2018-06-05 22:53:05 +02:00
Gwendal Roué 7e6de4fbd0 Test TableRequest.orderByPrimaryKey() 2018-06-05 22:46:24 +02:00
Gwendal Roué fa31c484da OrderedRequest now waits for the database connection before ordering is computed 2018-06-05 22:46:02 +02:00
Gwendal Roué 2556fd041f Update Makefile for Xcode 9.4 2018-06-05 22:23:43 +02:00
Gwendal Roué e915d28cb2 Fix failing tests for Database.indexes(on:) and Database.foreignKeys(on:) 2018-06-05 14:38:59 +02:00
Gwendal Roué 60eb868fa5 Failing tests for Database.indexes(on:) and Database.foreignKeys(on:) 2018-06-05 14:38:47 +02:00
Gwendal Roué 6130c6f985 Who guessed String ordering would depend on Swift version? Fix a test so that it runs in both Swift 4.1 and Swift 4.2 2018-06-05 08:03:50 +02:00
Gwendal Roué b7f44785ec The SQL statement generated by record.update(db) lists columns in the same order as in the table definition (this fixes tests made flaky by SE-0206) 2018-06-05 08:02:54 +02:00
Gwendal Roué 8b44b0af7b Fix SerializedDatabase.reentrantSync check for unsafe transactions 2018-06-04 11:59:43 +02:00
Gwendal Roué caea11fbbb Database: a couple more asserts 2018-06-04 11:58:40 +02:00
Gwendal Roué c7f018c635 GoodPracticesForDesigningRecordTypes.md 2018-06-04 07:40:12 +02:00
Gwendal Roué b8328bd3bb GoodPracticesForDesigningRecordTypes.md 2018-06-03 18:37:00 +02:00