Git Product home page Git Product logo

Comments (6)

kndndrj avatar kndndrj commented on July 20, 2024 1

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 })

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024 1

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

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024 1

breaking changes in #98:

  • layout contract changed
-- 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
-- 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)

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024

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

  • config.connections is deprecated and replaced with config.sources if you
    used this to specify your connections just replace this:

    {
      connections = {
        -- ...
      }
    }

    with this:

    {
      sources = {
        require("dbee.sources").MemorySource:new({
          -- ...
        },
      },
    }
  • 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 default da -> cw

  • config.drawer.mappings.collapse now disabled by default

  • config.drawer.mappings.expand now disabled by default

  • config.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

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024

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` }}.

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024

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"),
  },
}

from nvim-dbee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.