Nano-SQL
Nano-SQL copied to clipboard
move more than one history point at a time
Is your feature request related to a problem? Please describe. Using 1.8.3 Would like to move forward or backward x-times in history. Is there a good way to do this rather than looping through nSQL().extend("hist", "<") x-times?
Describe the solution you'd like Would be awesome if we could pass a number to the hist call. Like:
nSQL().extend("hist", "<", 4).then((result) => {
console.log("redoing: ",result[0])
});
Describe alternatives you've considered Thought about doing this...
for( let i = 1; i <= 4; i++) {
nSQL().extend("hist", "<");
}
Additional context I know you've moved on to 2.x so I understand if you wouldn't want to come back and implement anything new in 1.8.x. So, just wondering if you have any good solutions.
Thanks again for an awesome library!
A little more insight into what I'm trying to accomplish. My app contains a process of creating an object that needs to upsert 4 times in order to create the object. When the user wants to remove the object, the impression to the user of the app is that it should only be 1 process.
Hello Carvil,
I think you and me are the longest time users of nanoSQL! 😆
Yeah the 1.X versions are only getting bugfixes at this point. If you don't mind, I'll mark this as a feature request for the 2.X history plugin and make sure this feature gets in there.
Awesome. Thanks. I promise I'll upgrade to 2.x at some point. Way too many other things to deal with at this point in the project so I'm hesitant to add another thing at this point. At some point, I'll send you a link to the app I'm building.
Carvil, I'd like to keep this open until the history plugin is released, so I don't forget to implement this feature!
@ClickSimply - Scott, long time no talk, huh!
Have you added the history plugin to 2.x yet? I'm still using 1.8.5.
One question for you. I have config set like this:
.config({
mode: "PERM",
history: true
})
When I refresh my app (which uses the Chromium browser - still using Electron) does PERM cause the history to persist when it gets opened back up? I'd like history to be reset when the app either opens fresh or the window is refreshed.