diff options
Diffstat (limited to 'lisp/sql')
| -rw-r--r-- | lisp/sql/resume-pkg.lisp | 72 | ||||
| -rw-r--r-- | lisp/sql/skill.lisp | 3 |
2 files changed, 4 insertions, 71 deletions
diff --git a/lisp/sql/resume-pkg.lisp b/lisp/sql/resume-pkg.lisp index c45a6e1..b54aa47 100644 --- a/lisp/sql/resume-pkg.lisp +++ b/lisp/sql/resume-pkg.lisp @@ -7,80 +7,10 @@ () (:documentation "")) -;; resumes - -(defmethod get-all-resumes ((resume-pkg resume-pkg) (user user)) - (let ((resume (make-instance 'resume :user_id (id user)))) - (get-records resume-pkg resume "name asc"))) - -(defmethod insert-resume ((resume-pkg resume-pkg) (resume resume)) - (setf (*table resume) (format nil - "resume.insert_resume(~a, '~a')" - (user_id resume) - (name resume))) - (caar (call-pg-function resume-pkg resume))) +;; resume (defmethod delete-resume ((resume-pkg resume-pkg) (resume resume)) (setf (*table resume) (format nil "resume.delete_resume(~a)" (id resume))) (caar (call-pg-function resume-pkg resume))) - -;; contactinfo - -(defmethod get-all-contactinfo ((resume-pkg resume-pkg) (user user)) - (let ((contactinfo-v (make-instance 'contactinfo-v :user_id (id user)))) - (get-records resume-pkg contactinfo-v "state_name asc, city asc, address asc, email asc, phone asc, visastatus asc"))) - -(defmethod insert-contactinfo ((resume-pkg resume-pkg) (contactinfo contactinfo)) - (setf (*table contactinfo) (format nil - "resume.insert_contactinfo(~a, ~a, ~a, '~a', '~a', '~a', '~a')" - (user_id contactinfo) - (state_id contactinfo) - (visastatus_id contactinfo) - (address contactinfo) - (city contactinfo) - (phone contactinfo) - (email contactinfo))) - (caar (call-pg-function resume-pkg contactinfo))) - -;; education - -(defmethod get-all-education ((resume-pkg resume-pkg) (user user)) - (let ((education (make-instance 'education :user_id (id user)))) - (get-records resume-pkg education "school asc, end_date asc, major asc, minor asc"))) - -(defmethod insert-education ((resume-pkg resume-pkg) (education education)) - (setf (*table education) (format nil - "resume.insert_education(~a, '~a', '~a', '~a', '~a', '~a', '~a', '~a')" - (user_id education) - (school education) - (start_date education) - (end_date education) - (major education) - (minor education) - (degree education) - (progress education))) - (caar (call-pg-function resume-pkg education))) - -;; language - -(defmethod get-all-languages ((resume-pkg resume-pkg) (user user)) - (let ((language (make-instance 'language :user_id (id user)))) - (get-records resume-pkg language "name asc"))) - -(defmethod insert-language ((resume-pkg resume-pkg) (language language)) - (setf (*table language) (format nil - "resume.insert_language(~a, '~a', '~a', '~a', '~a', '~a', '~a')" - (user_id language) - (name language) - (understanding_listening language) - (understanding_reading language) - (speaking_interaction language) - (speaking_production language) - (writing language))) - (caar (call-pg-function resume-pkg language))) - -;; job - - diff --git a/lisp/sql/skill.lisp b/lisp/sql/skill.lisp index 3b43d29..c662a6a 100644 --- a/lisp/sql/skill.lisp +++ b/lisp/sql/skill.lisp @@ -7,6 +7,9 @@ ((id :initarg :id :initform nil :accessor id) + (user_id :initarg :user_id + :initform nil + :accessor user_id) (skill :initarg :skill :initform nil :accessor skill) |
