Nano-SQL icon indicating copy to clipboard operation
Nano-SQL copied to clipboard

move more than one history point at a time

Open swampthang opened this issue 5 years ago • 5 comments

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!

swampthang avatar Aug 08 '19 17:08 swampthang

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.

swampthang avatar Aug 08 '19 17:08 swampthang

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.

only-cliches avatar Aug 08 '19 21:08 only-cliches

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.

swampthang avatar Aug 09 '19 12:08 swampthang

Carvil, I'd like to keep this open until the history plugin is released, so I don't forget to implement this feature!

only-cliches avatar Aug 12 '19 05:08 only-cliches

@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.

swampthang avatar Jun 04 '20 16:06 swampthang