def __query_spec(self):
spec = self.__spec<EOL>if not self.__is_command and "<STR_LIT>" not in self.__spec:<EOL><INDENT>spec = SON({"<STR_LIT>": self.__spec})<EOL><DEDENT>if self.__ordering:<EOL><INDENT>spec["<STR_LIT>"] = self.__ordering<EOL><DEDENT>if self.__explain:<EOL><INDENT>spec["<STR_LIT>"] = True<EOL><DEDENT>if self.__hint:<EOL><INDENT>spec["<STR_LIT>"] = self.__hint<EOL><DEDENT>if self.__comment:<EOL><INDENT>spec["<STR_LIT>"] = self.__comment<EOL><DEDENT>if self.__snapshot:<EOL><INDENT>spec["<STR_LIT>"] = True<EOL><DEDENT>if self.__max_scan:<EOL><INDENT>spec["<STR_LIT>"] = self.__max_scan<EOL><DEDENT>return spec<EOL>
Get the spec to use for a query.