mongo-sql icon indicating copy to clipboard operation
mongo-sql copied to clipboard

create index action and create-table option

Open Meaglin opened this issue 10 years ago • 3 comments

Allow defining an index when creating a table and also create index query type.

Meaglin avatar Jun 02 '15 18:06 Meaglin

Hey, @Meaglin I've been on vacation for the past week, so I'm just getting to my notifications.

When you say defining an index when creating a table, do you mean to allow the create-table query to output multiple queries? If so, I think that may be out-of-scope of the project.

However, we do need to add a create-index query type. I will take care of that in #117

jrf0110 avatar Jun 08 '15 14:06 jrf0110

I'm actually using mongo-sql for both postgres and mysql. And in mysql you can define ur index inside your create table query:

CREATE TABLE 'name' ( 'id' int(10) primary, 'name' varchar(255), 'status' varchar(255), unique 'unique key name' ('name', 'status'), key 'key name' ('id', 'name') )

And i was also missing the separate option to define an index: CREATE INDEX 'index_name' ('id','status') as covered by #117

Meaglin avatar Jun 08 '15 14:06 Meaglin

Interesting. That actually shouldn't be too bad to support

jrf0110 avatar Jun 08 '15 16:06 jrf0110