LogoLogo
6.4.0
6.4.0
  • Introduction
  • What's New?
  • Installation & Usage
  • Migration Guide
  • Contributing & Filing Issues
  • Contributors
  • Query Builder
    • Return Format
    • Interception Points
    • Retrieving Results
    • Aggregates
    • Selects
    • From
    • Joins
    • Where Clauses
    • Conditionals
    • Ordering, Grouping & Limit
    • Unions
    • Common Table Expressions (i.e. CTEs)
    • Inserts
    • Updates
    • Deletes
    • New Query
    • Clone
  • Schema Builder
    • Overview
    • Create
    • Columns
    • Column Modifiers
    • Column Constraints
    • Creating Table Constraints
    • Alter
    • Drop
Powered by GitBook
On this page

Was this helpful?

Edit on Git
Export as PDF
  1. Query Builder

Clone

At times you may need to duplicate a query. Perhaps you need the count of all the records before paginating it. Using clone you have a performant way to duplicate a query

var q1 = query.from( "users" ).where( "firstName", "like", "Jo%" );
var q2 = q1.clone();
q2.getFrom(); // "users"

PreviousNew QueryNextOverview

Last updated 5 years ago

Was this helpful?