Update sqlite implemenation to make it compile