Firestore COUNT(*): Everything you need to know

Поділитися
Вставка
  • Опубліковано 4 лют 2025

КОМЕНТАРІ • 37

  • @Firebase
    @Firebase  2 роки тому +13

    Subscribe for the latest → goo.gle/Firebase

  • @tonyjaradev
    @tonyjaradev 2 роки тому +15

    I’ve waited years for this feature! 🎉

  • @andrewcordoba2411
    @andrewcordoba2411 2 роки тому +11

    What an amazing feature, we waited so long for this and it's finally here!

    • @javascript_developer
      @javascript_developer 2 роки тому

      we could use size() before right ?

    • @sametsahin10
      @sametsahin10 11 місяців тому

      You had to actually read the docs to be able to use size() before. With count, you can get the count of docs without reading the docs themselves.@@javascript_developer

  • @mondieki
    @mondieki 2 роки тому +6

    Absolutely beautiful!

  • @Raddfieldgames
    @Raddfieldgames 2 роки тому +4

    This is awesome, thanks for this feature

  • @guozhangliew7302
    @guozhangliew7302 2 роки тому +1

    Excellent explanation David!

  • @slavaslutsker7223
    @slavaslutsker7223 2 роки тому +5

    Finally! Count is very useful.
    What can you suggest to fetch random document from collection in most efficient way?

    • @ecom.laknabil
      @ecom.laknabil 2 роки тому +1

      Make a random propriety in document and query a random range

  • @MuhammadAamir0
    @MuhammadAamir0 2 роки тому +7

    I build my own counter using cloud function every time a new document is added I count that doc and update the counter. Hear about official count function and pricing this is amazing. I'll use this counter function in my app.

    • @cyrileo
      @cyrileo 2 роки тому

      Thanks for sharing your awesome solution! 🤗I'm so glad this video helped you figure out how to use Firestore Count in your app. 🙌

  •  2 роки тому +8

    Links to the "updated" pricing and documentation for COUNT for all platforms would be very much appreciated in the pinned comment or description. Been looking for a couple minutes and I haven't found the documentation and pricing page.

  • @tntg5
    @tntg5 2 роки тому +10

    It's unbelievable that such a basic feature is only released now (more than 5 years of waiting)

    • @digimbyte
      @digimbyte Рік тому +1

      I take full credit for this feature - we had a conversation in the firestore community and it hit us that this feature didn't exist... so we made the feature request and it took a month to speed through, when feature suggestions make sense... it just clicks for everyone

    • @akpokemon
      @akpokemon Рік тому

      @@digimbyte how did it take 5 years for someone to make this feature request?? This was one of the worst aspects of this storage option. The others are inability to JSON export from the Google console, and copy and paste/duplicate/clone documents & collections to manually create a new record off a pre-existing template

  • @Movies-snip
    @Movies-snip 2 роки тому +3

    Is it available for flutter ?

  • @seccat
    @seccat 2 роки тому +2

    He has a Sparky plushie on the shelf 🤗

  • @nilshandeemantha3375
    @nilshandeemantha3375 Рік тому +1

    Could some one told me the version that are support aggregation query.

  • @ishirraj8554
    @ishirraj8554 2 роки тому +1

    0:56 is it not
    GetCountDFromServer(expensesQuery) ?

  • @elmenikmati
    @elmenikmati Рік тому

    ¡Excelente, necesitabamos algo así!

  • @jbwesleyster
    @jbwesleyster 2 роки тому +2

    awesome

  • @waymanharris1284
    @waymanharris1284 2 роки тому

    Unity example.... Plllleeeeeaaaaassssseee! 😇 PS: Great job on this video!

  • @EyalShahar
    @EyalShahar 2 роки тому

    This is a long waited feature, thanks!
    But how come there is no documentation about it?
    Specifically for Cloud Functions.

  • @luke2937
    @luke2937 9 місяців тому

    This is great, but in terms of pagination, correct me if I'm wrong but we are still unable to paginate to a certain page.
    Let's say I get the count and I have 100 docs and I'm limiting the actual doc read query to 25 (my page size)
    I would then have 4 pages
    I give the user the UI and they think they can click through to say, page 3. But I have no way of telling firebase the startAfter that will be doc 50 thus getting doc 50-75
    I think right now the best I can present my user is a Prev/Next button and visiually show them them they're seeing batch 50-75/100 because I have no way to get a query cursor at a particular count num

  • @VolkerAndres1
    @VolkerAndres1 2 роки тому +2

    How does pagination work with this approach? Is using .offset() now also more convenient?

    • @MultiChinmay
      @MultiChinmay Рік тому +1

      just wondering if you found answer to your question? How does pagination work this way? How Can I just query records for any N page number ?

    • @VolkerAndres1
      @VolkerAndres1 Рік тому

      @@MultiChinmay It is working with .offset(). But how many Reads are gone be created, I still don't know.

  • @John-qt6qk
    @John-qt6qk Рік тому

    Do firestore awesome! again thanks

  • @penjelajahalam00
    @penjelajahalam00 2 роки тому

    Selalu hadir suports Nya bang ful

  • @otockian
    @otockian 2 роки тому +1

    I was excited about this but it's insanely slow.

  • @erinwhitcomb9784
    @erinwhitcomb9784 3 місяці тому

    Melissa Fenwick

  • @zacharyh5027
    @zacharyh5027 2 роки тому +2

    Is this available in Python?

  • @_GabrielNexT
    @_GabrielNexT 2 роки тому +1

    Come on guys, native text search, I trust you.

  • @gaminggenes320
    @gaminggenes320 2 роки тому

    You still don't get it. The count(*) that we want is based on "group by" that returns the count for each group, even together with other group columns. The result will contain multiple rows with the count(*) column, which could be set as an alias (column name), e.g. TotalItems for each category.

    • @digimbyte
      @digimbyte Рік тому

      thats a different feature