MCPcopy Create free account
hub / github.com/documentdb/documentdb / PgbsonWriterAppendTimestamp

Function PgbsonWriterAppendTimestamp

pg_documentdb_core/src/io/pgbson.c:1027–1036  ·  view source on GitHub ↗

* Appends a given timestamp to the writer with the specified path. */

Source from the content-addressed store, hash-verified

1025 * Appends a given timestamp to the writer with the specified path.
1026 */
1027void
1028PgbsonWriterAppendTimestamp(pgbson_writer *writer, const char *path, uint32_t pathLength,
1029 TimestampTz timestamp)
1030{
1031 uint32_t secondsSinceEpoch = timestamptz_to_time_t(timestamp);
1032 uint32_t increment = (uint32_t) (timestamp % USECS_PER_SEC);
1033
1034 bson_append_timestamp(&(writer->innerBson), path, pathLength, secondsSinceEpoch,
1035 increment);
1036}
1037
1038
1039/*

Callers 1

PostProcessCursorPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected