-
-
Save callmehiphop/d6b780ad9a51e0a91625 to your computer and use it in GitHub Desktop.
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
// collection style | |
var qualifierCollection = [{ | |
family: 'user', | |
qualifier: 'tagged', | |
$: 'bfranklin' | |
}, { | |
family: 'user', | |
qualifier: 'tagger', | |
$: 'alincoln' | |
}]; | |
// simple hash using bigtable syntax | |
var qualifierSimpleHash = { | |
'user:tagged': 'bfranklin', | |
'user:tagger': 'alincoln' | |
}; | |
// nested objects | |
var qualifierNestedObjs = { | |
user: { | |
tagged: 'bfranklin', | |
tagger: 'alincoln' | |
} | |
}; |
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
var gcloud = require('gcloud')({ ... }); | |
var bigtable = gcloud.bigtable(); | |
var prezzy = bigtable.table('prezzy'); | |
var lincoln = prezzy.row('lincoln'); | |
// this is where that data would go | |
lincoln.put(qualifiers, function (err, apiResponse) { | |
if (err) console.log('sad times'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using this prezzy example:
Make
jadams
followwmckinley
:Make
tjefferson
,wmckinley
, andgwashington
followjadams
:Is that awful?