-
-
Notifications
You must be signed in to change notification settings - Fork 594
Qt_script_getbit
Paweł Salawa edited this page Feb 21, 2024
·
1 revision
Language: | Qt Script |
---|---|
Plugin for language: | ScriptingQt |
How to use: | Create custom SQL function. Suggested name: getBit |
Function arguments | bitIndex, intValue |
Function usage: | SELECT getBit(0, some_integer_column) |
Description: | It extracts bit of given index from a given integer value |
return ((1 << arguments[0]) & arguments[1]) >> arguments[0]