Open kndndrj opened 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 })
A refactor is happening on refactor/first
branch. It will be merged once some testing is done.
Any feedback would be appreciated.
Breaking changes introduced with #55 :
config.extra_helpers
variables changed to go template syntax (from {table}
to {{ .Table }}
) - see default config for more
config.page_size
-> config.result.page_size
require"dbee.spinners"
removed
config.progress_bar
-> config.result.progress
config.progress_bar.icon
-> config.result.progress.spinner
ALL MAPPINGS:
action = { key = "key", mode = "mode" }
-> { key = "key", mode = "mode", action = "action" }
config.ui
-> config.window_layout
:
the whole ui config section is deprecated and layout interface is used instead.
connection environment variable syntax changed to go template function syntax: {{ env.VARIABLE }}
-> {{ env "VARIABLE" }}
or {{ env `VARIABLE` }}
.
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"),
},
}
breaking changes in #98:
-- from this:
---@class Layout
---@field open fun(self: Layout, uis: layout_uis) function to open ui.
---@field close fun(self: Layout) function to close ui.
-- 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)
Here is the first set of breaking changes introduced with #9:
config.connections
is deprecated and replaced withconfig.sources
if you used this to specify your connections just replace this:with this:
config.result.window_command
->config.ui.window_commands.result
config.result.page_size
->config.page_size
config.drawer.window_command
->config.ui.window_commands.drawer
config.drawer.mappings.action_2
defaultda
->cw
config.drawer.mappings.collapse
now disabled by defaultconfig.drawer.mappings.expand
now disabled by defaultconfig.drawer.disable_icons
->config.drawer.disable_candies
config.drawer.icons
->config.drawer.candies
config.drawer.icons.*.highlight
->config.drawer.candies.*.icon_highlight
config.editor.window_command
->config.ui.window_commands.editor