ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Search Ask AI
ScyllaDB Docs ScyllaDB Node.js Driver API Reference Modules mapping Result

Result¶

mapping~Result(rs, info, rowAdapter)

Represents the result of an execution as an iterable of objects in the Mapper.

Constructor¶

new Result(rs, info, rowAdapter)

Creates a new instance of Result.

Parameters:
Name Type Description
rs ResultSet
info ModelMappingInfo
rowAdapter function

Source

mapping/result.js, line 12

Members¶

length :Number

Gets the amount of the documents contained in this Result instance.

When the results are paged, it returns the length of the current paged results not the total amount of rows in the table matching the query.

Type:
  • Number

Source

mapping/result.js, line 41

pageState :String

A string token representing the current page state of query.

When provided, it can be used in the following executions to continue paging and retrieve the remained of the result for the query.

Type:
  • String
Default Value:
  • null

Source

mapping/result.js, line 51

Methods¶

(generator) Symbol.iterator()

Returns a new Iterator object that contains the document values.

Source

mapping/result.js, line 80

first()

Gets the first document in this result or null when the result is empty.

Source

mapping/result.js, line 70

forEach(callback, thisArgopt)

Executes a provided function once per result element.

Parameters:
Name Type Attributes Description
callback function

Function to execute for each element, taking two arguments: currentValue and index.

thisArg Object <optional>

Value to use as this when executing callback.

Source

mapping/result.js, line 108

toArray() → {Array:.<Object:>}

Converts the current instance to an Array of documents.

Source

mapping/result.js, line 95

Returns:
Type
Array:.<Object:>

wasApplied()

When this instance is the result of a conditional update query, it returns whether it was successful. Otherwise, it returns true.

For consistency, this method always returns true for non-conditional queries (although there is no reason to call the method in that case). This is also the case for conditional DDL statements (CREATE KEYSPACE... IF NOT EXISTS, CREATE TABLE... IF NOT EXISTS), for which the server doesn't return information whether it was applied or not.

Source

mapping/result.js, line 63

Was this page helpful?

PREVIOUS
ModelMapper
NEXT
UnderscoreCqlToCamelCaseMappings
  • Create an issue
  • Edit this page

On this page

  • Result
    • Constructor
    • Members
    • Methods
ScyllaDB Node.js Driver
Search Ask AI
  • main
    • main
  • API Reference
    • Modules
      • auth
        • AuthProvider
        • Authenticator
        • PlainTextAuthProvider
      • concurrent
      • datastax
      • errors
        • ArgumentError
        • AuthenticationError
        • BusyConnectionError
        • DriverInternalError
        • NoHostAvailableError
        • NotSupportedError
        • OperationTimedOutError
        • ResponseError
      • geometry
      • mapping
        • DefaultTableMappings
        • Mapper
        • ModelBatchItem
        • ModelMapper
        • Result
        • UnderscoreCqlToCamelCaseMappings
        • TableMappings
      • metadata
        • Aggregate
        • ClientState
        • ColumnMetadata
        • Index
        • KeyspaceMetadata
        • MaterializedView
        • Metadata
        • SchemaFunction
        • Strategy
        • TableMetadata
        • UdtField
        • UserDefinedType
      • metrics
        • DefaultMetrics
        • ClientMetrics
      • policies
        • addressResolution
          • AddressTranslator
          • EC2MultiRegionTranslator
          • MappingAddressTranslator
        • loadBalancing
          • AllowListPolicy
          • DCAwareRoundRobinPolicy
          • DefaultLoadBalancingPolicy
          • LegacyDefaultLoadBalancingPolicy
          • LoadBalancingConfig
          • LoadBalancingPolicy
          • RoundRobinPolicy
          • TokenAwarePolicy
        • reconnection
          • ConstantReconnectionPolicy
          • ExponentialReconnectionPolicy
          • ReconnectionPolicy
        • retry
          • FallthroughRetryPolicy
          • RetryPolicy
        • speculativeExecution
          • ConstantSpeculativeExecutionPolicy
          • NoSpeculativeExecutionPolicy
          • SpeculativeExecutionPolicy
        • timestampGeneration
          • MonotonicTimestampGenerator
          • TimestampGenerator
      • tracker
        • RequestLogger
        • RequestTracker
      • types
        • Duration
        • InetAddress
        • Integer
        • LocalDate
        • Long
        • ResultSet
        • ResultStream
        • Row
        • TimeUuid
        • Vector
    • Classes
      • AddressResolver
      • ByteOrderedToken
      • Client
      • Encoder
      • EncoderMembers
      • ExecutionOptions
      • ExecutionProfile
      • FrameReader
      • HashSet
      • Host
      • HostMap
      • LineString
      • Murmur3Token
      • Point
      • Polygon
      • PreparedInfo
      • RandomToken
      • SslOptions
      • Token
      • TokenRange
    • Interfaces
    • Events
    • Global Functions and Constants
Docs Tutorials University Contact Us About Us
© 2026 ScyllaDB | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 14 May 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.2