Add func to fetch SQL definition for indices.

Also rearrange sql.Result and err declaration.
Fix index operations:

- Pass args as variadic params
- Tests for index operations
- Refactor fetchColumns