LiteCore
Couchbase Lite cross-platform core implementation
|
Typedefs | |
typedef const struct _FLValue * | FLValue |
A reference to a value of any type. | |
typedef const struct _FLArray * | FLArray |
A reference to an array value. | |
typedef const struct _FLDict * | FLDict |
A reference to a dictionary (map) value. | |
typedef struct _FLSlot * | FLSlot |
A reference to a mutable array/dict item. | |
typedef struct _FLArray * | FLMutableArray |
A reference to a mutable array. | |
typedef struct _FLDict * | FLMutableDict |
A reference to a mutable dictionary. | |
typedef struct _FLEncoder * | FLEncoder |
A reference to an encoder. | |
typedef struct _FLDoc * | FLDoc |
A reference to a document. | |
typedef struct _FLSharedKeys * | FLSharedKeys |
A reference to a shared-keys mapping. | |
Enumerations | |
enum | FLError { kFLNoError = 0 , kFLMemoryError , kFLOutOfRange , kFLInvalidData , kFLEncodeError , kFLJSONError , kFLUnknownValue , kFLInternalError , kFLNotFound , kFLSharedKeysStateError , kFLPOSIXError , kFLUnsupported } |
Error codes returned from some API calls. More... | |
enum | FLTrust { kFLUntrusted , kFLTrusted } |
Specifies whether not input data is trusted to be 100% valid Fleece. More... | |
Timestamps | |
Fleece does not have a native type for dates or times; like JSON, they are represented as strings in ISO-8601 format, which look like "2008-08-07T05:18:51.589Z". They can also be represented more compactly as numbers, interpreted as milliseconds since the Unix epoch (midnight at January 1 1970, UTC.) | |
typedef int64_t | FLTimestamp |
A point in time, expressed as milliseconds since the Unix epoch (1-1-1970 midnight UTC.) | |
FLEECE_PUBLIC FLTimestamp | FLTimestamp_Now (void) |
Returns an FLTimestamp corresponding to the current time. | |
FLEECE_PUBLIC FLStringResult | FLTimestamp_ToString (FLTimestamp timestamp, bool asUTC) |
Formats a timestamp as a date-time string in ISO-8601 format. | |
FLEECE_PUBLIC FLTimestamp | FLTimestamp_FromString (FLString str) |
Parses an ISO-8601 date-time string to a timestamp. | |
#define | FLTimestampNone INT64_MIN |
A value representing a missing timestamp; returned when a date cannot be parsed. | |
#define FLTimestampNone INT64_MIN |
A value representing a missing timestamp; returned when a date cannot be parsed.
typedef const struct _FLArray* FLArray |
A reference to an array value.
typedef const struct _FLDict* FLDict |
A reference to a dictionary (map) value.
typedef struct _FLDoc* FLDoc |
A reference to a document.
typedef struct _FLEncoder* FLEncoder |
A reference to an encoder.
typedef struct _FLArray* FLMutableArray |
A reference to a mutable array.
typedef struct _FLDict* FLMutableDict |
A reference to a mutable dictionary.
typedef struct _FLSharedKeys* FLSharedKeys |
A reference to a shared-keys mapping.
typedef struct _FLSlot* FLSlot |
A reference to a mutable array/dict item.
typedef int64_t FLTimestamp |
A point in time, expressed as milliseconds since the Unix epoch (1-1-1970 midnight UTC.)
typedef const struct _FLValue* FLValue |
A reference to a value of any type.
enum FLError |
enum FLTrust |
Specifies whether not input data is trusted to be 100% valid Fleece.
FLEECE_PUBLIC FLTimestamp FLTimestamp_FromString | ( | FLString | str | ) |
Parses an ISO-8601 date-time string to a timestamp.
On failure returns FLTimestampNone
.
FLValue
and interprets numeric representations as well as strings. FLEECE_PUBLIC FLTimestamp FLTimestamp_Now | ( | void | ) |
Returns an FLTimestamp corresponding to the current time.
FLEECE_PUBLIC FLStringResult FLTimestamp_ToString | ( | FLTimestamp | timestamp, |
bool | asUTC ) |
Formats a timestamp as a date-time string in ISO-8601 format.
FLEncoder
. timestamp | A time, given as milliseconds since the Unix epoch (1/1/1970 00:00 UTC.) |
asUTC | If true, the timestamp will be given in universal time; if false, in the local timezone. |