The type of the bind variable name with "_has_next" appended to the element name defined in the for directory is resolved with the same Boolean. In the case of "_index", it returns an Int type. https://github.com/domaframework/doma/blob/50fb0db8d26ff0377a75019d3ae3596e68e81b88/doma-processor/src/main/java/org/seasar/doma/internal/apt/validator/SqlValidator.java#L255