@adx-studio/firestore-manager

1.0.6 • Public • Published

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();

.findAll()

.findById()

.findOne()

.findOneAndUpdate()

.findOneOrCreate()

.new()

.save()

.update()

Package Sidebar

Install

npm i @adx-studio/firestore-manager

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

96.2 kB

Total Files

62

Last publish

Collaborators

  • alieskandari