当我尝试从表中选择一些记录时
SELECT * FROM movie_test WHERE tags = ('["dramatic","women", "political"]'::json)
Run Code Online (Sandbox Code Playgroud)
sql代码抛出错误
LINE 1: SELECT * FROM movie_test WHERE tags = ('["dramatic","women",...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
********** ?? **********
ERROR: operator does not exist: json = json
SQL ??: 42883
????:No operator matches the given name and argument type(s). You might need to add explicit type casts.
??:37
Run Code Online (Sandbox Code Playgroud)
我错过了什么或者我可以在哪里了解这个错误.
我有很多python包,由我的同事写,我想写一个工具来检查他们依赖的第三个包.
像这样
#it is my package, need to check,call it example.py
#We have more than one way to import a package, It is a problem need to consider too
from third_party_packages import third_party_function
def my_function(arg):
return third_party_function(arg)
Run Code Online (Sandbox Code Playgroud)
这个工具应该像这样工作
result = tool(example.py)
#this result should be a dict like this structure
#{"third_party_function":["my_function",]}
#Means "my_function" relies on "third_party_function"
Run Code Online (Sandbox Code Playgroud)
我不知道如何做到这一点,我所能提出的这个工具的实现是将一行Python文件行作为字符串读取,并使用正则表达式进行比较.你能给我一些建议吗?
如果您不知道我的意思,请评论您的问题,我会尽快解决.谢谢!