[Pkg-javascript-commits] [node-leveldown] 173/492: complete rename from LevelUP to LevelDOWN
Andrew Kelley
andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.
commit 18a003e6ef46a14fa7dfa24d3865ef815e238eaf
Author: Rod Vagg <rod at vagg.org>
Date: Sun Jan 20 22:19:56 2013 +1100
complete rename from LevelUP to LevelDOWN
---
binding.gyp | 4 ++--
index.js | 2 +-
src/async.cc | 8 ++++----
src/async.h | 6 +++---
src/batch.cc | 6 +++---
src/batch.h | 6 +++---
src/database.cc | 8 ++++----
src/database.h | 8 ++++----
src/database_async.cc | 8 ++++----
src/database_async.h | 6 +++---
src/iterator.cc | 32 ++++++++++++++++----------------
src/iterator.h | 10 +++++-----
src/iterator_async.cc | 12 ++++++------
src/iterator_async.h | 14 +++++++-------
src/{levelup.cc => leveldown.cc} | 14 +++++++-------
src/{levelup.h => leveldown.h} | 10 +++++-----
test/common.js | 12 ++++++------
17 files changed, 83 insertions(+), 83 deletions(-)
diff --git a/binding.gyp b/binding.gyp
index 6791563..8f16109 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -1,6 +1,6 @@
{
"targets": [{
- "target_name": "levelup"
+ "target_name": "leveldown"
, "dependencies": [
"<(module_root_dir)/deps/leveldb/leveldb.gyp:leveldb"
]
@@ -11,7 +11,7 @@
, "src/database_async.cc"
, "src/iterator.cc"
, "src/iterator_async.cc"
- , "src/levelup.cc"
+ , "src/leveldown.cc"
]
}]
}
diff --git a/index.js b/index.js
index 3e440e3..4e1e557 100644
--- a/index.js
+++ b/index.js
@@ -1 +1 @@
-module.exports = require('bindings')('levelup.node')
\ No newline at end of file
+module.exports = require('bindings')('leveldown.node')
\ No newline at end of file
diff --git a/src/async.cc b/src/async.cc
index 3642ffe..a75e705 100644
--- a/src/async.cc
+++ b/src/async.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#include <cstdlib>
@@ -11,7 +11,7 @@
#include "database.h"
-#include "levelup.h"
+#include "leveldown.h"
#include "async.h"
#include "batch.h"
diff --git a/src/async.h b/src/async.h
index 739b3f6..c3ce2db 100644
--- a/src/async.h
+++ b/src/async.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#ifndef LU_ASYNC_H
diff --git a/src/batch.cc b/src/batch.cc
index 7ae3a90..55e790d 100644
--- a/src/batch.cc
+++ b/src/batch.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#include <cstdlib>
diff --git a/src/batch.h b/src/batch.h
index 09f918b..8f6666d 100644
--- a/src/batch.h
+++ b/src/batch.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#ifndef LU_BATCH_H
diff --git a/src/database.cc b/src/database.cc
index 9dcdb94..81920aa 100644
--- a/src/database.cc
+++ b/src/database.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#include <cstdlib>
@@ -12,7 +12,7 @@
#include "leveldb/db.h"
-#include "levelup.h"
+#include "leveldown.h"
#include "database.h"
#include "async.h"
#include "database_async.h"
diff --git a/src/database.h b/src/database.h
index 3d10bb5..c0c3e54 100644
--- a/src/database.h
+++ b/src/database.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#ifndef LU_DATABASE_H
@@ -11,7 +11,7 @@
#include "leveldb/db.h"
-#include "levelup.h"
+#include "leveldown.h"
using namespace std;
using namespace v8;
diff --git a/src/database_async.cc b/src/database_async.cc
index 4a527ee..88f71dd 100644
--- a/src/database_async.cc
+++ b/src/database_async.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#include <cstdlib>
@@ -11,7 +11,7 @@
#include "database.h"
-#include "levelup.h"
+#include "leveldown.h"
#include "async.h"
#include "database_async.h"
#include "batch.h"
diff --git a/src/database_async.h b/src/database_async.h
index d3f2fb2..84b77cb 100644
--- a/src/database_async.h
+++ b/src/database_async.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#ifndef LU_DATABASE_ASYNC_H
diff --git a/src/iterator.cc b/src/iterator.cc
index 76220b2..7d154b6 100644
--- a/src/iterator.cc
+++ b/src/iterator.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#include <cstdlib>
@@ -16,9 +16,9 @@
using namespace std;
using namespace v8;
using namespace node;
-using namespace levelup;
+using namespace leveldown;
-bool levelup::Iterator::GetIterator () {
+bool leveldown::Iterator::GetIterator () {
if (dbIterator == NULL) {
dbIterator = database->NewIterator(options);
if (start != NULL)
@@ -32,7 +32,7 @@ bool levelup::Iterator::GetIterator () {
return false;
}
-bool levelup::Iterator::IteratorNext (string& key, string& value) {
+bool leveldown::Iterator::IteratorNext (string& key, string& value) {
if (!GetIterator()) {
if (reverse)
dbIterator->Prev();
@@ -58,18 +58,18 @@ bool levelup::Iterator::IteratorNext (string& key, string& value) {
}
}
-Status levelup::Iterator::IteratorStatus () {
+Status leveldown::Iterator::IteratorStatus () {
return dbIterator->status();
}
-void levelup::Iterator::IteratorEnd () {
+void leveldown::Iterator::IteratorEnd () {
//TODO: could return it->status()
delete dbIterator;
dbIterator = NULL;
}
//void *ctx, void (*callback)(void *ctx, Slice key, Slice value)
-Handle<Value> levelup::Iterator::Next (const Arguments& args) {
+Handle<Value> leveldown::Iterator::Next (const Arguments& args) {
HandleScope scope;
Iterator* iterator = ObjectWrap::Unwrap<Iterator>(args.This());
Persistent<Function> endCallback = Persistent<Function>::New(Local<Function>::Cast(args[0]));
@@ -83,7 +83,7 @@ Handle<Value> levelup::Iterator::Next (const Arguments& args) {
return Undefined();
}
-Handle<Value> levelup::Iterator::End (const Arguments& args) {
+Handle<Value> leveldown::Iterator::End (const Arguments& args) {
HandleScope scope;
Iterator* iterator = ObjectWrap::Unwrap<Iterator>(args.This());
Persistent<Function> endCallback = Persistent<Function>::New(Local<Function>::Cast(args[0]));
@@ -95,9 +95,9 @@ Handle<Value> levelup::Iterator::End (const Arguments& args) {
return Undefined();
}
-Persistent<Function> levelup::Iterator::constructor;
+Persistent<Function> leveldown::Iterator::constructor;
-void levelup::Iterator::Init () {
+void leveldown::Iterator::Init () {
Local<FunctionTemplate> tpl = FunctionTemplate::New(New);
tpl->SetClassName(String::NewSymbol("Iterator"));
tpl->InstanceTemplate()->SetInternalFieldCount(2);
@@ -106,7 +106,7 @@ void levelup::Iterator::Init () {
constructor = Persistent<Function>::New(tpl->GetFunction());
}
-Handle<Value> levelup::Iterator::NewInstance (const Arguments& args) {
+Handle<Value> leveldown::Iterator::NewInstance (const Arguments& args) {
HandleScope scope;
Handle<Value> argv[2] = {
@@ -118,7 +118,7 @@ Handle<Value> levelup::Iterator::NewInstance (const Arguments& args) {
return scope.Close(instance);
}
-Handle<Value> levelup::Iterator::New (const Arguments& args) {
+Handle<Value> leveldown::Iterator::New (const Arguments& args) {
HandleScope scope;
Database* database = ObjectWrap::Unwrap<Database>(args[0]->ToObject());
@@ -153,7 +153,7 @@ Handle<Value> levelup::Iterator::New (const Arguments& args) {
return args.This();
}
-Handle<Value> levelup::CreateIterator (const Arguments& args) {
+Handle<Value> leveldown::CreateIterator (const Arguments& args) {
HandleScope scope;
- return scope.Close(levelup::Iterator::NewInstance(args));
+ return scope.Close(leveldown::Iterator::NewInstance(args));
}
diff --git a/src/iterator.h b/src/iterator.h
index bbefb3a..8d967fb 100644
--- a/src/iterator.h
+++ b/src/iterator.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#ifndef LU_ITERATOR_H
@@ -9,14 +9,14 @@
#include <cstdlib>
#include <node.h>
-#include "levelup.h"
+#include "leveldown.h"
#include "database.h"
using namespace std;
using namespace v8;
using namespace leveldb;
-namespace levelup {
+namespace leveldown {
LU_OPTION ( start );
LU_OPTION ( end );
diff --git a/src/iterator_async.cc b/src/iterator_async.cc
index 08fd5c4..34691b3 100644
--- a/src/iterator_async.cc
+++ b/src/iterator_async.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#include <cstdlib>
@@ -11,7 +11,7 @@
#include "database.h"
-#include "levelup.h"
+#include "leveldown.h"
#include "async.h"
#include "iterator_async.h"
@@ -23,7 +23,7 @@ using namespace leveldb;
/** NEXT WORKER **/
NextWorker::NextWorker (
- levelup::Iterator* iterator
+ leveldown::Iterator* iterator
, Persistent<Function> dataCallback
, Persistent<Function> endCallback
) : AsyncWorker(database, dataCallback)
@@ -66,7 +66,7 @@ void NextWorker::HandleOKCallback () {
/** END WORKER **/
EndWorker::EndWorker (
- levelup::Iterator* iterator
+ leveldown::Iterator* iterator
, Persistent<Function> endCallback
) : AsyncWorker(database, endCallback)
, iterator(iterator)
diff --git a/src/iterator_async.h b/src/iterator_async.h
index 8690730..25be7b1 100644
--- a/src/iterator_async.h
+++ b/src/iterator_async.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#ifndef LU_ITERATOR_ASYNC_H
@@ -19,7 +19,7 @@ using namespace leveldb;
class NextWorker : public AsyncWorker {
public:
NextWorker (
- levelup::Iterator* iterator
+ leveldown::Iterator* iterator
, Persistent<Function> dataCallback
, Persistent<Function> endCallback
);
@@ -29,7 +29,7 @@ public:
virtual void HandleOKCallback ();
private:
- levelup::Iterator* iterator;
+ leveldown::Iterator* iterator;
Persistent<Function> endCallback;
string key;
string value;
@@ -39,7 +39,7 @@ private:
class EndWorker : public AsyncWorker {
public:
EndWorker (
- levelup::Iterator* iterator
+ leveldown::Iterator* iterator
, Persistent<Function> endCallback
);
@@ -47,7 +47,7 @@ public:
virtual void Execute ();
private:
- levelup::Iterator* iterator;
+ leveldown::Iterator* iterator;
};
#endif
diff --git a/src/levelup.cc b/src/leveldown.cc
similarity index 72%
rename from src/levelup.cc
rename to src/leveldown.cc
index 7a893c5..6adbb40 100644
--- a/src/levelup.cc
+++ b/src/leveldown.cc
@@ -1,27 +1,27 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
#include <node.h>
-#include "levelup.h"
+#include "leveldown.h"
#include "database.h"
#include "iterator.h"
using namespace v8;
using namespace node;
-using namespace levelup;
+using namespace leveldown;
void Init (Handle<Object> target) {
Database::Init();
- levelup::Iterator::Init();
+ leveldown::Iterator::Init();
target->Set(String::NewSymbol("createDatabase"), FunctionTemplate::New(CreateDatabase)->GetFunction());
target->Set(String::NewSymbol("createIterator"), FunctionTemplate::New(CreateIterator)->GetFunction());
}
-NODE_MODULE(levelup, Init)
+NODE_MODULE(leveldown, Init)
// util
diff --git a/src/levelup.h b/src/leveldown.h
similarity index 90%
rename from src/levelup.h
rename to src/leveldown.h
index 344eeaf..0786d4a 100644
--- a/src/levelup.h
+++ b/src/leveldown.h
@@ -1,10 +1,10 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
-#ifndef LU_LEVELUP_H
-#define LU_LEVELUP_H
+#ifndef LU_LEVELDOWN_H
+#define LU_LEVELDOWN_H
#define LU_STR(key) \
static Persistent<String> str_ ## key = Persistent<String>::New(String::New(#key));
diff --git a/test/common.js b/test/common.js
index 84ee425..02f3eef 100644
--- a/test/common.js
+++ b/test/common.js
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2013 LevelUP contributors
- * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+/* Copyright (c) 2012-2013 LevelDOWN contributors
+ * See list at <https://github.com/rvagg/node-leveldown#contributing>
+ * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE>
*/
var ba = require('buster').assertions
@@ -8,7 +8,7 @@ var ba = require('buster').assertions
, rimraf = require('rimraf')
, fs = require('fs')
, path = require('path')
- , levelup = require('../lib/levelup.js')
+ , leveldown = require('../lib/leveldown.js')
, child_process = require('child_process')
, dbidx = 0
@@ -35,7 +35,7 @@ ba.add('isUndefined', {
})
module.exports.nextLocation = function () {
- return path.join(__dirname, 'levelup_test_db_' + dbidx++)
+ return path.join(__dirname, 'leveldown_test_db_' + dbidx++)
}
module.exports.openTestDatabase = function () {
@@ -46,7 +46,7 @@ module.exports.openTestDatabase = function () {
rimraf(location, function (err) {
refute(err)
this.cleanupDirs.push(location)
- levelup(location, options, function (err, db) {
+ leveldown(location, options, function (err, db) {
refute(err)
if (!err) {
this.closeableDatabases.push(db)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git
More information about the Pkg-javascript-commits
mailing list