Skip to content
Browse files

Merge branch 'develop' of github.com:hanshuebner/bknr-datastore into …

…develop
  • Loading branch information...
2 parents 38e9eef + 78b42c4 commit d1083a4343d26b12dd2e07c8c5d303239d38d40a @hanshuebner committed May 4, 2011
Showing with 9 additions and 6 deletions.
  1. +4 −4 src/data/json.lisp
  2. +2 −1 src/data/package.lisp
  3. +3 −1 src/data/txn.lisp
View
8 src/data/json.lisp
@@ -1,16 +1,16 @@
(in-package :bknr.datastore)
-(defparameter *ignore-slots* '(bknr.datastore::id bknr.indices::destroyed-p))
+(defparameter *json-ignore-slots* '(bknr.datastore::id bknr.indices::destroyed-p))
(defmacro with-json-ignore-slots ((&rest slots) &body body)
- `(let ((*ignore-slots* (append *ignore-slots* ,slots)))
+ `(let ((*json-ignore-slots* (append *json-ignore-slots* ,slots)))
,@body))
(defmethod json:encode ((object store-object) &optional (stream *standard-output*))
(json:with-output (stream)
(json:with-object ()
(dolist (slotdef (closer-mop:class-slots (class-of object)))
(when (and (slot-boundp object (closer-mop:slot-definition-name slotdef))
- (not (find (closer-mop:slot-definition-name slotdef) *ignore-slots*)))
- (json:encode-object-element (closer-mop:slot-definition-name slotdef)
+ (not (find (closer-mop:slot-definition-name slotdef) *json-ignore-slots*)))
+ (json:encode-object-element (string-downcase (closer-mop:slot-definition-name slotdef))
(slot-value object (closer-mop:slot-definition-name slotdef))))))))
View
3 src/data/package.lisp
@@ -125,7 +125,8 @@
#:ensure-store-current-directory
;; JSON serialization
- #:with-json-ignore-slots))
+ #:with-json-ignore-slots
+ #:*json-ignore-slots*))
(defpackage :bknr.datastore.tests
(:use :cl :bknr.datastore :bknr.indices :unit-test))
View
4 src/data/txn.lisp
@@ -468,7 +468,9 @@ to the log file in an atomic group"))
(setf execution-time (- (common-lisp::get-internal-run-time) start-time)))
(retry-transaction ()
:report (lambda (stream) (format stream "Retry the transaction ~A." transaction))
- (go again))))
+ (go again))
+ (skip-transaction ()
+ :report (lambda (stream) (format stream "Skip the transaction ~A." transaction)))))
(incf (store-transaction-run-time *store*) execution-time)
retval))

0 comments on commit d1083a4

Please sign in to comment.
Something went wrong with that request. Please try again.