انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-022-L05

عرض عملي: إعادة كتابة تقرير المبيعات باستخدام jOOQ

  • الدرس 5 من 5
  • Mid-level
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

port the SQL sales report to jOOQ and compare approaches.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Show the report as plain SQL from MID-011 (CTE and window function).
  2. Add the jOOQ Gradle/Maven plugin; generate classes from the Flyway-migrated database.
  3. Rewrite the query using DSL.with(...), DSL.rank().over(...), and fetch into a record.
  4. Planned mistake: change a column name in a migration without regenerating classes; show the build failing, then regenerate. Explain this is the safety net.
  5. Compare results with the original query and note readability and refactor safety.

Prepares MID-022-LAB1.

اختبر فهمك

What happens to the jOOQ code when a column is renamed and classes regenerated?

أظهر الإجابة

The compiler flags every use of the old column.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.