diff --git a/CHANGELOG b/CHANGELOG index 01aa82b..87b824d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,9 @@ # -*- mode: org -*- +* v1.2.0 2021/09/28 + +- By default ~closql-get~ no longer proactively resolves all slots, + which is never actually unnecessary but often extremely expensive. + * v1.1.0 2021/09/27 - Added support for alternative database connectors. diff --git a/closql.el b/closql.el index 6b184ce..f521e7d 100644 --- a/closql.el +++ b/closql.el @@ -350,7 +350,7 @@ (eieio-object-class obj)) (error "Cannot reload object"))) -(cl-defmethod closql-get ((db closql-database) ident &optional class) +(cl-defmethod closql-get ((db closql-database) ident &optional class resolve) (unless class (setq class (oref-default db object-class))) (when-let ((row (car (emacsql db [:select * :from $i1 @@ -358,7 +358,7 @@ (oref-default class closql-table) (oref-default class closql-primary-key) ident)))) - (closql--remake-instance class db row t))) + (closql--remake-instance class db row resolve))) (cl-defmethod closql-query ((db closql-database) &optional select pred class) (if select