Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    @aRajeshKumar this is with apollo server
    Rajesh
    @aRajeshKumar
    Thanks @man1989 . Can we use RxDB with just GraphQL (Written with ASP.Net Core) ?
    Manish Kumar
    @man1989
    @aRajeshKumar any graphql server will be fine
    Daniel Meyer
    @pubkey
    @joewoodhouse yes the comment is still relevant. Observing the count can be much easier optimized then using event-reduce. Does pouchdb load everything into memory if the query exactly matches an index?
    @man1989 there is no full delete in pouchdb because this would break the replication. You have to delete the full db and create a new one.
    This also is not solved for RxDB atm, but pls make a proposal
    Joe Woodhouse
    @joewoodhouse
    @pubkey Thanks. Is there a similar example of this pattern in the existing codebase I could take a look at?
    Daniel Meyer
    @pubkey
    no, I think it was described in the first issue that was created arround that topic
    basically you watch events and check if the document still/no-longer matches the query selector. Then maintain a list of document ids where you remove or add the event-document.
    Rajesh
    @aRajeshKumar
    For a React app, just RxDB is enough to listen to the db changes or is it good have a combination with RxJS ?
    Manish Kumar
    @man1989
    @pubkey thanks for the clarification
    Kamil Zieliński
    @kamilzielinskidev
    Hello there, are there any plans to sync rxdb with mongodb?
    Martin Foerster
    @phal0r

    @pubkey I have a question about eventreduce and change detection:
    We integrate to a legacy REST API and therefor cannot use replication currently. With this data, there are some RxCollection that only change every few weeks/month and therefor updating those records should not trigger any changes, but it acutally does for every record.

    With our first approach, we just used bulkInsert to put all records in the collection. This however triggers a change for every record. Is this intended?

    Since we thought triggering after an upsert might be intentional, we replaced this code by iterating over every received element of the data from the backend and doing an atomicUpdate on the matching document (matching is done by primary id). Although nothing changed, it still triggers an for every document. To ensure, there is no equality check on the object identity, we only copied over the values. Here is a relevant snippet:

    await localCart.atomicUpdate((data: any) => {
        let newData = records.find((rc) => rc.id === data.id)
        if (newData) {
            for (const [key, value] of Object.entries(newData)) {
                data[key] = value
            }
        }
        return data
    })

    I would expect, that it would not trigger any change events, if data has not changed. Is this intentional?

    Daniel Meyer
    @pubkey
    @phal0r updating anything still creates a new revision key and therefore changes do documents plain data.
    @kamilzielinskidev no, not in the near future, but feel free to dive deeper into that topic
    Daniel Meyer
    @pubkey
    @phal0r we should add a check to upsert so a write is only done when the data actually has changed
    Luyện Ngọc Phú
    @amethystafyy_gitlab
    When elected leader is disconnected and rxdb is selecting a new leader => reconnect to websocket, between that time if websocket emit any event =>> client will miss it. Is there anything we can do to prevent that? Thank u
    Daniel Meyer
    @pubkey
    With the graphql replication?
    It will start from the last synced document. So it should not have a problem with that
    Sergiu Muresan
    @AfterWind
    Guys, do you have any idea how I can work with CouchDB users (specifically the current user) the same way as any other entity? Calling sync on _users gives me access denied... Is there something I can do to allow it but just read the current user?
    Sorry, I am quite new to this, but haven't seen anything about users in the documentation
    Gerard
    @1304654_gitlab
    Hello Guys.First of all I want to appreciate the work of Daniel Meyer. And all these people who are making an unbelievable app. Is there some kind of interface to implement Replication with SignalR? Basically how can I fill the indexeddb with the events that would come to me through SignalR.
    Martin Foerster
    @phal0r
    @pubkey ok, that makes sense for pouchdb.... Is it possible with the event reduce algorithm to detect if nothing has changed? If so, it would make perfect sense to not trigger anything and implement it there.
    Gerard
    @1304654_gitlab
    So. Basicacally there are some interfece to implement custom fill Data from server to browser? @pubkey
    Copple
    @kiwicopple

    Hey @pubkey I saw this note in your release docs:

    In the future I want RxDB to be a wrapper around pull-based databases that also works with other source-dbs like mongoDB or PostgreSQL

    I'm interested in exploring this for supabase.io - we have a realtime server for PostgreSQL. I'd love to chat about how we can get involved (perhaps via email? copple [at] supabase.io)

    Gerard
    @1304654_gitlab
    I'm interested too, in some kind of event pushing Interface, I can Implement It.
    Daniel Meyer
    @pubkey
    @kiwicopple @/all I on holidays till monday and hard working abroad till friday next week. Will respond after that
    Copple
    @kiwicopple
    No probs Daniel - enjoy your holiday. No hurry from my side
    Martin Foerster
    @phal0r
    yes, enjoy :)
    Adam Markham
    @adamjmarkham
    Hi all, is there a good way of handling JS Date object with a schema? I tried date-time JSON schema type but it says it's unknown. Also assuming my Date obj needs to be converted to string before inserting the document?
    Adam Markham
    @adamjmarkham
    Managed to get it working by setting field to this in the schema:
    time: {
            type: 'object',
            format: 'date-time'
     }
    Sergiu Muresan
    @AfterWind
    Oh I actually didn't know about this. And you get actual Date objects in your entities?
    Adam Markham
    @adamjmarkham
    yep - I looked through the indexed db I'm storing this in and it's stored as a date time formatted string 2020-10-02T14:11:20.661Z
    Sergiu Muresan
    @AfterWind
    Cool! Thanks for sharing this
    cjbor
    @cjbor

    No idea if this is the right place to ask, but im trying to use the server plugin and always getting this message.

    This relative module was not found:
    
    * ../../package in ./node_modules/express-pouchdb/lib/routes/root.js

    I am using Electron, Vue and Typescript in my Project.

    Gerard
    @1304654_gitlab
    I think that rxdb should have an interface like Dexiejs (syncable) in order to implement differents providers. I will whait until ends Daniel's holiday. I help him to implementation.
    Evangelos Parchas
    @eparchas
    Hello everyone! I've been trying to use rxdb in an environment where IndexedDB is not available (more specifically a cross-origin iframe in Safari). I configured rxdb with the pouchdb-adapter-memory however I stumbled on IndexedDB still being used post construct when running _prepareBroadcastChannel, and creating a BroadcastChannel with no options. This uses by default IndexedDB. Is there a way customize the options of the BroadcastChannel used in _prepareBroadcastChannel?
    Daniel Meyer
    @pubkey
    @eparchas I think this is missing. RxDB only uses the defaults atm
    3 replies
    Burak Öztürk
    @burakozturk16
    Hi guys, what is the dependencies rxdb written as "To install the latest release of rxdb and its dependencies and save it to your package.json" at rxdb.info
    btw I know, I can get dependecies from github example but why the site has not any documentation about install?
    Adam Markham
    @adamjmarkham

    Hi all, hoping someone can help me solve this problem I’m having. I have the following code in a function:

    const docs = await db.feedback.findByIds(ids)
    
        const deletes = Array.from(docs).map(([, doc]) => {
            return doc.remove()
        })
    
        return Promise.all(deletes)

    However I’m getting:

    Uncaught (in promise) RxError (COL19): RxError:
    Pouchdb document update conflict

    because it can be called more than once with the same set of ids.
    Is there a better way of handling this other than error handling around the rejected promises?

    Daniel Meyer
    @pubkey
    @adamjmarkham does findByIds return duplicates?
    Adam Markham
    @adamjmarkham
    @pubkey No they’re not duplicates
    Daniel Meyer
    @pubkey
    Ok. So yes you have to handle the errors
    paul-asvb
    @paul-asvb
    Hello, does someone has experience with definitions in the json schema for rxDB?
    Chris Drackett
    @chrisdrackett
    I see there is graphQLSchemaFromRxSchema but is anyone aware of something that goes the other direction? creates the RxSchema from a graphql schema
    Chris Drackett
    @chrisdrackett
    I'm getting an error with the following from my schema:
     items: {
          type: 'array',
          uniqueItems: true,
          items: [
            {
              ref: 'note',
              type: 'string',
            },
            {
              ref: 'task',
              type: 'string',
            },
          ],
        },
    but I'm not sure what the issue is. Getting RxError (SC1): RxError: fieldnames do not match the regex Given parameters: { regex:"^[a-zA-Z](?:[[a-zA-Z0-9_]*]?[a-zA-Z0-9])?$" fieldName:"0"}
    Daniel Meyer
    @pubkey
    @chrisdrackett I am not sure if this is a valid jsonschema