function buildStreamMetadata (stmtId, n) {
  const metadata = { n: int(n) }
  if (stmtId !== NO_STATEMENT_ID) {
    metadata.qid = int(stmtId)
  }
  return metadata
}
Create an object that represents streaming metadata.
@param {Integer|number} stmtId The query id to stream its results.
@param {Integer|number} n The number of records to stream.
@returns {Object} a metadata object.