Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    KirandeepKaur190
    @KirandeepKaur190
    Any example will be helpful.
    Ujjwal Gupta
    @ujjwalguptaofficial
    Hi @ersaurabh101 , let's chat in private
    @KirandeepKaur190 , you can use two query for this. Why are you thinking about executing in one query ?
    Ujjwal Gupta
    @ujjwalguptaofficial
    Are you thinking - it will take less time if you will do it in one query ? Let me know.
    KirandeepKaur190
    @KirandeepKaur190
    This is required for my table structure. I want to use following query using jsstore :-
    SELECT USERNAME, COUNT(*) FROM MYTABLE WHERE USERNAME = LOGGEDINUSER.
    How can use this?
    Ujjwal Gupta
    @ujjwalguptaofficial
    Jsstore is an indxeddb wrapper & indexeddb is nosql database . So you cant do something like that
    use select query which will give list of results and then you can get the length for count
    Check this example of your scenario
    var results = select({
        from: MyTable,
        where: {
            userName: some_value
        }
    });
    
    var count = results.length;
    var usersName = results.map((result) => {
        result.userName;
    });
    hope this helps
    nitrid
    @nitrid
    hi
    how to table drop ?
    Ujjwal Gupta
    @ujjwalguptaofficial
    Hi
    do you want to clear a table or just remove it from db ?
    Ujjwal Gupta
    @ujjwalguptaofficial
    You can clear it & after that its just a container. And if you want to remove it completely , please add an issue & i will take it from there.
    nitrid
    @nitrid
    i just want to remove the table from within the db.
    Ujjwal Gupta
    @ujjwalguptaofficial
    ok, please add an issue on jsstore github page. This functionality is not available right now.
    @/all please upgrade your jsstore version to 3.3.5, there were some critical issue for joins query in previous version.
    wideweide
    @wideweide
    how to select a boolean field, just change to int?
    wideweide
    @wideweide
    Has a sample to filter datatype array?
    Ujjwal Gupta
    @ujjwalguptaofficial
    Hi @wideweide
    wideweide
    @wideweide
    @ujjwalguptaofficial thanks´╝îand what about array of object?
    table peope:object column such wife,array column like chilren
    {id:1,wife:{name:Lily,age:36},children:[{name:tom,age:4},{name:hellen,age:6}]}
    select from people where wife.name='Lily' ?
    select
    from people where children.name='tom'
    Ujjwal Gupta
    @ujjwalguptaofficial
    also for searching inside an array datatype, you need to enable 'multiEntry'
    wideweide
    @wideweide
    I just not know how to write the where...
    con.select({
    from: 'people',
    where: {
    wife.name: 'Lily',
    children.name:'Tom'
    }
    })
    has some smaple code?
    Ujjwal Gupta
    @ujjwalguptaofficial
    hi, i dont think deep level query is possible
    divide your table into multiple tables and then do a join
    wideweide
    @wideweide
    it is possible...
    I used zangodb before: https://github.com/erikolson186/zangodb
    Just like mangodb ,can use deep level query ,just like nosql style
    Ujjwal Gupta
    @ujjwalguptaofficial
    ohk, need to see if this is possible.
    I see you have added an issue, i will take it from there.
    wideweide
    @wideweide
    @ujjwalguptaofficial And in zangodb,boolen column can be filter too, but I am not sure how...
    you may try
    wideweide
    @wideweide
    @ujjwalguptaofficial erikolson186/zangodb#13
    Ujjwal Gupta
    @ujjwalguptaofficial
    k thx
    ersaurabh101
    @ersaurabh101
    @ujjwalguptaofficial please check personal message
    wideweide
    @wideweide
    @ujjwalguptaofficial have you test indexeddb can support how many datas? 10000,100000,1000000?
    I have checked for approximately 10k without any issue.
    wideweide
    @wideweide
    @ujjwalguptaofficial I use indexeddb with vue as local storage,but it become slow if data > 10k . It seemed not good enough compare to sqlite(websql),or I do something wrong?
    Ujjwal Gupta
    @ujjwalguptaofficial

    not sure what you are doing but slowness of data is expectable with more data.

    Could you tell me where its slow - in insertion or select ?

    Ujjwal Gupta
    @ujjwalguptaofficial
    Hi @wideweide , @all check out the performance doc - http://jsstore.net/tutorial/optimization/