際際滷

際際滷Share a Scribd company logo
A PRACTICAL THEORY OF
LANGUAGE-INTEGRATED QUERY
WITH QUILL
JULIANO ALVES
@vonjuliano
@vonjuliano
@vonjuliano
@flaviowbrasil
https://github.com/getquill/quill
A PRACTICAL THEORY OF LANGUAGE-
INTEGRATED QUERY
@vonjuliano
http://homepages.inf.ed.ac.uk/slindley/papers/practical-theory-of-linq.pdf
SCYLLA  FAILURE
CHARYBDIS  AVALANCHE
@vonjuliano
@vonjuliano
@vonjuliano
RESTRICTIONS
SINGLE DB
RETURNS A FLAT RELATION TYPE
ONLY KNOWN OPERATIONS
@vonjuliano
SELECT w.NAME,
w.age  m.age,
FROM couples c,
people w,
people m
WHERE c.her = w.NAME
AND c.him = m.NAME
AND w.age > m.age
@vonjuliano
quote {
for {
c <- couples
w <- people
m <- people
if (c.her == w.name &&
c.him == m.name &&
w.age > m.age)
} yield {
(w.name, w.age - m.age)
}
}
@vonjuliano
quote {
for {
c <- couples
w <- people
m <- people
if (c.her == w.name &&
c.him == m.name &&
w.age > m.age)
} yield {
(w.name, w.age - m.age)
}
}
@vonjuliano
FlatMap(Entity(Couple,None,List()),Ident(c),FlatMap(Entity(Per
son,None,List()),Ident(w),Map(Filter(Entity(Person,None,List()),
Ident(m),BinaryOperation(BinaryOperation(BinaryOperation(Pr
operty(Ident(c),her),==,Property(Ident(w),name)),&&,BinaryOp
eration(Property(Ident(c),him),==,Property(Ident(m),name))),&
&,BinaryOperation(Property(Ident(w),age),>,Property(Ident(m),
age)))),Ident(m),Tuple(List(Property(Ident(w),name),
BinaryOperation(Property(Ident(w),age),-
,Property(Ident(m),age)))))))
@vonjuliano
@vonjuliano
FlatMap(Entity(Couple,None,List()),Ident(c),FlatMap(Entity(Pe
rson,None,List()),Ident(w),Map(Filter(Entity(Person,None,List(
)),Ident(m),BinaryOperation(BinaryOperation(BinaryOperation
(Property(Ident(c),her),==,Property(Ident(w),name)),&&,Binary
Operation(Property(Ident(c),him),==,Property(Ident(m),name))
),&&,BinaryOperation(Property(Ident(w),age),>,Property(Ident
(m),age)))),Ident(m),Tuple(List(Property(Ident(w),name),
BinaryOperation(Property(Ident(w),age),-
,Property(Ident(m),age)))))))
SELECT w.NAME,
w.age  m.age,
FROM couples c,
people w,
people m
WHERE c.her = w.NAME
AND c.him = m.NAME
AND w.age > m.age
+
=
@vonjuliano
ABSTRACTING OVER VALUES
@vonjuliano
val range = quote {
(a: Int, b: Int) =>
for {
u <- query[Person]
if (a <= u.age && u.age < b)
} yield {
u
}
}
db.run(range(10, 20))
@vonjuliano
val range = quote {
(a: Int, b: Int) =>
for {
u <- query[Person]
if (a <= u.age && u.age < b)
} yield {
u
}
}
db.run(range(10, 20))
@vonjuliano
val range = quote {
(a: Int, b: Int) =>
for {
u <- query[Person]
if (a <= u.age && u.age < b)
} yield {
u
}
}
db.run(range)(min, max)
@vonjuliano
ABSTRACTING OVER A PREDICATE
val satisfies =
quote {
(p: Int => Boolean) =>
for {
u <- query[Person] if (p(u.age))
} yield {
u
}
}
db.run(satisfies((x: Int) => 20 <= x))
@vonjuliano
val satisfies =
quote {
(p: Int => Boolean) =>
for {
u <- query[Person] if (p(u.age))
} yield {
u
}
}
db.run(satisfies((x: Int) => 20 <= x))
@vonjuliano
COMPOSING QUERIES
@vonjuliano
val ageFromName = quote {
(s: String) =>
for {
u <- query[Person] if (s == u.name)
} yield {
u.age
}
}
quote {
(s: String, t: String) =>
for {
a <- ageFromName(s)
b <- ageFromName(t)
r <- range(a, b)
} yield {
r
}
}
@vonjuliano
val ageFromName = quote {
(s: String) =>
for {
u <- query[Person] if (s == u.name)
} yield {
u.age
}
}
quote {
(s: String, t: String) =>
for {
a <- ageFromName(s)
b <- ageFromName(t)
r <- range(a, b)
} yield {
r
}
}
@vonjuliano
DYNAMICALLY GENERATED QUERIES
@vonjuliano
sealed trait Predicate
case class Above(i: Int) extends Predicate
case class Below(i: Int) extends Predicate
case class And(a: Predicate, b: Predicate) extends Predicate
case class Or(a: Predicate, b: Predicate) extends Predicate
case class Not(p: Predicate) extends Predicate
def eval(t: Predicate): Quoted[Int => Boolean] =
t match {
case Above(n) => quote((x: Int) => x > lift(n))
case Below(n) => quote((x: Int) => x < lift(n))
case And(t1, t2) => quote((x: Int) => eval(t1)(x) && eval(t2)(x))
case Or(t1, t2) => quote((x: Int) => eval(t1)(x) || eval(t2)(x))
case Not(t0) => quote((x: Int) => !eval(t0)(x))
}
@vonjuliano
sealed trait Predicate
case class Above(i: Int) extends Predicate
case class Below(i: Int) extends Predicate
case class And(a: Predicate, b: Predicate) extends Predicate
case class Or(a: Predicate, b: Predicate) extends Predicate
case class Not(p: Predicate) extends Predicate
def eval(t: Predicate): Quoted[Int => Boolean] =
t match {
case Above(n) => quote((x: Int) => x > lift(n))
case Below(n) => quote((x: Int) => x < lift(n))
case And(t1, t2) => quote((x: Int) => eval(t1)(x) && eval(t2)(x))
case Or(t1, t2) => quote((x: Int) => eval(t1)(x) || eval(t2)(x))
case Not(t0) => quote((x: Int) => !eval(t0)(x))
}
@vonjuliano
EXAMPLE
@vonjuliano
@vonjuliano
A PRACTICAL THEORY OF
LANGUAGE-INTEGRATED QUERY
WITH QUILL
JULIANO ALVES
@vonjuliano
THANK YOU!
Q U E S T I O N S ?
@vonjuliano

More Related Content

Recently uploaded (20)

Lumion Pro Crack latest version Free 2025
Lumion Pro Crack latest version Free 2025Lumion Pro Crack latest version Free 2025
Lumion Pro Crack latest version Free 2025
naeem55ddf
AR/VR Company in India - Simulanis.com
AR/VR Company in India  -  Simulanis.comAR/VR Company in India  -  Simulanis.com
AR/VR Company in India - Simulanis.com
mdashraf329911
Marketo User Group - Singapore - April 2025
Marketo User Group - Singapore - April 2025Marketo User Group - Singapore - April 2025
Marketo User Group - Singapore - April 2025
BradBedford3
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
Choreo - The AI-Native Internal Developer Platform as a Service: OverviewChoreo - The AI-Native Internal Developer Platform as a Service: Overview
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
WSO2
Jotform AI Agents: Real User Success Stories
Jotform AI Agents: Real User Success StoriesJotform AI Agents: Real User Success Stories
Jotform AI Agents: Real User Success Stories
Jotform
Making significant software architecture decisions
Making significant software architecture decisionsMaking significant software architecture decisions
Making significant software architecture decisions
Bert Jan Schrijver
Digital Application Development Services
Digital Application Development ServicesDigital Application Development Services
Digital Application Development Services
daavishenry
Multicompany Analytic Odoo Dashboard for POS, CRM, Inventory, Sales and Accou...
Multicompany Analytic Odoo Dashboard for POS, CRM, Inventory, Sales and Accou...Multicompany Analytic Odoo Dashboard for POS, CRM, Inventory, Sales and Accou...
Multicompany Analytic Odoo Dashboard for POS, CRM, Inventory, Sales and Accou...
AxisTechnolabs
From Tracks to Highways: Boosting Infrastructure Safety with Mobile Edge AIoT
From Tracks to Highways: Boosting Infrastructure Safety with Mobile Edge AIoTFrom Tracks to Highways: Boosting Infrastructure Safety with Mobile Edge AIoT
From Tracks to Highways: Boosting Infrastructure Safety with Mobile Edge AIoT
Eurotech
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with EaseCypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Shubham Joshi
IObit Driver Booster Pro 12.3.0.557 Free
IObit Driver Booster Pro 12.3.0.557 FreeIObit Driver Booster Pro 12.3.0.557 Free
IObit Driver Booster Pro 12.3.0.557 Free
mohsinrazakpa95
The Open-Closed Principle - Part 1 - The Original Version
The Open-Closed Principle - Part 1 - The Original VersionThe Open-Closed Principle - Part 1 - The Original Version
The Open-Closed Principle - Part 1 - The Original Version
Philip Schwarz
Wondershare MobileTrans Download 2025
Wondershare  MobileTrans  Download  2025Wondershare  MobileTrans  Download  2025
Wondershare MobileTrans Download 2025
mohsinrazakpa95
Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025
mohsinrazakpa28
Parallels Desktop Crack [Latest] 2025 free
Parallels Desktop Crack [Latest] 2025 freeParallels Desktop Crack [Latest] 2025 free
Parallels Desktop Crack [Latest] 2025 free
mohsinrazakpa96
Wondershare Filmora 14.3.2.11147 crack
Wondershare Filmora   14.3.2.11147 crackWondershare Filmora   14.3.2.11147 crack
Wondershare Filmora 14.3.2.11147 crack
blouch51kp
The Evolution of Microsoft Project Portfolio Management
The Evolution of Microsoft Project Portfolio ManagementThe Evolution of Microsoft Project Portfolio Management
The Evolution of Microsoft Project Portfolio Management
OnePlan Solutions
The Missing Voices: Unearthing the Impact of Survivorship Bias on Women in Te...
The Missing Voices: Unearthing the Impact of Survivorship Bias on Women in Te...The Missing Voices: Unearthing the Impact of Survivorship Bias on Women in Te...
The Missing Voices: Unearthing the Impact of Survivorship Bias on Women in Te...
Imma Valls Bernaus
TVersity Pro Media Server Free CRACK Download
TVersity Pro Media Server Free CRACK DownloadTVersity Pro Media Server Free CRACK Download
TVersity Pro Media Server Free CRACK Download
mohsinrazakpa43
Wondershare Democreator 8.3.3 Crack Activated Free Download
Wondershare Democreator 8.3.3 Crack Activated Free DownloadWondershare Democreator 8.3.3 Crack Activated Free Download
Wondershare Democreator 8.3.3 Crack Activated Free Download
adanataj41
Lumion Pro Crack latest version Free 2025
Lumion Pro Crack latest version Free 2025Lumion Pro Crack latest version Free 2025
Lumion Pro Crack latest version Free 2025
naeem55ddf
AR/VR Company in India - Simulanis.com
AR/VR Company in India  -  Simulanis.comAR/VR Company in India  -  Simulanis.com
AR/VR Company in India - Simulanis.com
mdashraf329911
Marketo User Group - Singapore - April 2025
Marketo User Group - Singapore - April 2025Marketo User Group - Singapore - April 2025
Marketo User Group - Singapore - April 2025
BradBedford3
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
Choreo - The AI-Native Internal Developer Platform as a Service: OverviewChoreo - The AI-Native Internal Developer Platform as a Service: Overview
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
WSO2
Jotform AI Agents: Real User Success Stories
Jotform AI Agents: Real User Success StoriesJotform AI Agents: Real User Success Stories
Jotform AI Agents: Real User Success Stories
Jotform
Making significant software architecture decisions
Making significant software architecture decisionsMaking significant software architecture decisions
Making significant software architecture decisions
Bert Jan Schrijver
Digital Application Development Services
Digital Application Development ServicesDigital Application Development Services
Digital Application Development Services
daavishenry
Multicompany Analytic Odoo Dashboard for POS, CRM, Inventory, Sales and Accou...
Multicompany Analytic Odoo Dashboard for POS, CRM, Inventory, Sales and Accou...Multicompany Analytic Odoo Dashboard for POS, CRM, Inventory, Sales and Accou...
Multicompany Analytic Odoo Dashboard for POS, CRM, Inventory, Sales and Accou...
AxisTechnolabs
From Tracks to Highways: Boosting Infrastructure Safety with Mobile Edge AIoT
From Tracks to Highways: Boosting Infrastructure Safety with Mobile Edge AIoTFrom Tracks to Highways: Boosting Infrastructure Safety with Mobile Edge AIoT
From Tracks to Highways: Boosting Infrastructure Safety with Mobile Edge AIoT
Eurotech
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with EaseCypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Cypress Parallel Testing Tutorial: Speed Up Your Test Runs with Ease
Shubham Joshi
IObit Driver Booster Pro 12.3.0.557 Free
IObit Driver Booster Pro 12.3.0.557 FreeIObit Driver Booster Pro 12.3.0.557 Free
IObit Driver Booster Pro 12.3.0.557 Free
mohsinrazakpa95
The Open-Closed Principle - Part 1 - The Original Version
The Open-Closed Principle - Part 1 - The Original VersionThe Open-Closed Principle - Part 1 - The Original Version
The Open-Closed Principle - Part 1 - The Original Version
Philip Schwarz
Wondershare MobileTrans Download 2025
Wondershare  MobileTrans  Download  2025Wondershare  MobileTrans  Download  2025
Wondershare MobileTrans Download 2025
mohsinrazakpa95
Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025
mohsinrazakpa28
Parallels Desktop Crack [Latest] 2025 free
Parallels Desktop Crack [Latest] 2025 freeParallels Desktop Crack [Latest] 2025 free
Parallels Desktop Crack [Latest] 2025 free
mohsinrazakpa96
Wondershare Filmora 14.3.2.11147 crack
Wondershare Filmora   14.3.2.11147 crackWondershare Filmora   14.3.2.11147 crack
Wondershare Filmora 14.3.2.11147 crack
blouch51kp
The Evolution of Microsoft Project Portfolio Management
The Evolution of Microsoft Project Portfolio ManagementThe Evolution of Microsoft Project Portfolio Management
The Evolution of Microsoft Project Portfolio Management
OnePlan Solutions
The Missing Voices: Unearthing the Impact of Survivorship Bias on Women in Te...
The Missing Voices: Unearthing the Impact of Survivorship Bias on Women in Te...The Missing Voices: Unearthing the Impact of Survivorship Bias on Women in Te...
The Missing Voices: Unearthing the Impact of Survivorship Bias on Women in Te...
Imma Valls Bernaus
TVersity Pro Media Server Free CRACK Download
TVersity Pro Media Server Free CRACK DownloadTVersity Pro Media Server Free CRACK Download
TVersity Pro Media Server Free CRACK Download
mohsinrazakpa43
Wondershare Democreator 8.3.3 Crack Activated Free Download
Wondershare Democreator 8.3.3 Crack Activated Free DownloadWondershare Democreator 8.3.3 Crack Activated Free Download
Wondershare Democreator 8.3.3 Crack Activated Free Download
adanataj41

Featured (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
Artificial Intelligence, Data and Competition SCHREPEL June 2024 OECD dis...
Artificial Intelligence, Data and Competition  SCHREPEL  June 2024 OECD dis...Artificial Intelligence, Data and Competition  SCHREPEL  June 2024 OECD dis...
Artificial Intelligence, Data and Competition SCHREPEL June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report by Hubspot
2024 State of Marketing Report  by Hubspot2024 State of Marketing Report  by Hubspot
2024 State of Marketing Report by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report by Hubspot
2024 State of Marketing Report  by Hubspot2024 State of Marketing Report  by Hubspot
2024 State of Marketing Report by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray

A Practical Theory of Language-Integrated Query with Quill

Editor's Notes

  • #5: Compile-time Language Integrated Query for Scala Boilerplate-free mapping: The database schema is mapped using simple case classes Quoted DSL: Quill parses each quoted block of code (quotation) at compile time and translates them to an internal Abstract Syntax Tree (AST) Compile-time query generation: The油ctx.run油call reads the quotation's AST and translates it to the target language at compile time Compile-time query validation:油(optional) the query is verified against the database at compile time and the compilation fails if it is not valid
  • #6: Failure and avalanche
  • #7: each query in the host language generate exactly one SQL query
  • #30: Failure and avalanche