minus
Represents the SQL - (subtraction) operator between two columns.
This operator function allows you to perform subtraction between two KQLiteColumn instances, which translates to column1 - column2 in the generated SQL. This is typically used for numeric calculations, such as finding the difference between two values.
Example
// SELECT (Products.price - Products.discount) AS "final_price" FROM Products
Products.select(
(Products.price - Products.discount) AS "final_price"
)Return
A new KQLiteColumn representing the result of the subtraction expression.
Author
MOHAMMAD AZIM ANSARI
Parameters
The right-hand side KQLiteColumn to subtract from the current column.
See also
Represents the SQL - (subtraction) operator between a column and a literal value.
This operator function allows you to subtract a literal value from a KQLiteColumn, which translates to column - value in the generated SQL. This is useful for calculations, such as deducting a fixed amount from a price or salary.
Example
// SELECT (Products.price - 10.0) AS "discounted_price" FROM Products
Products.select(
(Products.price - 10.0) AS "discounted_price"
)Return
A new KQLiteColumn representing the result of the subtraction expression.
Author
MOHAMMAD AZIM ANSARI
Parameters
The literal value to subtract from the column.