GeoEco.Datasets.SQLite.SQLiteTable
- class GeoEco.Datasets.SQLite.SQLiteTable(database, tableName, queryableAttributeValues=None, lazyPropertyValues=None)
Bases:
TableA
Tablerepresenting a SQLite table.- Parameters:
database (
SQLiteDatabase) –SQLiteDatabaseinstance that is the parent of thisSQLiteTableinstance.tableName (
str) – Name of the table. Minimum length꞉ 1.queryableAttributeValues (
dictmappingstrtoobject, optional) – Values of the queryable attributes, expressed as a dictionary mapping the case-insensitive names of queryable attributes to their values.lazyPropertyValues (
dictmappingstrtoobject, optional) – Lazy properties to set when this object is constructed, expressed as a dictionary mapping the names of lazy properties to their values.
- Returns:
SQLiteTableinstance.- Return type:
Properties
- property DisplayName
(
str) Informal name of this object, suitable to be displayed to the user. Read only. Minimum length꞉ 1.
- property Fields
(
listofFieldorNone)listofFields representing the fields of the table.Noneor an empty list if the table has no fields (this is unusual). Read only.
- property GeometryFieldName
(
strorNone) Name of the geometry field, orNoneif the table does not have geometry, or the geometry is not stored in a named field (as with shapefiles). Read only. Minimum length꞉ 1.
- property GeometryType
(
strorNone) Geometry type for the table, orNoneif the table does not have geometry. Read only. Allowed values꞉'Point','LineString','Polygon','MultiPoint','MultiLineString','MultiPolygon','GeometryCollection','Point25D','LineString25D','Polygon25D','MultiPoint25D','MultiLineString25D','MultiPolygon25D','GeometryCollection25D'. Case sensitive.
- property HasOID
(
bool) True if this table has an ArcGIS-style “object ID” field. Read only. ArcGIS usually requires tabular datasets to have an auto-incrementing integer field that uniquely identifies each row. This method returns True if such a field has been defined and the underlying programming library used to access the table identifies the field the object ID field.
- property MaxStringLength
(
intorNone) Maximum allowed length of string fields, orNoneif there is no maximum or it is unknown. Read only. Minimum value꞉ 1.
- property OIDFieldName
(
strorNone) Name of the ArcGIS-style “object ID” field, orNoneif there is no object ID field. Read only. Minimum length꞉ 1. The object ID field name usually depends on the underlying storage format. For example, it may be namedOIDorFIDin .DBF files or shapefiles, orOBJECTIDorESRI_OIDin geodatabase feature classes and tables. If the underlying format or programming library used to access it does not define or identify an object ID field, this property will beNone.
- property ParentCollection
(
DatasetCollectionorNone) ParentDatasetCollectionthat this object is part of (if any). Read only.
Methods
Adds a field to the table.
Closes any open files or connections associated with this object and releases any other resources allocated to access it.
Converts a spatial reference from one format to another, such as an OGC WKT string to a Proj4 string.
Creates an index on one or more fields of the table.
Deletes a field from the table.
Deletes an index from the table.
Deletes the lazy property with the specified name.
Returns a list of all queryable attributes.
Returns the
Fieldfor the specified field name, orNoneif no field exists with that name.Returns the value of the lazy property with the specified name.
Returns the queryable attribute with the specified name.
Returns the value of the queryable attribute with the specified name.
Returns a list queryable attributes having the specified data type.
Returns the number of rows in the table.
Returns the spatial reference of this dataset.
Returns True if the specified lazy property has a value.
Opens and returns an
InsertCursorfor adding rows to the table.Opens and returns a
SelectCursorfor reading rows from the table.Opens and returns an
UpdateCursorfor reading, updating, and deleting rows from the table.Queries the table and returns a
dictmapping field names to parallel lists of result values.Sets the lazy property with the specified name to the specified value.
Sets the spatial reference of this dataset.
Tests whether a capability is supported by this class or an instance of it.