sasha-alias / sqltabs

Rich SQL client for Postgresql, MySQL, MS SQL, Amazon Redshift, Google Firebase (Firestore)
https://www.sqltabs.com
GNU General Public License v3.0
803 stars 57 forks source link

Option to hide default table column #102

Open aperaham opened 7 years ago

aperaham commented 7 years ago

Hi,

Occasionally, I have found that it would be convenient to to hide the default ordinal '#' column, making quick copy and pasting easier.

May I suggest adding an additional parameter to the table options? For example: --- table default=false

Or perhaps an option to hide the default column in the preferences menu.

It seems the code responsible is here: sqlDoc/src/SqlDoc.js#L435, and I would be happy to contribute code to the feature with your approval.

hide_ordinal

Regardless, thank you for your work with sqltabs!

sasha-alias commented 7 years ago

Hi,

I agree, this would be a useful feature. I was thinking about it for some time already. I propose to add a rownum parameter to a table block, default is not descriptive enough:

--- table rownum=false

Since there is already hlr option for a table block and some more options are in plans (like pageby) I think this would be a step in right direction.

The codeline you pointed is responsible only for column header # rendering. The real rownums are rendered here

A contribution is very appreciated. I'm currently working on other features, so you can create a pull request, I will review it and help to adjust the things. Feel free to ask any details about development process, unfortunately I lack good contribution documentation.

aperaham commented 7 years ago

I think --- table rownum=false makes more sense. Thank you for pointing me in the right directing where code is concerned.

aperaham commented 7 years ago

pull request submitted to sqldoc here

sasha-alias commented 7 years ago

yeah, I've seen it it and it looks good. Just I'm on vacation atm and having limited connectivity. I will review it and merge once I'm back. Also I saw your question regarding sqldoc vs sqltabs development. Let me address it a bit later as well. ETA ~2 weeks. Sorry for delay

aperaham commented 7 years ago

Sounds great, thank you! I thought I should follow up by posting here in case you hadn't been alerted by the pull request to the sqldocs project, but also I wanted to document the ticket. Hope your vacation is a pleasant one. Thanks again!