Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/denodb/deps.ts>Bson.ObjectId.createFromTime

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Go to Latest
method Bson.ObjectId.createFromTime
import { Bson } from "https://deno.land/x/denodb@v1.1.0/deps.ts";
const { ObjectId } = Bson;

Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId.

Parameters

time: number
  • an integer number representing a number of seconds.