No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    how to use sqlite with quasar vue

    Help
    3
    7
    1802
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Charlotte last edited by

      is there any documentation on how to use sqlite or sqlite3 with quasar vue? Alternately is can anyone point me to a compatible client-side database to use instead?

      Many thanks

      qyloxe 1 Reply Last reply Reply Quote 0
      • qyloxe
        qyloxe @Charlotte last edited by

        @Charlotte sure, as for now, the low level DB in browsers is IndexedDB- tons of articles:

        https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API

        However it is NOT compatible with sqlite.

        If you want to use IndexedDB you would probably be better off with some kind of wrapper. Those wrapper make use of IndexedDB easier. Here is one for example:

        https://dexie.org/

        Well, truth be told, you HAVE a compatible sqlite implementation in browser - it is called WebSQL BUT it is deprecated, not supported, dropped and available on chrome, opera and safari. Firefox and IE does not support it. I wouldn’t recommend using this.

        https://en.wikipedia.org/wiki/Web_SQL_Database

        There is always local storage, supported by Quasar.

        There are tons of libraries, which gives you some kind of storage, queries, client side and synchronize with the backend. For example:
        https://pouchdb.com/
        https://rethinkdb.com/

        There are cloud databases with local helpers for example:
        https://www.couchbase.com/

        And of course you have a big ones like fire something or azu something 🙂

        On the other hand - just remember that ANYTHING you can store client side in browser is NOT permanent! User, or browser can delete all data unexpectedly. I do not know your requirements, but honestly, clean and pure client side SQL db is in my opinion VERY rare use case. Please elaborate what you want to achieve?

        1 Reply Last reply Reply Quote 0
        • C
          Charlotte last edited by

          Hi qyloxe - many thanks for your very helpful reply! I’m new to this world of client-side dev and am wrestling with my first quasar vue app. Im working on a “proof of concept” - rewriting an IOS app I wrote in the Apple app store but this time in quasar vue. Ive not come across browser based databases before. I take on board your warning that clientside browser db is not permanent. This makes stand-alone IOS apps challenging. I’m going to play around with this technology. Many thanks again. Charlotte

          1 Reply Last reply Reply Quote 0
          • s.molinari
            s.molinari last edited by

            @Charlotte - Is your target actually a web browser for your rewritten app? If yes, this isn’t making sense to me.

            This makes stand-alone IOS apps challenging.

            Scott

            1 Reply Last reply Reply Quote 0
            • C
              Charlotte last edited by

              Hi Scott,

              My initial ios app was, as you’d assume, a native app written first in Objective C (ugh!) and then re-written in swift. I guess my current one, if I use quasar vue and Cordova would land up being a browser based ios app - unless I use nativescript-vue. To be honest, I’m pretty swamped with absorbing and integrating the vast amount of new technology I’ve had to surmount in moving from what now seems to be the very safe circumscribed world of completed executables. So, forgive me if I sound muddled - I probably am! Charlotte

              1 Reply Last reply Reply Quote 0
              • s.molinari
                s.molinari last edited by

                Ok. Now it makes more sense.

                As @qyloxe mentioned, from my experiences of lurking the Internet, PouchDB seems to be getting the most attention. But, I’m no expert. 🙂

                https://pouchdb.com/adapters.html

                Scott

                1 Reply Last reply Reply Quote 0
                • C
                  Charlotte last edited by

                  Just had a look at the url you posted. Very helpful indeed. Many thanks.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post