Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ujjwal Gupta
    @ujjwalguptaofficial
    Hi @manEatingFish_twitter
    Do you mean not equal to or not like "%complete%" ?
    richard rose
    @manEatingFish_twitter
    not like "%complete%" please
    so return everything whoose status isn't complete
    there could be many stuses, complete is the only constant
    Ujjwal Gupta
    @ujjwalguptaofficial
    In that case - operators will work. Check out this : https://jsstore.net/tutorial/operators/
    richard rose
    @manEatingFish_twitter
    i tried != and it doesn't work, when I look at the query it tuned the != into a < so it only returned statuses alphabetically lower than Complete i.e Abandoned
    Ujjwal Gupta
    @ujjwalguptaofficial
    ok i see
    allow me some time, let me look into this.
    richard rose
    @manEatingFish_twitter
    Thanks. some more context
    $scope.searchQuery.where.status = {'!=': "Complete"};
    yielded
    Ujjwal Gupta
    @ujjwalguptaofficial
    In the mean time - could you add an issue on jsstore github page ? so that others people can look into it & take advantage of our conversation.
    richard rose
    @manEatingFish_twitter
    from: "Entity"
    skip: 0
    limit: 100
    order: {by: "name", type: "asc"}
    where:
    status: {<: "Complete"}
    will do
    Ujjwal Gupta
    @ujjwalguptaofficial
    I guess - you can use regex for this. https://jsstore.net/tutorial/regex/
    richard rose
    @manEatingFish_twitter
    Thanks I will try that
    richard rose
    @manEatingFish_twitter
    status: {regex: /^((?!Complete).)*$/s} worked
    Ujjwal Gupta
    @ujjwalguptaofficial
    glad to know :).
    richard rose
    @manEatingFish_twitter
    Question about limit, skip and where.
    I have this query running against 3000 entries
    from: "Entity"
    skip: 0
    limit: 100
    order:
    by: "name"
    type: "asc"
    on scroll i load the next 100 entries by altering the skip
    this all works correctly and they are sorted alphabetically, however when I add a where clause;
    from: "Entity"
    skip: 0
    limit: 100
    order: {by: "name", type: "asc", idbSorting: true}
    where:
    searchterm: {like: "%and%"}
    each group of 100 results is only sorted within its self
    it appears that the 100 limit based on the skip is take from an unordered result from the where, and then subsequently ordered within its self
    richard rose
    @manEatingFish_twitter
    Is this correct behaviour fro IndexedDB? if so is there anything I can do to make the the where and order occur before the skip and limit is applied?
    Let me know if you can regenerate.
    akhilponnala
    @akhilponnala
    Hi guys,
    How can we use union.
    Ujjwal Gupta
    @ujjwalguptaofficial

    Hi @akhilponnala

    right now, jsstore doesn't support union. Please add an issue on jsstore github page.

    Thanks.

    akhilponnala
    @akhilponnala
    Hi @ujjwalguptaofficial
    Please help me in preparing alternate query to union.
    Thanks.
    Ujjwal Gupta
    @ujjwalguptaofficial
    ok sure, looking into this.
    Ujjwal Gupta
    @ujjwalguptaofficial
    @akhilponnala - added the union api. Have a look at - https://jsstore.net/tutorial/union/
    akhilponnala
    @akhilponnala
    Hi @ujjwalguptaofficial
    Thank you for your support.
    akhilponnala
    @akhilponnala
    Hi @ujjwalguptaofficial ,
    How can we implement MYSQL CASE function using jsstore.
    for example:
    SELECT CustomerName, City, Country
    FROM Customers
    ORDER BY
    (CASE
    WHEN City IS NULL THEN Country
    ELSE City
    END);
    Please suggest us on above if there is any altenative method using jsstore
    Hi @ujjwalguptaofficial ,
    please suggest on specifying the default values using jsstore in table creation
    Ujjwal Gupta
    @ujjwalguptaofficial

    Hi

    Jsstore doesn't have this functionality yet. Please add an issue on github. I will take it from there. Thanks.

    akhilponnala
    @akhilponnala
    Hi @ujjwalguptaofficial ,
    Thank you.
    I have added issue on github. Please help us on implementing above.
    Thank you.
    akhilponnala
    @akhilponnala
    Hi @ujjwalguptaofficial ,
    Can we use 'Case' funtionality with group by clause.
    Can we apply then value from results dynamically.
    For example :
    select count(*) as s_count,d3.des as des1,(CASE d.des WHEN 'Other' THEN e.v_other ELSE d.des END) as making ,(CASE d1.des WHEN 'Other' THEN e.v_other ELSE d1.des END) as desc ,(CASE d.des WHEN 'Other' THEN e.v_other ELSE d.des END) as maker ,(CASE d1.des WHEN 'Other' THEN e.v_other ELSE d1.des END) as module ,sign.opId as oper_id from val as e inner join drop as d on d.drop_id=e.v_make inner join drop as d1 on d1.drop_id=e.v_model inner join sign as s on s.sig_id=e.sig_id inner join drop as d3 on d3.drop_id=s.oper_id group by making, module,oper_id order by oper_id
    Please help us on implementing above.
    Thank you.
    Ujjwal Gupta
    @ujjwalguptaofficial
    ok looking into this
    Ghost
    @ghost~5e1340abd73408ce4fd5da17

    @ujjwalguptaofficial ,

    I am working on a progressive web application project.

    The main thread, inspection.js, starts a worker, inspectionworker.js, and detects when the user is offline or online. When online, the information a user submits is sent directly to the server. When offline, the data is sent to the web worker for storing in the local database until the user is back online. Once online again, the service worker is responsible for sending all the offline data to the server while the main thread is available for new inspections.

    This was working when establishing a connection to the database using the JsStoreWorker directly. But after broader testing, I found out it was only working in Firefox and Chrome on my Mac. It failed in Safari and on mobile devices, saying the JsStoreWorker could not be found.

    I thought this problem might be solved by including the JsStoreWorker.js as a script but not using it directly in creating the connection objects, but it's not working. As a test, when I try to add a record and I have not imported the JsStoreWorker.js, an error is thrown saying JsStoreWorker cannot be found. When I import the script and try to add a record, the add fails silently.

    Based on the behavior/problem being similar in both cases, I am wondering if perhaps I cannot use JsStore in a web worker?

    Thanks in advance for you help!!

    Marion PERRIER
    @hist0plasma_gitlab
    Hi !
    Is it possible to use JsStore without any installation to do for the user ? :)
    (also serverless)
    Ujjwal Gupta
    @ujjwalguptaofficial
    JsStore is a client side library which works on top of indexeddb , its not a service. I am not sure what you are asking but hope this helps you to understand.
    PWTycoon
    @PWTycoon
    Is multi-entry basically the equivalent of storing an array? If so, can I perform array operations on a column? (push, indexOf, ...)
    Ujjwal Gupta
    @ujjwalguptaofficial

    You can store array without multientry, but element inside array wont be indexed so not searchable.

    multiEntry allows you to search elements present inside an array.

    JsStore supports only push functionality for now , check here - https://jsstore.net/tutorial/update-with-operators/

    But you are free to use whatever operation you want to do on array by retrieving the value using select api.

    Mike Talbot
    @mike_talbot_twitter
    Hi, I see that the Github page is showing no support for Edge and IE11 - is that right or is it a temporary thing that has the tests failing?
    Ujjwal Gupta
    @ujjwalguptaofficial
    temporary things - some test cases failing due to es6 code or some config. I have linux so not able to see what's happening.
    Mike Talbot
    @mike_talbot_twitter
    Many thanks! Looking forward to working with JsStore then!
    adamsbc
    @adamsbc
    I keep getting this error. ReferenceError: JsStoreWorker is not defined. I'm using JsStore in node js