@adx-studio/firestore-manager
v1.0.6
Published
Create managers for your firestore collections. You can make calls like
Downloads
20
Maintainers
Readme
Firestore Manager
Create managers for your firestore collections. You can make calls like
const listing = await Listing.find({ title: "Charizard" }, { sort: "desc" });
Setup
import manager from "firestore-manager";
export const Listing = manager<ListingType>({
db,
collectionId: "listings",
_default: {
id: "",
title: "",
quantity: 1,
price: 0.0,
description: "",
createdAt: "",
updatedAt: "",
},
});
Usage
.create()
.delete()
.deleteMany()
.find()
Get all listings
const listings = await Listing.find();