summaryrefslogtreecommitdiff
path: root/lisp/sql
diff options
context:
space:
mode:
authorckonstanski <kostcarl@isu.edu>2026-07-19 22:05:02 -0600
committerckonstanski <kostcarl@isu.edu>2026-07-19 22:05:02 -0600
commite7301bcd63c0cbfc4d55f21d0d7c33c7557d6444 (patch)
tree2fc51725eb8931c09df6d9360bb358e7645a5244 /lisp/sql
parent08e435104c42751689553537b1f20ffb14b8dfcc (diff)
starting resume logic
Diffstat (limited to 'lisp/sql')
-rw-r--r--lisp/sql/contactinfo.lisp30
-rw-r--r--lisp/sql/education.lisp33
-rw-r--r--lisp/sql/job.lisp27
-rw-r--r--lisp/sql/language.lisp30
-rw-r--r--lisp/sql/resume-pkg.lisp19
-rw-r--r--lisp/sql/resume.lisp18
-rw-r--r--lisp/sql/skill.lisp15
-rw-r--r--lisp/sql/states.lisp18
-rw-r--r--lisp/sql/visastatus.lisp15
9 files changed, 205 insertions, 0 deletions
diff --git a/lisp/sql/contactinfo.lisp b/lisp/sql/contactinfo.lisp
new file mode 100644
index 0000000..83c271d
--- /dev/null
+++ b/lisp/sql/contactinfo.lisp
@@ -0,0 +1,30 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass contactinfo (postgres-record)
+ ((id :initarg :id
+ :initform nil
+ :accessor id)
+ (address :initarg :address
+ :initform nil
+ :accessor address)
+ (city :initarg :city
+ :initform nil
+ :accessor city)
+ (state_id :initarg :state_id
+ :initform nil
+ :accessor state_id)
+ (phone :initarg :phone
+ :initform nil
+ :accessor phone)
+ (email :initarg :email
+ :initform nil
+ :accessor email)
+ (visastatus_id :initarg :visastatus_id
+ :initform nil
+ :accessor visastatus_id)
+ (*table :initform "resume.contactinfo")
+ (*where-expression :initform "id = ~a"))
+ (:documentation "Holds the data for a resume.contactinfo record."))
diff --git a/lisp/sql/education.lisp b/lisp/sql/education.lisp
new file mode 100644
index 0000000..96b5382
--- /dev/null
+++ b/lisp/sql/education.lisp
@@ -0,0 +1,33 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass education (postgres-record)
+ ((id :initarg :id
+ :initform nil
+ :accessor id)
+ (school :initarg :school
+ :initform nil
+ :accessor school)
+ (start_date :initarg :start_date
+ :initform nil
+ :accessor start_date)
+ (end_date :initarg :end_date
+ :initform nil
+ :accessor end_date)
+ (major :initarg :major
+ :initform nil
+ :accessor major)
+ (minor :initarg :minor
+ :initform nil
+ :accessor minor)
+ (degree :initarg :degree
+ :initform nil
+ :accessor degree)
+ (progress :initarg :progress
+ :initform nil
+ :accessor progress)
+ (*table :initform "resume.education")
+ (*where-expression :initform "id = ~a"))
+ (:documentation "Holds the data for a resume.education record."))
diff --git a/lisp/sql/job.lisp b/lisp/sql/job.lisp
new file mode 100644
index 0000000..96f9796
--- /dev/null
+++ b/lisp/sql/job.lisp
@@ -0,0 +1,27 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass job (postgres-record)
+ ((id :initarg :id
+ :initform nil
+ :accessor id)
+ (company :initarg :company
+ :initform nil
+ :accessor company)
+ (location :initarg :location
+ :initform nil
+ :accessor location)
+ (start_date :initarg :start_date
+ :initform nil
+ :accessor start_date)
+ (end_date :initarg :end_date
+ :initform nil
+ :accessor end_date)
+ (overview :initarg :overview
+ :initform nil
+ :accessor overview)
+ (*table :initform "resume.job")
+ (*where-expression :initform "id = ~a"))
+ (:documentation "Holds the data for a resume.job record."))
diff --git a/lisp/sql/language.lisp b/lisp/sql/language.lisp
new file mode 100644
index 0000000..ca384b1
--- /dev/null
+++ b/lisp/sql/language.lisp
@@ -0,0 +1,30 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass language (postgres-record)
+ ((id :initarg :id
+ :initform nil
+ :accessor id)
+ (name :initarg :name
+ :initform nil
+ :accessor name)
+ (understanding_listening :initarg :understanding_listening
+ :initform nil
+ :accessor understanding_listening)
+ (understanding_reading :initarg :understanding_reading
+ :initform nil
+ :accessor understanding_reading)
+ (speaking_interaction :initarg :speaking_interaction
+ :initform nil
+ :accessor speaking_interaction)
+ (speaking_production :initarg :speaking_production
+ :initform nil
+ :accessor speaking_production)
+ (writing :initarg :writing
+ :initform nil
+ :accessor writing)
+ (*table :initform "resume.language")
+ (*where-expression :initform "id = ~a"))
+ (:documentation "Holds the data for a resume.language record."))
diff --git a/lisp/sql/resume-pkg.lisp b/lisp/sql/resume-pkg.lisp
new file mode 100644
index 0000000..3c8c289
--- /dev/null
+++ b/lisp/sql/resume-pkg.lisp
@@ -0,0 +1,19 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass resume-pkg (record-pkg)
+ ()
+ (:documentation ""))
+
+(defmethod get-all-resumes-for-user ((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)))
diff --git a/lisp/sql/resume.lisp b/lisp/sql/resume.lisp
new file mode 100644
index 0000000..8949c20
--- /dev/null
+++ b/lisp/sql/resume.lisp
@@ -0,0 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass resume (postgres-record)
+ ((id :initarg :id
+ :initform nil
+ :accessor id)
+ (user_id :initarg :user_id
+ :initform nil
+ :accessor user_id)
+ (name :initarg :name
+ :initform nil
+ :accessor name)
+ (*table :initform "resume.resume")
+ (*where-expression :initform "id = ~a"))
+ (:documentation "Holds the data for a resume.resume record."))
diff --git a/lisp/sql/skill.lisp b/lisp/sql/skill.lisp
new file mode 100644
index 0000000..3b43d29
--- /dev/null
+++ b/lisp/sql/skill.lisp
@@ -0,0 +1,15 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass skill (postgres-record)
+ ((id :initarg :id
+ :initform nil
+ :accessor id)
+ (skill :initarg :skill
+ :initform nil
+ :accessor skill)
+ (*table :initform "resume.skill")
+ (*where-expression :initform "id = ~a"))
+ (:documentation "Holds the data for a resume.skill record."))
diff --git a/lisp/sql/states.lisp b/lisp/sql/states.lisp
new file mode 100644
index 0000000..7968c16
--- /dev/null
+++ b/lisp/sql/states.lisp
@@ -0,0 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass states (postgres-record)
+ ((id :initarg :id
+ :initform nil
+ :accessor id)
+ (state :initarg :state
+ :initform nil
+ :accessor state)
+ (abbr :initarg :abbr
+ :initform nil
+ :accessor abbr)
+ (*table :initform "resume.states")
+ (*where-expression :initform "id = ~a"))
+ (:documentation "Holds the data for a resume.states record."))
diff --git a/lisp/sql/visastatus.lisp b/lisp/sql/visastatus.lisp
new file mode 100644
index 0000000..3f6293c
--- /dev/null
+++ b/lisp/sql/visastatus.lisp
@@ -0,0 +1,15 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :resume)
+
+(defclass visastatus (postgres-record)
+ ((id :initarg :id
+ :initform nil
+ :accessor id)
+ (visastatus :initarg :visastatus
+ :initform nil
+ :accessor visastatus)
+ (*table :initform "resume.visastatus")
+ (*where-expression :initform "id = ~a"))
+ (:documentation "Holds the data for a resume.visastatus record."))