Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ujjwal Gupta
    @ujjwalguptaofficial
    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/
    wideweide
    @wideweide
    @ujjwalguptaofficial how about this issue ujjwalguptaofficial/JsStore#127 ?
    Ujjwal Gupta
    @ujjwalguptaofficial

    Hi Wideweide

    Adding this feature is not an issue but it will be very slower since IndexedDb does not allow nested indexing which means for any nested query jsstore will have to loop through all the records & filter.

    I haven't come to any decision yet, just trying to figure out if this should be added or not & if added can i do something for indexing or something like that.

    Feel free to suggest.
    wideweide
    @wideweide
    I see,may be nested query caused my query slow
    l388
    @l388
    Hi @all, I use js store recently. Is there an example of how to open a database and update its structure without losing the stored data? e.g. create new fields, change indexes ...
    Ujjwal Gupta
    @ujjwalguptaofficial

    there is no example, but its simple. Just fetch all data in a variable before updating & then update.

    Check this out - https://jsstore.net/tutorial/change-table-design/

    l388
    @l388
    Thank you for your reply.
    wideweide
    @wideweide
    @ujjwalguptaofficial hi,may you give a help,when sort throw a error :
    Uncaught TypeError: b.localeCompare is not a function
    at Helper.compareAlphabetInDesc (jsstore.worker.1465c9963231ac8ec04c5672ec825098.js:4030)
    at jsstore.worker.1465c9963231ac8ec04c5672ec825098.js:4084
    at Array.sort (<anonymous>)
    at Instance.Helper.orderBy
    (jsstore.worker.1465c9963231ac8ec04c5672ec825098.js:4083)
    at Instance.Helper.processOrderBy (jsstore.worker.1465c9963231ac8ec04c5672ec825098.js:4099)
    at Instance.this.onTransactionCompleted (jsstore.worker.1465c9963231ac8ec04c5672ec825098.js:4547)
    at IDBTransaction.onComplete (jsstore.worker.1465c9963231ac8ec04c5672ec825098.js:366)
    Ujjwal Gupta
    @ujjwalguptaofficial
    hi sure
    seems like data type you have defined is string but actual data is not string, so somehow wrong data type is inserted
    Screenshot from 2019-11-19 19-35-39.png
    wideweide
    @wideweide
    @ujjwalguptaofficial when I run 'select' with order throw error,if I remove order ,it will be right. may be the order coloumn 's data is not correct or has some null value?
    I will check later,thanks
    wideweide
    @wideweide
    @ujjwalguptaofficial I got it, if the datatype is wrong,when sort will throw error too.Thank very much
    Another question: One column, if I do not need to query,but need to sort, need to create index for this column?
    Ujjwal Gupta
    @ujjwalguptaofficial
    that depends, by default jsstore uses indexing for sorting but if you dont want to use indexing then you can use option idbSorting. Check out the doc - https://jsstore.net/tutorial/order-by/
    wideweide
    @wideweide
    @ujjwalguptaofficial
    Thanks for your hard work and great help
    I just want to reduce the time for query.
    I write some test code: total 100,000 datas, select from tbl where parentId=pid use 80ms(return 1000 datas);but if select from tbl where parentId=pid and deleted=0 and type=1 use 400ms(return 1000 datas too) . more conditions will cost more time ?
    sort or not ,seems not cost more time
    more columns indexing seems not cost more time too?
    I used keyPath for more cloumns,but when query not reduce time
    So What is the best practices? And suggest add some test case in idbstudio
    André Sousa
    @AVSousa_gitlab
    @ujjwalguptaofficial Hello, i need help with my select query, i want to assign the query values to my state values, when i do console log of the query values it shows fine but i cant assign them to my state due to them being considered unknow so i cant assign them the individual atributes, here is a screenshot of my code https://drive.google.com/open?id=1vUEAlpfdZPBQh-ATgF8hAHB87bkQmuch
    Thank you for your time