• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ngageoint / geopackage-js / 4078143969

pending completion
4078143969

push

github

Christopher Caldwell
bump version

3593 of 8015 branches covered (44.83%)

Branch coverage included in aggregate %.

15102 of 20471 relevant lines covered (73.77%)

1564.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

74.29
/lib/features/user/featureTableReader.ts
1
import { UserTableReader } from '../../user/userTableReader';
1✔
2
import { FeatureColumn } from './featureColumn';
1✔
3
import { FeatureTable } from './featureTable';
1✔
4
import { GeometryColumns } from '../columns/geometryColumns';
1✔
5
import { TableColumn } from '../../db/table/tableColumn';
6

7
/**
8
 * Reads the metadata from an existing feature table
9
 */
10
export class FeatureTableReader extends UserTableReader<FeatureColumn, FeatureTable> {
1✔
11
  /**
12
   * Geometry column name
13
   */
14
  private readonly columnName: string;
15

16
  /**
17
   * Constructor
18
   * @param geometryColumns geometry columns
19
   */
20
  public constructor(geometryColumns: GeometryColumns);
21

22
  /**
23
   * Constructor
24
   * @param tableName table name
25
   * @param geometryColumnName geometry column name
26
   */
27
  public constructor(tableName: string, geometryColumnName: string);
28

29
  /**
30
   * Constructor, uses first or only found geometry column
31
   * @param tableName table name
32
   */
33
  public constructor(tableName: string);
34

35
  /**
36
   * Constructor
37
   * @param args
38
   */
39
  public constructor(...args) {
831✔
40
    if (args.length === 1) {
277!
41
      if (typeof args[0] === 'string') {
277✔
42
        super(args[0]);
3✔
43
      } else if (args[0] instanceof GeometryColumns) {
274!
44
        const geometryColumns = args[0];
274✔
45
        super(geometryColumns.getTableName());
274✔
46
        this.columnName = geometryColumns.getColumnName();
274✔
47
      }
48
    } else if (args.length === 2) {
×
49
      super(args[0]);
×
50
      this.columnName = args[1];
×
51
    }
52
  }
53

54
  /**
55
   * @inheritDoc
56
   */
57
  public createTable(tableName: string, columnList: FeatureColumn[]): FeatureTable {
1✔
58
    return new FeatureTable(tableName, this.columnName, columnList);
277✔
59
  }
60

61
  /**
62
   * @inheritDoc
63
   */
64
  public createColumn(tableColumn: TableColumn): FeatureColumn {
1✔
65
    return FeatureColumn.createColumnWithTableColumn(tableColumn);
1,825✔
66
  }
67
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc