Oks. I will change all the booleans for numbers then
thanks for the help
Efrat Messer
@Efke
Hello, How can I 'order by' more than one column in a select?
Ujjwal Gupta
@ujjwalguptaofficial
Hi Efrat
Ujjwal Gupta
@ujjwalguptaofficial
Please add an issue. Currently multiple order by is not supported.
Efrat Messer
@Efke
Thank you :)
ersaurabh101
@ersaurabh101
Problem - Database doesnt get deleted using the command - connection.dropdb().then --
Explanation - It works fine if no service is fetching the data in table, if any service is inserting the data and at that time we try to drop db then it kind of gets corrupted, in this case, tables are not completely dropped, its data is deleted or some fields are dropped
Please help in achieving the same in right manner.
ersaurabh101
@ersaurabh101
if any service [checking update from table] is simply running and at that time i press logout button [ on pressing i wanna delete db], it gets corrupted
Ujjwal Gupta
@ujjwalguptaofficial
If you can provide me something reproducable, i can look. May be a demo or a link to ur project.
ersaurabh101
@ersaurabh101
hii ujjwal, on further investigation, if i can kill ongoing request queue in db and then execute db deletion, it will work. Can you navigate me to a script which stops / kills all ongoing requestQueue
So its like if there are ongoing requestQueue and we try to delete db, it gets corrupted. We must stop them and then delete. Hope this helps
Ujjwal Gupta
@ujjwalguptaofficial
you have called those api, which means you want to execute it. So its like anti pattern approach.
and most important thing - when you are logging out, you dont need to drop the db. You can just remove all data from table using clear api. http://jsstore.net/tutorial/clear/
ersaurabh101
@ersaurabh101
alright, noted. Working on this, will let you know soon, thanks
ersaurabh101
@ersaurabh101
tested,actually in background app (services) checks for new messages, so even after clearing data it is still inserting, need to stop ongoing Queue if any, is there any way
Ujjwal Gupta
@ujjwalguptaofficial
i m sorry but this is not possible. You have the full control over the api call, you need to change your app in such a way that it wont insert data when logging out . I mean something which will tell background app to not insert data.
ersaurabh101
@ersaurabh101
exactly, this is what i want to do, if there is ingoing queue while logging out, i want to stop that queue or wait to logout till that queue is completed and deleted by me.
_
Ujjwal Gupta
@ujjwalguptaofficial
ok cool, i got you. I will create an api which will let you know whether requestQueue is empty or not.
Better if you can add an issue on github. Thanks.
ersaurabh101
@ersaurabh101
i will add it, hope you can provide the solution soon as my app is all set
Ujjwal Gupta
@ujjwalguptaofficial
sure
since you are in hurry, so here is a hack -
var isNoRequest = con.requestQueue_.length===0;
here con is the connection
you can wrap the above code in a setTimeOut with some time & check. Hope this will help you.
ersaurabh101
@ersaurabh101
i'll try and get back
Ujjwal Gupta
@ujjwalguptaofficial
@ersaurabh101 - i have added events functionality now. Using the event you can know when there is no request. Take a look at doc - http://jsstore.net/tutorial/event/
ersaurabh101
@ersaurabh101
hii, i'll use it and get back, encountered 1 major problem
after using jsstore i am unable to make production builds
npm run build --prod
it gives this error -
Ujjwal Gupta
@ujjwalguptaofficial
cant help, its an issue with building.
ersaurabh101
@ersaurabh101
i understand, but issue comes when we use jsstore
after removing issue disappears
ersaurabh101
@ersaurabh101
if i dont make --prod then it opens very slow, please help.
ersaurabh101
@ersaurabh101
hii
please ping me when you have 5 mins
will show you the problem i am facing
KirandeepKaur190
@KirandeepKaur190
How to use select and check count in select using jsstore.
Please help.
How to combine both in one statement?
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.