Database & Query Builder
Complete reference for frappe.db.get_value, get_all, PyPika QueryBuilder, SQL parameters, savepoints, and transactions.
Deep technical breakdown of Frappe Framework v15 — APIs, DocTypes, Hooks, Query Builder, JS SDK, REST, Security, Reports, DevOps & Docker.
This documentation website is designed specifically for Frappe Framework v15 developers who need clear, precise, and actionable reference material without guesswork. Every API is documented with:
import frappe
from frappe.query_builder import DocType
# 1. ORM / Document API (Modifying entity & triggering lifecycle hooks)
task_doc = frappe.get_doc("Task", "TASK-2026-00001")
# 2. Database API (Fast scalar read)
task_subject, status = frappe.db.get_value(
"Task",
{"name": "TASK-2026-00001"},
["subject", "status"]
)
# 3. List Read - Enforces User Permissions (frappe.get_list)
user_tasks = frappe.get_list(
"Task",
filters={"docstatus": 0},
fields=["name", "subject", "status"]
)
# 4. List Read - Bypasses Permissions / System Code (frappe.get_all)
all_tasks = frappe.get_all(
"Task",
filters={"docstatus": 0},
fields=["name", "subject", "status"]
)