-- returns: VersionRow -- albedo: binds version:INTEGER? SELECT v.version,v.entry,v.manifest,v.cell,v.created_at,v.bytes FROM artifact_versions v JOIN artifacts a ON a.id=v.artifact WHERE v.artifact=@id AND v.version=COALESCE(@version,a.version)