1.0.6 • Published 7 days ago
@adx-studio/firestore-manager v1.0.6
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();