kndndrj / nvim-dbee

Interactive database client for neovim
GNU General Public License v3.0
710 stars 48 forks source link

Breaking Changes Tracker #19

Open kndndrj opened 1 year ago

kndndrj commented 1 year ago

Here is the first set of breaking changes introduced with #9:

kndndrj commented 1 year ago

require"dbee".save() is deprecated and replaced by require"dbee".store()

require"dbee".save(format, file)
-- is the same as
require"dbee".store(format, "file", { extra_arg = file })
kndndrj commented 8 months ago

A refactor is happening on refactor/first branch. It will be merged once some testing is done. Any feedback would be appreciated.

kndndrj commented 7 months ago

Breaking changes introduced with #55 :

kndndrj commented 4 months ago

Breaking changes in #82:

default connection spec file location changes from vim.fn.stdpath("cache") to vim.fn.stdpath("state").

Add this to your config to keep the previous behaviour:

{
  sources = {

   require("dbee.sources").FileSource:new(vim.fn.stdpath("cache") .. "/dbee/persistence.json"),
  },
}
kndndrj commented 4 months ago

breaking changes in #98:

-- to this: ---@class Layout ---@field is_open fun(self: Layout):boolean function that returns the state of ui. ---@field open fun(self: Layout) function to open ui. ---@field close fun(self: Layout) function to close ui.


- source contract changed
```lua
-- from this:
---@class Source
---@field name fun(self: Source):string function to return the name of the source
---@field load fun(self: Source):ConnectionParams[] function to load connections from external source
---@field save? fun(self: Source, conns: ConnectionParams[], action: source_save_action) function to save connections to external source (optional)
---@field file? fun(self: Source):string function which returns a source file to edit (optional)

-- to this:
---@class Source
---@field name fun(self: Source):string function to return the name of the source
---@field load fun(self: Source):ConnectionParams[] function to load connections from external source
---@field create? fun(self: Source, details: ConnectionParams):connection_id create a connection and return its id (optional)
---@field delete? fun(self: Source, id: connection_id) delete a connection from its id (optional)
---@field update? fun(self: Source, id: connection_id, details: ConnectionParams) update provided connection (optional)
---@field file? fun(self: Source):string function which returns a source file to edit (optional)