Add 'distinct' to primaryKeyQuery.

and relax restrictions of HDBC version.
Add support of bit field value.