Closed osedok closed 5 years ago
You can execute raw SQL within the GeoPackage
SQLite only supports a subset of common alter statements. Dropping a column requires a new table (see the 12 steps under Making Other Kinds Of Table Schema Changes).
@bosborn - Yes, that is what I am doing right now. Thanks.
Regards, Andrzej
I'm not opposed to trying to support this full set of operations as an API shortcut. We can leave this open to track the request.
Thanks, creating a method on the FeatureTable object would be fantastic. Thanks for considering it. The good thing would be also the option to keep all existing nga indices and metadata for the feature layer to speed up the process for larger layers.
SQLite 不支持删除字段,只能通过下面的方式实现
create table temp as select field1, field2, ..., from record
drop table record;
alter table temp rename to record;
Released 3.3.0. AlterTable does most of the work. You can remove user table columns here.
Dear Brian (@bosborn), I know there is no direct method to ALTER the table and remove the field in SQLite, but just as a curiosity - do you think of supporting this kind of operation as part of API?
At the moment I have kind of the workaround (copy table, delete, create, insert from copy) semi working in test but If you could say what you think about this that would be great.
Kind Regards, Andrzej