-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #581 from aerospike/stage
Nodejs-Release-5.8.0
- Loading branch information
Showing
28 changed files
with
4,156 additions
and
3,646 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// ***************************************************************************** | ||
// Copyright 2023 Aerospike, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License") | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ***************************************************************************** | ||
|
||
'use strict' | ||
|
||
/** | ||
* @class Bin | ||
* @classdesc Aerospike Bin | ||
* | ||
* In the Aerospike database, each record (similar to a row in a relational database) stores | ||
* data using one or more bins (like columns in a relational database). The major difference | ||
* between bins and RDBMS columns is that you don't need to define a schema. Each record can | ||
* have multiple bins. Bins accept the data types listed {@link https://docs.aerospike.com/apidocs/nodejs/#toc4__anchor|here}. | ||
* | ||
* For information about these data types and how bins support them, see {@link https://docs.aerospike.com/server/guide/data-types/scalar-data-types|this}. | ||
* | ||
* Although the bin for a given record or object must be typed, bins in different rows do not | ||
* have to be the same type. There are some internal performance optimizations for single-bin namespaces. | ||
* | ||
* @summary Construct a new Aerospike Bin instance. | ||
* | ||
*/ | ||
class Bin { | ||
/** @private */ | ||
constructor (name, value, mapOrder) { | ||
/** | ||
* Bin name. | ||
* | ||
* @member {String} Bin#name | ||
*/ | ||
this.name = name | ||
|
||
/** | ||
* Bin value. | ||
* | ||
* @member {Any} Bin#value | ||
*/ | ||
if (mapOrder === 1) { | ||
this.value = new Map(Object.entries(value)) | ||
} else { | ||
this.value = value | ||
} | ||
} | ||
} | ||
|
||
module.exports = Bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.