import "dotenv/config";
import { createClient } from "@supabase/supabase-js";

const supabase = createClient(
    process.env.NEXT_PUBLIC_SUPABASE_URL!,
    "sb_secret_N7UND0UgjKTVK-Uodkm0Hg_xSvEMPvz",
    { auth: { persistSession: false } }
);

async function main() {
    let query = supabase
        .from("Teacher")
        .select("*, TeacherSubject(Subject(*)), classes:Class(*), lessons:Lesson(*)", { count: "exact" }).limit(1);
    
    let { data, error } = await query;
    console.log("Error:", error);
    console.log("Data:", JSON.stringify(data, null, 2));
}
main();
