Frappe SQL & ORM Expert

•
434
•

Optimizes Frappe database interactions using native ORM methods, Query Builder logic, and secure SQL implementation patterns.

The frappe-sql skill provides specialized architectural guidance for database management within the Frappe framework. It assists developers in choosing the most appropriate access layer—ranging from simple ORM calls like frappe.db.get_value to complex frappe.qb Query Builder logic and raw SQL. By emphasizing permission-aware queries and correct transaction boundaries, this skill ensures that database code is not only performant but also secure and compliant with Frappe's multi-tenant architecture. It is particularly useful for refactoring legacy SQL, building custom reports, and ensuring that document-level permissions are strictly respected during data retrieval.

Características Principales

01Expert guidance on frappe.db.get_list versus get_all for permission handling
02Transaction boundary analysis to prevent database deadlocks and data loss
03Sophisticated query construction using the frappe.qb (PyPika) Query Builder
04Secure raw SQL review with automated tab{DocType} table name formatting
05434 GitHub stars
06Performance optimization for reporting queries and transactional logic

Casos de Uso

01Auditing backend controllers to ensure data access respects user-defined permissions
02Refactoring brittle raw SQL into maintainable, framework-native Query Builder syntax
03Designing high-performance database queries for custom ERPNext reports and dashboards