在SQLite Studio 中给SQlite自定义函数

在SQLite Studio 中,可以很方便地给SQLite自定义函数,目前包含 QTScript、SQL、tcl三种语言,还不支持python,但可以使用tcl间接调用python(速度会慢一点)。具体实现方式如下:

位置:

在SQLite Studio 中给SQlite自定义函数

SQL函数:

在SQLite Studio 中给SQlite自定义函数

在SQLite Studio 中给SQlite自定义函数

QtScript:

在SQLite Studio 中给SQlite自定义函数

在SQLite Studio 中给SQlite自定义函数

tcl:

在SQLite Studio 中给SQlite自定义函数

在SQLite Studio 中给SQlite自定义函数

python:

在SQLite Studio 中给SQlite自定义函数

在SQLite Studio 中给SQlite自定义函数

 

#tcl_python_test_0.py

# -*- coding: UTF-8 -*-  
import sys

def add(a,b):
    return int(a)+int(b)

sum = add(sys.argv[1],sys.argv[2])
print(sum)