Related Tables Extension

Hierarchy

Constructors

Properties

Methods

addAttributesRelationship addAttributesRelationshipWithAttributesTable addAttributesRelationshipWithAttributesTableAndMappingTable addAttributesRelationshipWithMappingTable addFeaturesRelationship addFeaturesRelationshipWithMappingTable addMediaRelationship addMediaRelationshipWithMappingTable addRelationship addRelationshipWithExtendedRelation addRelationshipWithMappingTableAndRelationAuthorAndRelationName addRelationshipWithMappingTableAndRelationName addRelationshipWithMappingTableAndRelationType addRelationshipWithRelatedTable addRelationshipWithRelatedTableAndMappingTable addRelationshipWithRelatedTableAndRelationNameAndMappingTable addRelationshipWithRelationAuthorAndRelationName addRelationshipWithRelationName addRelationshipWithRelationType addRelationshipWithUserTable addRelationshipWithUserTableAndMappingName addRelationshipWithUserTableAndMappingTable addSimpleAttributesRelationship addSimpleAttributesRelationshipWithMappingTable addTilesRelationship addTilesRelationshipWithMappingTable addTilesRelationshipWithTileTable addTilesRelationshipWithTileTableAndMappingTable buildRelationName countMappings countMappingsToBase countMappingsToBaseWithExtendedRelation countMappingsToBaseWithExtendedRelations countMappingsToRelated countMappingsToRelatedWithExtendedRelation countMappingsToRelatedWithExtendedRelations createExtendedRelationsTable createExtension createRelatedTable createUserMappingTable createUserMappingTableWithMappingTable deleteMappings deleteMappingsToBase deleteMappingsToBaseWithExtendedRelation deleteMappingsToBaseWithExtendedRelations deleteMappingsToRelated deleteMappingsToRelatedWithExtendedRelation deleteMappingsToRelatedWithExtendedRelations get getBaseTableRelations getExtendedRelationsDao getExtension getGeoPackage getMappingDao getMappingDaoWithExtendedRelation getMappingsForBase getMappingsForBaseWithExtendedRelation getMappingsForRelated getMappingsForRelatedWithExtendedRelation getMediaDao getMediaDaoWithExtendedRelation getMediaDaoWithMediaTable getOrCreate getOrCreateExtension getPrimaryKeyColumnName getRelatedRows getRelatedTableRelations getRelations getRelationsWithBaseTableAndRelatedTable getRelationsWithBaseTableAndRelatedTableAndMappingTable getRelationsWithBaseTableAndRelatedTableAndRelationAndMappingTable getRelationships getSimpleAttributesDao getSimpleAttributesDaoWithExtendedRelation getSimpleAttributesDaoWithSimpleAttributesTable getTableRelations getUserDao getUserMappingDao has hasBaseTableRelations hasExtension hasExtensionForMappingTable hasExtensions hasMapping hasMappingForBaseOrRelatedId hasMappingToBase hasMappingToBaseWithExtendedRelation hasMappingToBaseWithExtendedRelations hasMappingToRelated hasMappingToRelatedWithExtendedRelation hasMappingToRelatedWithExtendedRelations hasRelatedTableRelations hasRelations hasRelationsWithBaseTableAndRelatedTable hasRelationsWithBaseTableAndRelatedTableAndMappingTable hasRelationsWithBaseTableAndRelatedTableAndRelationAndMappingTable hasTableRelations removeExtension removeRelationship removeRelationshipWithExtendedRelation removeRelationshipWithRelationAuthorAndRelationName removeRelationshipWithRelationType removeRelationships removeRelationshipsWithMappingTable setContents verifyWritable getExtendedRelationsDaoFromGeoPackage

Constructors

Properties

Connection to the GeoPackage

extensionDefinition: string

Definition for the extension

extensionName: string

Name of the extension

extensionsDao: ExtensionsDao

ExtensionDao

geoPackage: GeoPackage

GeoPackage

tableName: string

extension table name

EXTENSION_AUTHOR: "gpkg" = GeoPackageConstants.EXTENSION_AUTHOR

Extension author

EXTENSION_DEFINITION: "http://www.geopackage.org/18-000.html" = 'http://www.geopackage.org/18-000.html'

Extension definition URL

EXTENSION_NAME: string = ...

Extension, with author and name

EXTENSION_NAME_NO_AUTHOR: "related_tables" = 'related_tables'

Extension name without the author

Methods

  • Adds an attributes relationship between the base table and related attributes table. Creates a default user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • relatedAttributesTableName: string

      related attributes table name

    • mappingTableName: string

      mapping table name

    Returns ExtendedRelation

  • Adds an attributes relationship between the base table and user attributes related table. Creates a default user mapping table and the attributes table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • attributesTable: AttributesTable

      user attributes table

    • mappingTableName: string

      user mapping table name

    Returns ExtendedRelation

  • Adds an attributes relationship between the base table and related attributes table. Creates the user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • relatedAttributesTableName: string

      related attributes table name

    • userMappingTable: UserMappingTable

      user mapping table

    Returns ExtendedRelation

  • Adds a features relationship between the base feature and related feature table. Creates a default user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseFeaturesTableName: string

      base features table name

    • relatedFeaturesTableName: string

      related features table name

    • mappingTableName: string

      mapping table name

    Returns ExtendedRelation

  • Adds a features relationship between the base feature and related feature table. Creates the user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseFeaturesTableName: string

      base features table name

    • relatedFeaturesTableName: string

      related features table name

    • userMappingTable: UserMappingTable

      user mapping table

    Returns ExtendedRelation

  • Adds a media relationship between the base table and user media related table. Creates a default user mapping table and the media table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • mediaTable: MediaTable

      user media table

    • mappingTableName: string

      user mapping table name

    Returns ExtendedRelation

  • Adds a relationship between the base and related table. Creates the user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • relatedTableName: string

      related table name

    • userMappingTable: UserMappingTable

      user mapping table

    • relationAuthor: string

      relation author

    • relationName: string

      relation name

    Returns ExtendedRelation

  • Adds a relationship between the base and related table. Creates the user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • relatedTableName: string

      related table name

    • userMappingTable: UserMappingTable

      user mapping table

    • relationName: string

      relation name

    Returns ExtendedRelation

  • Adds a relationship between the base and related table. Creates a default user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • relatedTableName: string

      related table name

    • mappingTableName: string

      mapping table name

    • relationAuthor: string

      relation author

    • relationName: string

      relation name

    Returns ExtendedRelation

  • Adds a relationship between the base and related table. Creates a default user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • relatedTableName: string

      related table name

    • mappingTableName: string

      mapping table name

    • relationName: string

      relation name

    Returns ExtendedRelation

  • Adds a relationship between the base and related table. Creates a default user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • relatedTableName: string

      related table name

    • mappingTableName: string

      mapping table name

    • relationType: RelationType

      relation type

    Returns ExtendedRelation

  • Adds a simple attributes relationship between the base table and user simple attributes related table. Creates a default user mapping table and the simple attributes table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • simpleAttributesTable: SimpleAttributesTable

      user simple attributes table

    • mappingTableName: string

      user mapping table name

    Returns ExtendedRelation

  • Adds a tiles relationship between the base table and related tiles table. Creates a default user mapping table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • relatedTilesTableName: string

      related tiles table name

    • mappingTableName: string

      mapping table name

    Returns ExtendedRelation

  • Adds a tiles relationship between the base table and user tiles related table. Creates a default user mapping table and the tile table if needed.

    Returns

    The relationship that was added

    Parameters

    • baseTableName: string

      base table name

    • tileTable: TileTable

      user tile table

    • mappingTableName: string

      user mapping table name

    Returns ExtendedRelation

  • Build the custom relation name with author

    Returns

    custom relation name

    Parameters

    • author: string

      relation author

    • name: string

      base relation name

    Returns string

  • Count the number of mappings to the base table and id

    Returns

    mappings count

    Parameters

    • baseTable: string

      base table name

    • baseId: number

      base id

    Returns number

  • Count the number of mappings to the related table and id

    Returns

    mappings count

    Parameters

    • relatedTable: string

      related table name

    • relatedId: number

      related id

    Returns number

  • Create the extension

    Parameters

    • extensionName: string
    • tableName: string
    • columnName: string
    • definition: string
    • scopeType: string

    Returns number

  • Create a default user mapping table and extension row if either does not exist. When not created, there is no guarantee that an existing table has the same schema as the provided tabled.

    Returns

    true if table was created, false if the table already existed

    Parameters

    • mappingTableName: string

      user mapping table name

    Returns boolean

  • Create a user mapping table and extension row if either does not exist. When not created, there is no guarantee that an existing table has the same schema as the provided tabled.

    Returns

    true if table was created, false if the table already existed

    Parameters

    Returns boolean

  • Delete mappings to the base table and id

    Returns

    rows deleted

    Parameters

    • baseTable: string

      base table name

    • baseId: number

      base id

    Returns number

  • Delete mappings to the related table and id

    Returns

    rows deleted

    Parameters

    • relatedTable: string

      related table name

    • relatedId: number

      related id

    Returns number

  • Get the extension for the name, table name and column name

    Returns

    Parameters

    • extensionName: string

      extension name

    • Optional tableName: string

      table name

    • Optional columnName: string

      column name

    Returns Extensions

  • Get the related id mappings for the base id

    Returns

    IDs representing the matching related IDs

    Parameters

    • tableName: string

      mapping table name

    • baseId: number

      base id

    Returns number[]

  • Get the base id mappings for the related id

    Returns

    IDs representing the matching base IDs

    Parameters

    • tableName: string

      mapping table name

    • relatedId: number

      related id

    Returns number[]

  • Get the relations matching the non null provided values

    Returns

    extended relations

    Parameters

    • Optional baseTable: string

      base table name

    • Optional baseColumn: string

      base primary column name

    • Optional relatedTable: string

      related table name

    • Optional relatedColumn: string

      related primary column name

    • Optional relation: string

      relation name

    • Optional mappingTable: string

      mapping table name

    Returns ExtendedRelation[]

  • Get the relations matching the non null provided values

    Returns

    extended relations

    Parameters

    • baseTable: string

      base table name

    • relatedTable: string

      related table name

    • mappingTable: string

      mapping table name

    Returns ExtendedRelation[]

  • Get the relations matching the non null provided values

    Returns

    extended relations

    Parameters

    • baseTable: string

      base table name

    • relatedTable: string

      related table name

    • relation: string

      relation name

    • mappingTable: string

      mapping table name

    Returns ExtendedRelation[]

  • Determine if there are relations to the base table

    Returns

    true if has extended relations

    Parameters

    • baseTable: string

      base table name

    Returns boolean

  • Determine if the GeoPackage has the extension

    Returns

    if the extension exists

    Parameters

    • extensionName: string

      extension name

    • tableName: string

      table name

    • columnName: string

      column name

    Returns boolean

  • Determine if the GeoPackage has the extension for the mapping table

    Returns

    true if has extension

    Parameters

    • mappingTable: string

      mapping table name

    Returns boolean

  • Determine if the base id and related id mapping exists

    Returns

    true if mapping exists

    Parameters

    • tableName: string

      mapping table name

    • baseId: number

      base id

    • relatedId: number

      related id

    Returns boolean

  • Determine if a mapping to the table and id exists

    Returns

    true if mapping exists

    Parameters

    • table: string

      table name

    • id: number

      table id

    Returns boolean

  • Determine if a mapping to the base table and id exists

    Returns

    true if mapping exists

    Parameters

    • baseTable: string

      base table name

    • baseId: number

      base id

    Returns boolean

  • Determine if a mapping to the related table and id exists

    Returns

    true if mapping exists

    Parameters

    • relatedTable: string

      related table name

    • relatedId: number

      related id

    Returns boolean

  • Determine if there are relations to the related table

    Returns

    true if has extended relations

    Parameters

    • relatedTable: string

      related table name

    Returns boolean

  • Determine if has one or more relations matching the non null provided values

    Returns

    true if has relations

    Parameters

    • baseTable: string

      base table name

    • baseColumn: string

      base primary column name

    • relatedTable: string

      related table name

    • relatedColumn: string

      related primary column name

    • relation: string

      relation name

    • mappingTable: string

      mapping table name

    Returns boolean

  • Determine if has one or more relations matching the base table and related table

    Parameters

    • baseTable: string

      base table name

    • relatedTable: string

      related table name

    Returns boolean

  • Determine if has one or more relations matching the non null provided values

    Returns

    true if has relations

    Parameters

    • baseTable: string

      base table name

    • relatedTable: string

      related table name

    • mappingTable: string

      mapping table name

    Returns boolean

  • Determine if has one or more relations matching the non null provided values

    Returns

    true if has relations

    Parameters

    • baseTable: string

      base table name

    • relatedTable: string

      related table name

    • relation: string

      relation name

    • mappingTable: string

      mapping table name

    Returns boolean

  • Remove a specific relationship from the GeoPackage

    Parameters

    • baseTableName: string

      base table name

    • relatedTableName: string

      related table name

    • relationName: string

      relation name

    Returns void

  • Remove a specific relationship from the GeoPackage

    Parameters

    • baseTableName: string

      base table name

    • relatedTableName: string

      related table name

    • relationAuthor: string

      relation author

    • relationName: string

      relation name

    Returns void

  • Remove a specific relationship from the GeoPackage

    Parameters

    • baseTableName: string

      base table name

    • relatedTableName: string

      related table name

    • relationType: RelationType

      relation type

    Returns void

Generated using TypeDoc