id,node_id,number,state,locked,title,user,user_label,body,created_at,updated_at,closed_at,merged_at,merge_commit_sha,assignee,assignee_label,milestone,milestone_label,draft,head,base,author_association,repo,repo_label,url,merged_by,merged_by_label,auto_merge 300580221,MDExOlB1bGxSZXF1ZXN0MzAwNTgwMjIx,8,closed,0,Use less RAM,9599,simonw,Closes #7,2019-07-24T06:35:01Z,2019-07-24T06:35:52Z,2019-07-24T06:35:52Z,2019-07-24T06:35:52Z,c8392df78ee3e1643d18b747a4abf585d84d5d88,,,,,0,6261500b01274a739176480774e82b31f2926e7f,5d7e14d40d5a4cfd133ca5faa442312f607784c5,MEMBER,197882382,healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/pull/8,,, 521054612,MDExOlB1bGxSZXF1ZXN0NTIxMDU0NjEy,13,open,0,SQLite does not have case sensitive columns,1689944,tomaskrehlik,"This solves a weird issue when there is record with metadata key that is only different in letter cases. See the test for details.",2020-11-14T20:12:32Z,2021-08-24T13:28:26Z,,,38856acbc724ffdb8beb9e9f4ef0dbfa8ff51ad1,,,,,0,3e1b2945bc7c31be59e89c5fed86a5d2a59ebd5a,71e36e1cf034b96de2a8e6652265d782d3fdf63b,FIRST_TIME_CONTRIBUTOR,197882382,healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/pull/13,,, 561512503,MDExOlB1bGxSZXF1ZXN0NTYxNTEyNTAz,15,open,0,added try / except to write_records ,9857779,ryancheley,"to keep the data write from failing if it came across an error during processing. In particular when trying to convert my HealthKit zip file (and that of my wife's) it would consistently error out with the following: ``` db.py 1709 insert_chunk result = self.db.execute(query, params) db.py 226 execute return self.conn.execute(sql, parameters) sqlite3.OperationalError: too many SQL variables --------------------------------------------------------------------------------------------------------------------------------------------------------------------- db.py 1709 insert_chunk result = self.db.execute(query, params) db.py 226 execute return self.conn.execute(sql, parameters) sqlite3.OperationalError: too many SQL variables --------------------------------------------------------------------------------------------------------------------------------------------------------------------- db.py 1709 insert_chunk result = self.db.execute(query, params) db.py 226 execute return self.conn.execute(sql, parameters) sqlite3.OperationalError: table rBodyMass has no column named metadata_HKWasUserEntered --------------------------------------------------------------------------------------------------------------------------------------------------------------------- healthkit-to-sqlite 8 sys.exit(cli()) core.py 829 __call__ return self.main(*args, **kwargs) core.py 782 main rv = self.invoke(ctx) core.py 1066 invoke return ctx.invoke(self.callback, **ctx.params) core.py 610 invoke return callback(*args, **kwargs) cli.py 57 cli convert_xml_to_sqlite(fp, db, progress_callback=bar.update, zipfile=zf) utils.py 42 convert_xml_to_sqlite write_records(records, db) utils.py 143 write_records db[table].insert_all( db.py 1899 insert_all self.insert_chunk( db.py 1720 insert_chunk self.insert_chunk( db.py 1720 insert_chunk self.insert_chunk( db.py 1714 insert_chunk result = self.db.execute(query, params) db.py 226 execute return self.conn.execute(sql, parameters) sqlite3.OperationalError: table rBodyMass has no column named metadata_HKWasUserEntered ``` Adding the try / except in the `write_records` seems to fix that issue. ",2021-01-26T03:56:21Z,2021-01-26T03:56:21Z,,,8527278a87e448f57c7c6bd76a2d85f12d0233dd,,,,,0,7f1b168c752b5af7c1f9052dfa61e26afc83d574,71e36e1cf034b96de2a8e6652265d782d3fdf63b,FIRST_TIME_CONTRIBUTOR,197882382,healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/pull/15,,, 592364255,MDExOlB1bGxSZXF1ZXN0NTkyMzY0MjU1,16,open,0,"Add a fallback ID, print if no ID found",1234956,n8henrie,"Fixes https://github.com/dogsheep/healthkit-to-sqlite/issues/14 ",2021-03-13T13:38:29Z,2021-03-13T14:44:04Z,,,16ab307b2138891f226a66e4954c5470de753a0f,,,,,0,27b3d54ccfe7d861770a9d0b173f6503580fea4a,71e36e1cf034b96de2a8e6652265d782d3fdf63b,FIRST_TIME_CONTRIBUTOR,197882382,healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/pull/16,,, 596627780,MDExOlB1bGxSZXF1ZXN0NTk2NjI3Nzgw,18,open,0,Add datetime parsing,1234956,n8henrie,"Parses the datetime columns so they are subsequently properly recognized as datetime. Fixes https://github.com/dogsheep/healthkit-to-sqlite/issues/17 ",2021-03-19T14:34:22Z,2021-03-19T14:34:22Z,,,c87f4e8aa88ec277c6b5a000670c2cb42a10c03d,,,,,0,e0e7a0f99f844db33964b27c29b0b8d5f160202b,71e36e1cf034b96de2a8e6652265d782d3fdf63b,FIRST_TIME_CONTRIBUTOR,197882382,healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/pull/18,,, 718734191,MDExOlB1bGxSZXF1ZXN0NzE4NzM0MTkx,22,open,0,Make sure that case-insensitive column names are unique,32016596,FabianHertwig,"This closes #21. When there are metadata entries with the same case insensitive string, then there is an error when trying to create a new column for that metadata entry in the database table, because a column with that case insensitive name already exists. ```xml ``` The code added in this PR checks if a key already exists in a record and if so adds a number at its end. The resulting column names look like the example below then. Interestingly, the column names viewed with Datasette are not case insensitive. ```text startDate, endDate, value, unit, sourceName, sourceVersion, creationDate, metadata_meal, metadata_Meal_2, metadata_Mahlzeit ``` ",2021-08-24T13:13:38Z,2021-08-24T13:26:20Z,,,c757d372c10284cd6fa58d144549bc89691341c3,,,,,0,b16fb556f84a0eed262a518ca7ec82a467155d23,9fe3cb17e03d6c73222b63e643638cf951567c4c,FIRST_TIME_CONTRIBUTOR,197882382,healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/pull/22,,, 1182000455,PR_kwDOC8tyDs5Gc-VH,23,open,0,Include workout statistics,2129,badboy,"Not sure when this changed (iOS 16 maybe?), but the `WorkoutStatistics` now has a whole bunch of information about workouts, e.g. for runs it contains the distance (as a `` element). Adding it as another column at leat allows me to pull these out (using SQLite's JSON support). I'm running with this patch on my own data now.",2023-01-01T17:29:56Z,2023-01-01T17:29:57Z,,,e0ad45055f363810085119f26df87a6804451056,,,,,0,d5b9e3609961515cc52bcc5ef070e3b83b473339,9fe3cb17e03d6c73222b63e643638cf951567c4c,FIRST_TIME_CONTRIBUTOR,197882382,healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/pull/23,,,