make cast use Number for rowid and pass schema instead of definition

definition is null for some reason but schema has my schema and Query wants a schema.

My db has no rowid in its schema.