Skip to content
Snippets Groups Projects
  1. Apr 17, 2024
  2. Dec 22, 2023
  3. Oct 31, 2023
    • Dmitry Rodionov's avatar
      refactor: move cli related stuff to src/cli · e8ca68f1
      Dmitry Rodionov authored
      main.rs has grown a bit, adding new stuff to it doesnt feel natural.
      Smaller files are easier to digest. For me it is easier to find stuff
      when there are less files on the top level and some hierarchy shows.
      where to go. A while back I wanted to move sql command to separate
      file but there is already sql.rs on the top level.
      
      This patch solves this issue.
      e8ca68f1
  4. Oct 10, 2023
  5. Sep 21, 2023
    • Dmitry Rodionov's avatar
      SQL REPL PoC in rust without Lua · faca599c
      Dmitry Rodionov authored
      This patch adds new command `picodata sql`. Arguments are the same as `picodata connect`. The idea would be to eventually replace picodata connect with this version.
      
      Simple prerequisites for testing with auth:
      
      ```lua
      pico.create_user("Yoda", "12341234")
      pico.grant_privilege("Yoda", "execute", "role", "super")
      ```
      Super grant wont be needed in the future when access control will be tuned properly (access to system spaces, context: https://git.picodata.io/picodata/picodata/picodata/-/merge_requests/663).
      
      Then run `target/debug/picodata run` in one terminal and `target/debug/picodata sql Yoda@localhost:3301` in another one
      
      Features:
      - Usual lib readline goodies, backward/forward search etc. Provided by [rustyline](https://lib.rs/crates/rustyline)
      - Simple file based history (~/.picodata_history by default)
      - Displays result sets in ascii tables. Styling can be customized if needed. Here we're using [comfy-table](https://lib.rs/crates/comfy-table) library
      - If you type `\e` command your `$EDITOR` will be opened so you can write the query there. Once you close your editor the query will be executed (suggested by @funbringer)
      
      There are a lot of things we can add. Completion, highlighting, more special commands.
      
      Close #363 
      faca599c
  6. Sep 19, 2023
  7. Aug 16, 2023
  8. Aug 10, 2023
    • Georgy Moshkin's avatar
      Revert "fix: parent-child ipc communication" · 66ec40b8
      Georgy Moshkin authored
      This reverts commit 5a5a1919.
      66ec40b8
    • Georgy Moshkin's avatar
      fix: cleanup supervisor logs · d7480106
      Georgy Moshkin authored
      d7480106
    • Denis Smirnov's avatar
      fix: parent-child ipc communication · 5a5a1919
      Denis Smirnov authored
      When picodata process forks, the parent and child are connected by
      two unix pipes:
      - the fuse (used by the child to detect parent's death);
      - the ipc channel (used by the parent to get on-exit messages from
        the child to change its state in the finite-state machine);
      
      The problem was that the parent tried to read the message from the
      pipe right after the fork (and before the child's exit). Usually
      the pipe was empty at that moment and the parent collected serde's
      "failed to fill whole buffer" error instead the real message provided
      by the child.
      Verified
      5a5a1919
  9. Aug 02, 2023
  10. Jul 05, 2023
    • Dmitry Travyan's avatar
      refactor: cli address parsing · 9d91b461
      Dmitry Travyan authored and Yaroslav Dynnikov's avatar Yaroslav Dynnikov committed
      The following commands are affected:
      
      - `picodata connect [user@][host][:port]`
      - `picodata run --peer`
      - `picodata run --listen`
      - `picodata run --http-listen`
      - `picodata run --advertise`
      - `picodata expel --peer`
      
      Only `picodata connect` respects the username. Other options just ignore
      it.
      
      - Provide new `struct Address`
      - Replace `try_parse_address` function with `impl FromStr for Address`.
      - Provide both unit and pytests
      9d91b461
  11. Jun 22, 2023
  12. Apr 21, 2023
    • Dmitry Travyan's avatar
      feat: connect CLI · 62decb8b
      Dmitry Travyan authored and Yaroslav Dynnikov's avatar Yaroslav Dynnikov committed
      This patch introduces `picodata connect` CLI command. It allows
      connecting to interactive lua console of a picodata instance via iproto
      The whole implementation comes down to invoking a lua script with
      `require("console").start()`.
      62decb8b
  13. Mar 31, 2023
  14. Mar 29, 2023
  15. Feb 03, 2023
  16. Feb 01, 2023
  17. Jan 30, 2023
  18. Jan 27, 2023
  19. Jan 20, 2023
  20. Dec 23, 2022
  21. Dec 21, 2022
  22. Dec 16, 2022
  23. Dec 09, 2022
  24. Dec 08, 2022
  25. Dec 05, 2022
  26. Dec 02, 2022
Loading