Closed barnardb closed 3 years ago
Can we get this and the previous PR merged? Without these, kooky can't handle recent Chrome cookies.
Merged! Sorry for the delay!
Awesome, thanks for taking the time :)
PRs welcome if someone wants to set up CI! 🙂
The hardcoded column numbers were magical and unnecessary, and the row length checks were brittle and unnecessary.
This PR introduces a
TableRow
abstraction that provides methods for reading column values that give descriptive error messages if a required column is missing or doesn't have a value in a particular row. It then provides a smallVisitTableRows
function that serves as a richer equivalent to theVisitTableRecords
method from go-sqlite. TheReadCookies
methods for chrome and firefox are reworked in terms of these abstractions.This PR is a follow-on or alternative to #42. I couldn't fall asleep after writing #42 because my mind kept coming back to those length checks, so I got up and did this.