LINUX.ORG.RU

История изменений

Исправление monk, (текущая версия) :

https://github.com/fukamachi

то есть https://github.com/fukamachi/integral

У hu.dwim.perec какой-то наркоманский код.

Мне API показалось достаточно понятным.

Integral

(defclass user ()
  ((name :col-type text
         :initarg :name))
  (:metaclass <dao-table-class>))

Perec:

(defpclass* user ()
  ((name  "" :type string)))

Вроде читается не хуже.

А как в Integral сделать

(defpassociation*
  ((:class course :slot students :type (set student))
   (:class student :slot courses :type (set test)))
  (:dimensions (time)))
?

Чтобы можно было получить курсы указанного студента на указаную дату:

(with-transaction
  (with-time "2015-08-26"
     (with-revived-instance the-student
        (courses-of the-student))))

или хотя бы

(defpassociation*
  ((:class corporation
    :slot employees
    :type (set person))
   (:class person
    :slot employer
    :type corporation)))

Исходя из того, что я вижу в README у Integral там просто передрали http://clsql.b9.com/manual/update-instance-from-records.html (даже меньше: в clsql всё-таки был :join-class). Какой-то NIH синдром: выкинуть всё и сделать свой маленький чистый велосипед.

Исходная версия monk, :

https://github.com/fukamachi

то есть https://github.com/fukamachi/integral

У hu.dwim.perec какой-то наркоманский код.

Мне API показалось достаточно понятным.

Integral

(defclass user ()
  ((name :col-type text
         :initarg :name))
  (:metaclass <dao-table-class>))

Perec:

(defpclass* user ()
  ((name  "" :type string)))

Вроде читается не хуже.

А как в Integral сделать

(defpassociation*
  ((:class course :slot students :type (set student))
   (:class student :slot courses :type (set test)))
  (:dimensions (time)))
?

Чтобы можно было получить курсы указанного студента на указаную дату:

(with-transaction
  (with-time "2015-08-26"
     (with-revived-instance the-student
        (courses-of the-student))))

или хотя бы

(defassociation*
  ((:class corporation
    :slot employees
    :type (set person))
   (:class person
    :slot employer
    :type corporation)))

Исходя из того, что я вижу в README у Integral там просто передрали http://clsql.b9.com/manual/update-instance-from-records.html (даже меньше: в clsql всё-таки был :join-class). Какой-то NIH синдром: выкинуть всё и сделать свой маленький чистый велосипед.