added getTypeInt for query functions