![]() Some object and feature classes with class extensions.Versioned datasets in enterprise geodatabases.Feature classes participating in a network dataset.Feature classes participating in a geometric network.Feature classes participating in a topology.The following includes some dataset types that can only be edited within an edit session: Opening simultaneous insert or update operations on the same workspace using different cursors requires the start of an edit session. However, using a del statement to delete the object or wrapping the cursor in a function to have the cursor object go out of scope should be considered to guard against all locking cases. Update cursors also support with statements to reset iteration and aid in removal of locks. When reading BLOB fields, a memoryview object is returned.Update cursors can be iterated using a for loop. In Python, BLOB fields can accept strings, bytearray, and memoryviews. You can use a cursor to load or view the contents of a BLOB field. ArcGIS stores annotation and dimensions as BLOBs, and items such as images, multimedia, or bits of code can be stored in this type of field. Cursors and BLOB fieldsĪ binary large object (BLOB) is data stored as a long sequence of binary numbers. A dataset is not editable if an exclusive lock already exists. An exclusive lock is applied when edits are saved. Explicitly delete the cursor using the Python del statement.Īn edit session applies a shared lock to data during the edit session.Include the cursor inside a with statement, which will guarantee the release of locks regardless of whether or not the cursor is successfully completed.A cursor can released by one of the following: Otherwise, all other applications or scripts could be unnecessarily prevented from accessing a dataset. In Python, the lock persists until the cursor is released. If these functions successfully create a cursor, they apply an exclusive lock on the dataset so that two scripts cannot create an update or insert cursor on the same dataset. The UpdateCursor or InsertCursor function fails because of an exclusive lock on the dataset. Update and insert cursors cannot be created for a table or feature class if an exclusive lock exists for that dataset. Editing and saving a feature class in a map, changing a table's schema, or using an insert cursor on a feature class in a Python IDE are examples of when an exclusive lock is applied by ArcGIS. Exclusive locks are applied when changes are made to a table or feature class.Displaying a feature class and previewing a table are examples of when a shared lock would be applied. Multiple shared locks can exist for a table, but no exclusive locks are permitted if a shared lock exists. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |