-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added back datastore v1beta3 samples.
- Loading branch information
Showing
9 changed files
with
1,793 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,120 @@ | ||
// Copyright 2015, Google, 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'; | ||
|
||
var Entity = require('../../datastore/concepts').Entity; | ||
var entity; | ||
|
||
describe('datastore/concepts/entity', function () { | ||
before(function() { | ||
var projectId = process.env.TEST_PROJECT_ID || 'nodejs-docs-samples'; | ||
entity = new Entity(projectId); | ||
}); | ||
|
||
describe('incomplete key', function() { | ||
it('saves with an incomplete key', function(done) { | ||
entity.testIncompleteKey(done); | ||
}); | ||
}); | ||
|
||
describe('testNamedKey', function() { | ||
it('saves with a named key', function(done) { | ||
entity.testNamedKey(done); | ||
}); | ||
}); | ||
|
||
describe('testKeyWithParent', function() { | ||
it('saves a key with a parent', function(done) { | ||
entity.testKeyWithParent(done); | ||
}); | ||
}); | ||
|
||
describe('testKeyWithMultiLevelParent', function() { | ||
it('saves a key with multiple parents', function(done) { | ||
entity.testKeyWithMultiLevelParent(done); | ||
}); | ||
}); | ||
|
||
describe('testEntityWithParent', function() { | ||
it('saves an entity with a parent', function(done) { | ||
entity.testEntityWithParent(done); | ||
}); | ||
}); | ||
|
||
describe('testProperties', function() { | ||
it('saves an entity with properties', function(done) { | ||
entity.testProperties(done); | ||
}); | ||
}); | ||
|
||
describe('testArrayValue', function() { | ||
it('saves an entity with arrays', function(done) { | ||
entity.testArrayValue(done); | ||
}); | ||
}); | ||
|
||
describe('testBasicEntity', function() { | ||
it('saves a basic entity', function(done) { | ||
entity.testBasicEntity(done); | ||
}); | ||
}); | ||
|
||
describe('testUpsert', function() { | ||
it('saves with an upsert', function(done) { | ||
entity.testUpsert(done); | ||
}); | ||
}); | ||
|
||
describe('testInsert', function() { | ||
it('saves with an insert', function(done) { | ||
entity.testInsert(done); | ||
}); | ||
}); | ||
|
||
describe('testLookup', function() { | ||
it('performs a lookup', function(done) { | ||
entity.testLookup(done); | ||
}); | ||
}); | ||
|
||
describe('testUpdate', function() { | ||
it('saves with an update', function(done) { | ||
entity.testUpdate(done); | ||
}); | ||
}); | ||
|
||
describe('testDelete', function() { | ||
it('deletes an entity', function(done) { | ||
entity.testDelete(done); | ||
}); | ||
}); | ||
|
||
describe('testBatchUpsert', function() { | ||
it('performs a batch upsert', function(done) { | ||
entity.testBatchUpsert(done); | ||
}); | ||
}); | ||
|
||
describe('testBatchLookup', function() { | ||
it('performs a batch lookup', function(done) { | ||
entity.testBatchLookup(done); | ||
}); | ||
}); | ||
|
||
describe('testBatchDelete', function() { | ||
it('performs a batch delete', function(done) { | ||
entity.testBatchDelete(done); | ||
}); | ||
}); | ||
}); |
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,37 @@ | ||
indexes: | ||
- kind: Task | ||
properties: | ||
- name: done | ||
- name: priority | ||
direction: desc | ||
- kind: Task | ||
properties: | ||
- name: priority | ||
- name: percent_complete | ||
- kind: Task | ||
properties: | ||
- name: type | ||
- name: priority | ||
- kind: Task | ||
properties: | ||
- name: priority | ||
- name: created | ||
- kind: Task | ||
properties: | ||
- name: done | ||
- name: created | ||
- kind: Task | ||
properties: | ||
- name: type | ||
- name: priority | ||
direction: desc | ||
- kind: Task | ||
properties: | ||
- name: type | ||
- name: created | ||
- kind: Task | ||
properties: | ||
- name: priority | ||
direction: desc | ||
- name: created | ||
|
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,38 @@ | ||
// Copyright 2015, Google, 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'; | ||
|
||
var Index = require('../../datastore/concepts').Index; | ||
var index; | ||
|
||
describe('datastore/concepts/indexes', function () { | ||
before(function() { | ||
var projectId = process.env.TEST_PROJECT_ID || 'nodejs-docs-samples'; | ||
index = new Index(projectId); | ||
}); | ||
|
||
describe('unindexed properties', function() { | ||
it('performs a query with a filter on an unindexed property', | ||
function(done) { | ||
index.testUnindexedPropertyQuery(done); | ||
} | ||
); | ||
}); | ||
|
||
describe('exploding properties', function() { | ||
it('inserts arrays of data', function(done) { | ||
index.testExplodingProperties(done); | ||
}); | ||
}); | ||
}); |
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,48 @@ | ||
// Copyright 2015, Google, 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'; | ||
|
||
var Metadata = require('../../datastore/concepts').Metadata; | ||
var metadata; | ||
|
||
describe('datastore/concepts/metadata', function () { | ||
before(function() { | ||
var projectId = process.env.TEST_PROJECT_ID || 'nodejs-docs-samples'; | ||
metadata = new Metadata(projectId); | ||
}); | ||
|
||
describe('namespace query', function() { | ||
it('performs a namespace query', function(done) { | ||
metadata.testNamespaceRunQuery(done); | ||
}); | ||
}); | ||
|
||
describe('kinds query', function() { | ||
it('performs a kind query', function(done) { | ||
metadata.testKindRunQuery(done); | ||
}); | ||
}); | ||
|
||
describe('property query', function() { | ||
it('performs a property query', function(done) { | ||
metadata.testPropertyRunQuery(done); | ||
}); | ||
}); | ||
|
||
describe('property by kind query', function() { | ||
it('performs a property by kind query', function(done) { | ||
metadata.testPropertyByKindRunQuery(done); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.