Here's my unit test:
This outputs:
Values for table: myDB.areas:
(1). '_sht_name', 'areas'.
(1). 'id', table: 09A55080
(2). 'database', 'map'.
(2). 'type', 'string'.
(2). 'name', 'id'.
(2). 'sheet', 'areas'.
(1). 'name', table: 09A55058
(2). 'database', 'map'.
(2). 'type', 'string'.
(2). 'name', 'name'.
(2). 'sheet', 'areas'.
(1). '_db_name', 'map'.
Values for table: fetched:
(1). '1', table: 09A55030
(2). '_row_id', '1'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '2', table: 09A550A8
(2). '_row_id', '2'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '3', table: 09A550F8
(2). '_row_id', '3'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '4', table: 09A550D0
(2). '_row_id', '4'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '5', table: 09A55120
(2). '_row_id', '5'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '6', table: 09A55148
(2). '_row_id', '6'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '7', table: 09A55170
(2). '_row_id', '7'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '8', table: 09A55198
(2). '_row_id', '8'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '9', table: 09A551C0
(2). '_row_id', '9'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '10', table: 09A551E8
(2). '_row_id', '10'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '11', table: 09A55210
(2). '_row_id', '11'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '12', table: 09A55238
(2). '_row_id', '12'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '13', table: 09A55260
(2). '_row_id', '13'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '14', table: 09A55288
(2). '_row_id', '14'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '15', table: 09A552B0
(2). '_row_id', '15'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '16', table: 09A552D8
(2). '_row_id', '16'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '17', table: 09A55300
(2). '_row_id', '17'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '18', table: 09A55328
(2). '_row_id', '18'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '19', table: 09A55350
(2). '_row_id', '19'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '20', table: 09A55378
(2). '_row_id', '20'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '21', table: 09A553A0
(2). '_row_id', '21'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '22', table: 09A553C8
(2). '_row_id', '22'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '23', table: 09A553F0
(2). '_row_id', '23'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '24', table: 09A55418
(2). '_row_id', '24'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '25', table: 09A55440
(2). '_row_id', '25'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '26', table: 09A55468
(2). '_row_id', '26'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '27', table: 09A55490
(2). '_row_id', '27'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
(1). '28', table: 09A554B8
(2). '_row_id', '28'.
(2). 'name', 'Room#1'.
(2). 'id', '1'.
IE, each time the script is run, it adds another identical record to the sheet, where I think it should be replacing the record instead. I've tried closing mudlet and deleting the database_map.db file.
Any ideas?