jorgerojas26 / lazysql

A cross-platform TUI database management tool written in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for NULL

pnx opened this issue · comments

Hi, Looks like there is no support for null.

for example:

image
image

email_verified_at is nullable. and user id 1 has is set to null. there are 2 issues with this:

  1. Shows as a empty string in the table. should maybe be shown as "(null)" with even another text color if possible.
  2. Unable to set a value to null on either an existing row or when creating a new row.

attaching a image to show what happens to a datetime when trying to set a empty value. this is maybe fine as an emtpy value is actually not null. it fails correctly i think.

image

however you can't set it to "null" as it is still a string.

image

I think the cleanest way to solve this is to have a keybind i cell edit mode (maybe Ctrl + N) that will set the column to null. What do you guys think?

This is being worked here #73