forked from redis/redis
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CPP client added thanks to Brian Hammond
- Loading branch information
Showing
22 changed files
with
2,736 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Redis C++ Client Library Makefile | ||
|
||
#CFLAGS?= -pedantic -O2 -Wall -W -DNDEBUG | ||
CFLAGS?= -pedantic -O0 -W -DDEBUG -g | ||
CC = g++ | ||
|
||
CLIENTOBJS = anet.o redisclient.o | ||
LIBNAME = libredisclient.a | ||
|
||
TESTAPP = test_client | ||
TESTAPPOBJS = test_client.o | ||
TESTAPPLIBS = $(LIBNAME) -lstdc++ | ||
|
||
all: $(LIBNAME) $(TESTAPP) | ||
|
||
$(LIBNAME): $(CLIENTOBJS) | ||
ar rcs $(LIBNAME) $(CLIENTOBJS) | ||
|
||
.c.o: | ||
$(CC) -c $(CFLAGS) $< | ||
|
||
.cpp.o: | ||
$(CC) -c $(CFLAGS) $< | ||
|
||
$(TESTAPP): $(LIBNAME) $(TESTAPPOBJS) | ||
$(CC) -o $(TESTAPP) $(TESTAPPOBJS) $(TESTAPPLIBS) | ||
|
||
test: $(TESTAPP) | ||
@./test_client | ||
|
||
check: test | ||
|
||
clean: | ||
rm -rf $(LIBNAME) *.o $(TESTAPP) | ||
|
||
dep: | ||
$(CC) -MM *.c *.cpp | ||
|
||
log: | ||
git log '--pretty=format:%ad %s' --date=short > Changelog | ||
|
||
anet.o: anet.c fmacros.h anet.h | ||
redisclient.o: redisclient.cpp redisclient.h anet.h | ||
|
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,16 @@ | ||
redis-cpp-client | ||
================ | ||
|
||
* A C++ client for the Redis_ key-value database (which is hosted at github_). | ||
* This client has no external dependencies other than g++ (no Boost for instance). | ||
* It uses anet from antirez_ (redis' author), which is bundled. | ||
* This client is licensed under the same license as redis. | ||
* Tested on Linux and Mac OS X. | ||
|
||
* This is a work in progress. I will update this README when the client is "done". | ||
If I had to put a version number on it right now, I'd call it version 0.85 | ||
|
||
.. _Redis: http://code.google.com/p/redis/ | ||
.. _github: http://github.com/antirez/redis/tree/master | ||
.. _antirez: https://github.com/antirez | ||
|
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,9 @@ | ||
+ finish command implementations | ||
= finish unit tests | ||
Only a few left, to test the SORT command's edge cases (e.g. BY pattern) | ||
+ determine if we should not use bool return values and instead throw redis_error. (latter). | ||
+ maybe more fine-grained exceptions (not just redis_error but operation_not_permitted_error, etc.) | ||
- benchmarking | ||
- consistent hashing? | ||
- make all string literals constants so they can be easily changed (minor) | ||
- add conveniences that store a std::set in its entirety (same for std::list, std::vector) |
Oops, something went wrong.