Package com.studentgui.tools
Class QueryStudentData
java.lang.Object
com.studentgui.tools.QueryStudentData
Command-line inspection tool for viewing student database contents and schema statistics.
Provides a quick diagnostic view of database state without launching the GUI. Useful for:
- Verifying student records exist in the database
- Inspecting available progress types and their assessment part counts
- Checking session data row sizes for debugging schema migrations
- Quick manual data verification during development or troubleshooting
Usage:
# List all students and progress types with counts
java -cp StudentDataGUI.jar com.studentgui.tools.QueryStudentData
# Inspect specific student's progress types
java -cp StudentDataGUI.jar com.studentgui.tools.QueryStudentData "Aaron A Aaronsson"
Output Format:
Inspecting student: Aaron A Aaronsson ProgressType 'Braille' (id=1) parts=64 sessions=3 Sample row sizes: 64 values: [2, 3, 2, 3, 4, ...] ProgressType 'Abacus' (id=2) parts=22 sessions=1 Sample row sizes: 22 values: [0, 1, 2, 1, 3, ...]
Workflow:
- Lists all known students via
Helpers.getStudents() - Selects first student or uses command-line argument
- Queries
ProgressTypetable for all progress types - For each progress type: counts assessment parts and fetches sample session rows
- Prints progress type name, ID, part count, session count, and sample row to stdout
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNo-op public constructor to document this class as a small utility. -
Method Summary
-
Constructor Details
-
QueryStudentData
public QueryStudentData()No-op public constructor to document this class as a small utility.
-
-
Method Details
-
main
Command-line entry point. Prints progress types and a sample row for the specified or first-known student.- Parameters:
args- optional first argument is student display name- Throws:
Exception- on database errors
-