Skip to content

Instantly share code, notes, and snippets.

@jmercouris
Last active February 12, 2019 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmercouris/5f4d60ea8e4757f0854cf679fe73b306 to your computer and use it in GitHub Desktop.
Save jmercouris/5f4d60ea8e4757f0854cf679fe73b306 to your computer and use it in GitHub Desktop.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Error
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Invalid initialization argument:
:PRODUCT
in call for class #<DAO-TABLE-CLASS SOCIALFLIGHT.WEB::SOCIAL-ACCOUNTS>.
[Condition of type SB-PCL::INITARG-ERROR]
See also:
Common Lisp Hyperspec, 7.1.2 [:section]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [ABORT] Return to sldb level 6.
2: [RETRY] Retry SLIME REPL evaluation request.
3: [ABORT] Return to sldb level 5.
4: [RETRY] Retry SLIME REPL evaluation request.
5: [ABORT] Return to sldb level 4.
--more--
Backtrace:
0: (SB-PCL::INITARG-ERROR #<DAO-TABLE-CLASS SOCIALFLIGHT.WEB::SOCIAL-ACCOUNTS> (:PRODUCT))
1: ((:METHOD MAKE-INSTANCE (CLASS)) #<DAO-TABLE-CLASS SOCIALFLIGHT.WEB::SOCIAL-ACCOUNTS> :USER #<USERS {10030C6003}> :PRODUCT #<PRODUCTS {100319FC53}> :USERNAME "Abc" :PASSWORD "PassWord" :CUSTOMER-TOKEN..
2: (SEED-DATABASE)
3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SEED-DATABASE) #<NULL-LEXENV>)
4: (EVAL (SEED-DATABASE))
--more--
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(make-instance 'social-accounts
:user user
:product product
:username "Abc"
:password "PassWord"
:customer-token "cus_EPN98W1NtGHnaK"
:subscription-token "sub_EPN9sG0OkWpLib"
:card-number-last-digits "1234"
:card-expiry-month "12"
:card-expiry-year "2022")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The Class
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#<DAO-TABLE-CLASS {1009195523}>
--------------------
Name: SOCIAL-ACCOUNTS
Super classes: #<DAO-TABLE-MIXIN MITO.DAO.MIXIN:SERIAL-PK-MIXIN>, #<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS>, #<DAO-TABLE-MIXIN MITO.DAO.MIXIN:RECORD-TIMESTAMPS-MIXIN>
Direct Slots: USER, USER-ID, USER, PRODUCT, PRODUCT-ID, PRODUCT, USERNAME, PASSWORD, CUSTOMER-TOKEN, SUBSCRIPTION-TOKEN, CARD-NUMBER-LAST-DIGITS, CARD-EXPIRY-MONTH, CARD-EXPIRY-YEAR, TARGETS
Effective Slots: CREATED-AT, UPDATED-AT, SYNCED, ID, USER, USER-ID, PRODUCT, PRODUCT-ID, USERNAME, PASSWORD, CUSTOMER-TOKEN, SUBSCRIPTION-TOKEN, CARD-NUMBER-LAST-DIGITS, CARD-EXPIRY-MONTH, CARD-EXPIRY-YEAR, TARGETS
Sub classes: BACK-OFFICE-USER
Precedence List: SOCIAL-ACCOUNTS, SERIAL-PK-MIXIN, DAO-CLASS, RECORD-TIMESTAMPS-MIXIN, STANDARD-OBJECT, SLOT-OBJECT, T
It is used as a direct specializer in the following methods:
((SETF CARD-EXPIRY-MONTH) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(CARD-EXPIRY-MONTH SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF CARD-EXPIRY-YEAR) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(CARD-EXPIRY-YEAR SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF CARD-NUMBER-LAST-DIGITS) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(CARD-NUMBER-LAST-DIGITS SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF CUSTOMER-TOKEN) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(CUSTOMER-TOKEN SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF PASSWORD) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(PASSWORD SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
(PRODUCT SOCIAL-ACCOUNTS)
((SETF PRODUCT) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
((SETF SOCIAL-ACCOUNTS-CARD-EXPIRY-MONTH) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-CARD-EXPIRY-MONTH SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-CARD-EXPIRY-YEAR) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-CARD-EXPIRY-YEAR SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-CARD-NUMBER-LAST-DIGITS) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-CARD-NUMBER-LAST-DIGITS SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-CUSTOMER-TOKEN) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-CUSTOMER-TOKEN SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-PASSWORD) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-PASSWORD SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-PRODUCT) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-PRODUCT SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-PRODUCT-ID) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-PRODUCT-ID SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-SUBSCRIPTION-TOKEN) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-SUBSCRIPTION-TOKEN SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-TARGETS) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-TARGETS SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-USER) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-USER SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-USER-ID) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-USER-ID SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SOCIAL-ACCOUNTS-USERNAME) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SOCIAL-ACCOUNTS-USERNAME SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF SUBSCRIPTION-TOKEN) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(SUBSCRIPTION-TOKEN SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
((SETF TARGETS) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(TARGETS SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
(USER SOCIAL-ACCOUNTS)
((SETF USER) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
((SETF USERNAME) T SOCIAL-ACCOUNTS)
Documentation: automatically generated writer method
(USERNAME SOCIAL-ACCOUNTS)
Documentation: automatically generated reader method
Prototype: #<SOCIAL-ACCOUNTS {10094369C3}>
--------------------
Group slots by inheritance [ ]
Sort slots alphabetically [X]
All Slots:
[ ] %CLASS-PRECEDENCE-LIST = (#<DAO-TABLE-CLASS APP.WEB::SOCIAL-ACCOUNTS> #<DAO-TABLE-MIXIN MITO.DAO.MIXIN:SERIAL-PK-MIXIN> #<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS> #<DAO-TABLE-MIXIN MITO.DAO.MIXIN:RECORD-TIMESTAMPS-MIXIN> #<STANDARD-CLASS COMMON-LISP:STANDARD-OBJECT> #<SB-PCL::SLOT-CLASS SB-PCL::SLOT-OBJECT> #<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>)
[ ] %DOCUMENTATION = NIL
[ ] %TYPE = (CLASS #<DAO-TABLE-CLASS APP.WEB::SOCIAL-ACCOUNTS>)
[ ] AUTO-PK = (:SERIAL)
[ ] CAN-PRECEDE-LIST = (#<SB-PCL:SYSTEM-CLASS COMMON-LISP:T> #<SB-PCL::SLOT-CLASS SB-PCL::SLOT-OBJECT> #<STANDARD-CLASS COMMON-LISP:STANDARD-OBJECT> #<DAO-TABLE-MIXIN MITO.DAO.MIXIN:RECORD-TIMESTAMPS-MIXIN> #<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS> #<DAO-TABLE-MIXIN MITO.DAO.MIXIN:SERIAL-PK-MIXIN>)
[ ] CLASS-EQ-SPECIALIZER = #<SB-PCL::CLASS-EQ-SPECIALIZER #<DAO-TABLE-CLASS APP.WEB::SOCIAL-ACCOUNTS>>
[ ] CPL-AVAILABLE-P = T
[ ] DIRECT-METHODS = ((#<STANDARD-METHOD APP.WEB::PRODUCT (SOCIAL-ACCOUNTS) {100A222F43}> #<STANDARD-METHOD APP.WEB::USER (SOCIAL-ACCOUNTS) {100A222F53}> #<SB-MOP:STANDARD-WRITER-METHOD (COMMON-LISP:SETF APP.WEB::TARGETS), slot:TARGETS, (T SOCIAL-ACCOUNTS) {1009115683}> #<SB-MOP:STANDARD-WRITER-METHOD (COMMON-LISP:SETF APP.WEB::SOCIAL-ACCOUNTS-TARGETS), slot:TARGETS, (T SOCIAL-ACCOUNTS) {1009115693}> ..))
[ ] DIRECT-SLOTS = (#<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS APP.WEB::USER> #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS APP.WEB::USER-ID> #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS APP.WEB::USER> #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS APP.WEB::PRODUCT> #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS APP.WEB::PRODUCT-ID> #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS APP.WEB::PRODUCT> #<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS APP.WEB::USERNAME> ..)
[ ] DIRECT-SUBCLASSES = (#<DAO-TABLE-MIXIN APP.WEB::BACK-OFFICE-USER>)
[ ] DIRECT-SUPERCLASSES = (#<DAO-TABLE-MIXIN MITO.DAO.MIXIN:SERIAL-PK-MIXIN> #<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS> #<DAO-TABLE-MIXIN MITO.DAO.MIXIN:RECORD-TIMESTAMPS-MIXIN>)
[ ] FINALIZED-P = T
[ ] INCOMPATIBLE-SUPERCLASS-LIST = NIL
[ ] KEYS = NIL
[ ] NAME = SOCIAL-ACCOUNTS
[ ] PARENT-COLUMN-MAP = #<HASH-TABLE :TEST EQ :COUNT 2 {100A104F73}>
[ ] PLIST = (SB-PCL::MI-INITARGS (((:USER :PRODUCT :USERNAME :PASSWORD :CUSTOMER-TOKEN :SUBSCRIPTION-TOKEN :CARD-NUMBER-LAST-DIGITS :CARD-EXPIRY-MONTH :CARD-EXPIRY-YEAR) :PRODUCT) ((:USER :PRODUCTS :USERNAME :PASSWORD :CUSTOMER-TOKEN :SUBSCRIPTION-TOKEN :CARD-NUMBER-LAST-DIGITS :CARD-EXPIRY-MONTH :CARD-EXPIRY-YEAR) :PRODUCTS) ((:USER :PRODUCT_ID :USERNAME :PASSWORD :CUSTOMER-TOKEN :SUBSCRIPTION-TOKEN :CARD-NUMBER-LAST-DIGITS :CARD-EXPIRY-MONTH :CARD-EXPIRY-YEAR) :PRODUCT_ID)) SB-PCL::CTORS ..)
[ ] PRIMARY-KEY = NIL
[ ] PROTOTYPE = #<SOCIAL-ACCOUNTS {10094369C3}>
[ ] RECORD-TIMESTAMPS [--more--]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Definition of class
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(deftable social-accounts ()
((user :col-type users
:initarg :user
:accessor user)
(product :col-type products
:init-arg :product
:accessor product)
(username :col-type (:varchar 512)
:initarg :username
:accessor username)
(password :col-type (or (:varchar 512) :null)
:initarg :password
:accessor password)
(customer-token :col-type (:varchar 512)
:initarg :customer-token
:accessor customer-token)
(subscription-token :col-type (:varchar 512)
:initarg :subscription-token
:accessor subscription-token)
(card-number-last-digits :col-type (:varchar 512)
:initarg :card-number-last-digits
:accessor card-number-last-digits)
;; We store card's month/year because some banks issue cards with
;; the same last digits but not the same expiration date.
(card-expiry-month :col-type (:varchar 512)
:initarg :card-expiry-month
:accessor card-expiry-month)
(card-expiry-year :col-type (:varchar 512)
:initarg :card-expiry-year
:accessor card-expiry-year)
(targets :ghost t
:init-arg :targets
:accessor targets)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment