@hebcal/geo-sqlite 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/geo-sqlite v3.5.0 */
1
+ /*! @hebcal/geo-sqlite v3.6.0 */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -55,6 +55,7 @@ FROM ZIPCodes_Primary`;
55
55
  const ZIP_COMPLETE_SQL = `SELECT ZipCode,CityMixedCase,State,Latitude,Longitude,TimeZone,DayLightSaving
56
56
  FROM ZIPCodes_Primary
57
57
  WHERE ZipCode LIKE ?
58
+ ORDER BY Population DESC
58
59
  LIMIT 10`;
59
60
  const GEONAME_COMPLETE_SQL = `SELECT geonameid, asciiname, admin1, country,
60
61
  population, latitude, longitude, timezone
@@ -244,6 +245,7 @@ class GeoDb {
244
245
  latitude: res.Latitude,
245
246
  longitude: res.Longitude,
246
247
  timezone: core.Location.getUsaTzid(res.State, res.TimeZone, res.DayLightSaving),
248
+ population: res.Population,
247
249
  geo: 'zip'
248
250
  };
249
251
  return obj;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/geo-sqlite v3.5.0 */
1
+ /*! @hebcal/geo-sqlite v3.6.0 */
2
2
  import Database from 'better-sqlite3';
3
3
  import { Location, Locale } from '@hebcal/core';
4
4
  import pino from 'pino';
@@ -43,6 +43,7 @@ FROM ZIPCodes_Primary`;
43
43
  const ZIP_COMPLETE_SQL = `SELECT ZipCode,CityMixedCase,State,Latitude,Longitude,TimeZone,DayLightSaving
44
44
  FROM ZIPCodes_Primary
45
45
  WHERE ZipCode LIKE ?
46
+ ORDER BY Population DESC
46
47
  LIMIT 10`;
47
48
  const GEONAME_COMPLETE_SQL = `SELECT geonameid, asciiname, admin1, country,
48
49
  population, latitude, longitude, timezone
@@ -232,6 +233,7 @@ class GeoDb {
232
233
  latitude: res.Latitude,
233
234
  longitude: res.Longitude,
234
235
  timezone: Location.getUsaTzid(res.State, res.TimeZone, res.DayLightSaving),
236
+ population: res.Population,
235
237
  geo: 'zip'
236
238
  };
237
239
  return obj;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/geo-sqlite",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal"
package/zips-dummy.sql CHANGED
@@ -6,5 +6,5 @@ CREATE TABLE ZIPCodes_Primary (
6
6
  Longitude decimal(12, 6),
7
7
  TimeZone char(2) NULL,
8
8
  DayLightSaving char(1) NULL,
9
- Elevation int NULL
9
+ Population int NULL
10
10
  );