Source:
R/truncate.R
truncate_layer.Rd
Removes all features in a Feature Layer or Table and resets the object ID counter. Truncating a Feature Layer does not change the schema of the data (does not add, remove, or alter existing database columns, constraints, or indexes).
Arguments
- x
an object of class
FeatureLayer
,Table
, orImageServer
.- async
default
FALSE
. It is recommended to setTRUE
for larger datasets.- attachment_only
default
FALSE
. Deletes all the attachments for this layer. None of the layer features will be deleted whenTRUE
.- token
your authorization token.
Examples
if (FALSE) {
# authorize using code flow
set_arc_token(auth_code())
# create a FeatureLayer object
flayer <- arc_open("your-feature-layer-url")
# truncate it
truncate_layer(flayer)
}