How to use the pypika.CustomFunction function in PyPika

To help you get started, we’ve selected a few PyPika examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
from pypika import CustomFunction

_add_subtract_args = ["name", "interval"]

ToYYYYMM = CustomFunction("toYYYYMM")
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
from pypika import CustomFunction

_add_subtract_args = ["name", "interval"]

ToYYYYMM = CustomFunction("toYYYYMM")
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
_add_subtract_args = ["name", "interval"]

ToYYYYMM = CustomFunction("toYYYYMM")
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
from pypika import CustomFunction

_add_subtract_args = ["name", "interval"]

ToYYYYMM = CustomFunction("toYYYYMM")
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
ToYYYYMM = CustomFunction("toYYYYMM")
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
from pypika import CustomFunction

_add_subtract_args = ["name", "interval"]

ToYYYYMM = CustomFunction("toYYYYMM")
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
from pypika import CustomFunction

_add_subtract_args = ["name", "interval"]

ToYYYYMM = CustomFunction("toYYYYMM")
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])
github kayak / pypika / pypika / clickhouse / dates_and_times.py View on Github external
from pypika import CustomFunction

_add_subtract_args = ["name", "interval"]

ToYYYYMM = CustomFunction("toYYYYMM")
AddYears = CustomFunction("addYears", _add_subtract_args)
AddMonths = CustomFunction("addMonths", _add_subtract_args)
AddWeeks = CustomFunction("addWeeks", _add_subtract_args)
AddDays = CustomFunction("addDays", _add_subtract_args)
AddHours = CustomFunction("addHours", _add_subtract_args)
AddMinutes = CustomFunction("addMinutes", _add_subtract_args)
AddSeconds = CustomFunction("addSeconds", _add_subtract_args)
AddQuarters = CustomFunction("addQuarters", _add_subtract_args)
SubtractYears = CustomFunction("subtractYears", _add_subtract_args)
SubtractMonths = CustomFunction("subtractMonths", _add_subtract_args)
SubtractWeeks = CustomFunction("subtractWeeks", _add_subtract_args)
SubtractDays = CustomFunction("subtractDays", _add_subtract_args)
SubtractHours = CustomFunction("subtractHours", _add_subtract_args)
SubtractMinutes = CustomFunction("subtractMinutes", _add_subtract_args)
SubtractSeconds = CustomFunction("subtractSeconds", _add_subtract_args)
SubtractQuarters = CustomFunction("subtractQuarters", _add_subtract_args)
FormatDateTime = CustomFunction("formatDateTime", ["name", "dt_format"])