* Borrows a connection from the host and prepares the queries provided. * @param {Host} host * @param {String} keyspace * @param {Array} queries * @returns {Promise } * @private
(host, keyspace, queries)
| 241 | * @private |
| 242 | */ |
| 243 | static async _borrowAndPrepare(host, keyspace, queries) { |
| 244 | if (queries.length === 0) { |
| 245 | return; |
| 246 | } |
| 247 | |
| 248 | const connection = await PrepareHandler._borrowWithKeyspace(host, keyspace); |
| 249 | |
| 250 | for (const query of queries) { |
| 251 | await connection.prepareOnceAsync(query, keyspace); |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * Borrows a connection and changes the active keyspace on the connection, if needed. |
no test coverage detected