* A base class that represents a wrapper around the user provided query options with getter methods and proper * default values. * * Note that getter methods might return undefined when not set on the query options or default * Client options. *
| 33 | * </p> |
| 34 | */ |
| 35 | class ExecutionOptions { |
| 36 | |
| 37 | /** |
| 38 | * Creates a new instance of {@link ExecutionOptions}. |
| 39 | */ |
| 40 | constructor() { |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Creates an empty instance, where all methods return undefined, used internally. |
| 45 | * @ignore |
| 46 | * @return {ExecutionOptions} |
| 47 | */ |
| 48 | static empty() { |
| 49 | return new ExecutionOptions(); |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Determines if the stack trace before the query execution should be maintained. |
| 54 | * @abstract |
| 55 | * @returns {Boolean} |
| 56 | */ |
| 57 | getCaptureStackTrace() { |
| 58 | |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Gets the [Consistency level]{@link module:types~consistencies} to be used for the execution. |
| 63 | * @abstract |
| 64 | * @returns {Number} |
| 65 | */ |
| 66 | getConsistency() { |
| 67 | |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Key-value payload to be passed to the server. On the server side, implementations of QueryHandler can use |
| 72 | * this data. |
| 73 | * @abstract |
| 74 | * @returns {Object} |
| 75 | */ |
| 76 | getCustomPayload() { |
| 77 | |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Gets the amount of rows to retrieve per page. |
| 82 | * @abstract |
| 83 | * @returns {Number} |
| 84 | */ |
| 85 | getFetchSize() { |
| 86 | |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * When a fixed host is set on the query options and the query plan for the load-balancing policy is not used, it |
| 91 | * gets the host that should handle the query. |
| 92 | * @returns {Host} |
nothing calls this directly
no outgoing calls
no test coverage detected