DBConn Redunduncy
In the last AISDB version 1.3.66, there seems to be a double opened connection to the database. For instance, next, we have a DBConn object that must be pre-initialized and passed to DBQuery according to the multi-database implementation. However, we must also inform the dbpath in the gen_qry from TrackGen.
rows = DBQuery(db=DBConn(dbpath=dbpath), start=start, end=end, callback=sqlfcn_callbacks.in_timerange_validmmsi)
tracks = TrackGen(rows.gen_qry(dbpath=dbpath))
The source code seems to be appending a new connection to the database when gen_qry is called and is not considering the connection that was previously opened in the DBQuery object using the same database. Is there a reason for this redundancy? Maybe the argument of gen_qry can be removed if the DBConn is opened to the same database.