Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spanner: various bug fixes + test coverage #2313

Merged
merged 16 commits into from
May 31, 2017
Merged

spanner: various bug fixes + test coverage #2313

merged 16 commits into from
May 31, 2017

Conversation

callmehiphop
Copy link
Contributor

@callmehiphop callmehiphop commented May 16, 2017

Closes #2273
Closes #2197
Closes #2176

@callmehiphop callmehiphop added api: spanner Issues related to the Spanner API. status: do not merge labels May 16, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 16, 2017
Copy link
Contributor

@stephenplusplus stephenplusplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial thoughts before I look at the tests.

}

var isSpecialNumber = is.infinite(field) ||
(typeof field === 'number' && isNaN(field));

This comment was marked as spam.

This comment was marked as spam.

@@ -577,6 +593,25 @@ Database.prototype.run = function(query, options, callback) {
* .on('end', function() {});
*
* //-
* // If you need to enforce a specific param type, a types map can be provided.
* // This is typically useful if your param value can be null.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

var type = reqOpts.types[prop]
var child;

if (is.object(type)) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


for (var prop in reqOpts.params) {
var field = reqOpts.params[prop];

if (!reqOpts.types[prop]) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -347,10 +349,10 @@ Table.prototype.insert = function(keyVals, callback) {
* be yielded. If using a composite key, provide an array within this array.
* See the example below.
* @param {string=} query.index - The name of an index on the table.
* @param {number} query.limit - The number of rows to return.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

.then(function() {
var promise = Promise.resolve();

for (var i = 0; i < 5; i++) {

This comment was marked as spam.

return database.create()
.then(onPromiseOperationComplete)
.then(function() {
return table.create(multiline.stripIndent(function() {/*

This comment was marked as spam.

var gaxOptions = reqOpts.gaxOptions;
delete reqOpts.gaxOptions;

config.method(reqOpts, gaxOptions, function(err, resp) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

var reqOpts = extend({
session: this.session.formattedName_
}, config.reqOpts);

var gaxOptions = reqOpts.gaxOptions;
delete reqOpts.gaxOptions;

return config.method(reqOpts, gaxOptions);
// return config.method(reqOpts, gaxOptions);

This comment was marked as spam.

requestStream.on('error', function(err) {
if (err.code !== ABORTED) {
userStream.emit('error', err);
return;

This comment was marked as spam.

This comment was marked as spam.

* params: {
* name: 'Eddie Wilson'
* sql: 'SELECT * FROM Singers WHERE name = @name AND id = @id',
* params: {,

This comment was marked as spam.

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants