move type to its own file
Parse big int in query's where clause properly

Fix #964