Opened 15 years ago

Last modified 14 years ago

#1630 new enhancement

v.db.addcol: checkbox for data type

Reported by: pcav Owned by: nobody
Priority: minor: annoyance Milestone: Version 1.7.0
Component: GRASS Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

In current v.db.addcol, the user has to insert the type (integer, double precision, varchar) of the column by hand. Please replace this with a checkbox

Change History (5)

comment:1 by rblazek, 15 years ago

Did you consider that each database supports different types? So either we limit the options to VARCHAR, INT, DOUBLE PRECISION/REAL and DATE or we add more types but user can end up with error even if the type was offered in the list.

The best solution would be to add a function to all GRASS db drivers to return list of supported types and write an interface in qgis which will use those lists according to selected vector/layer (i.e. db). But that seems to be overkill to me at this moment.

Radim

comment:2 by pcav, 15 years ago

Agreed. I did not consider this. Perhaps this could be added ad a comment in the interface? Something like: "For PostgreSQL: varchar etc. For DBF:..."

comment:3 by rblazek, 15 years ago

Ok, GRASS modules support descriptions for each possible value, so we can show in combobox something like: int (All drivers) varchar (All drivers) datetime (Postgres, MySQL, Sqlite) etc.

But that is not very user friendly I think. My original idea with GRASS plugin was to add only the modules which are supported well in GUI.

We forgot also that various types can have additional parameters, e.g. NUMERIC(precision, scale), varchar(n), so it becomes realy messy because (with simple interface based on module description) we have to add also 2 numeric input options which usually becomes empty.

Please read olso my comments for #1631. I realy suggest to 'Add column' as QGIS new feature supported by all drivers.

Radim

comment:4 by pcav, 14 years ago

Please note: in GRASS wx interface the problem is the same

comment:5 by pcav, 14 years ago

Milestone: Version 1.0.3Version 1.6.0
Note: See TracTickets for help on using tickets.