小编rus*_*121的帖子

如何在SQLite中列出特定表的所有可用视图?

我想访问Sqlite中任何特定表的所有特定视图.我知道我可以使用sqlite_master获取数据库中所有可用表的列表

SELECT name from sqlite_master WHERE type='table'; 
Run Code Online (Sandbox Code Playgroud)

以及使用的所有可用视图的列表

SELECT name from sqlite_master WHERE type ='view';
Run Code Online (Sandbox Code Playgroud)

但我想找到特定表的所有可用视图.我怎么做 ?

sql database sqlite sqlitejdbc

8
推荐指数
2
解决办法
3552
查看次数

python TypeError:'list'对象不可调用错误

我是python的新手,我试图在这里理解一个基本的错误.我得到一个TypeError:'list'对象在下面的代码中不是可调用的错误.有人可以解释一下我的代码中有什么问题吗?

graph = {'a': ['b', 'c'], 'b': ['a', 'c'], 'c': ['b', 'd'], 'd': ['a'], 'e': ['a']}


def reachable(graph, node):
    res = [node]
    reachable = graph[node]
    for currentnode in reachable:
        if currentnode not in res :
            reachableNodes = reachable(graph,currentnode) << TypeError: 
            for newNode in reachableNodes:
                if newNode not in res :
                    res.append(newNode)
    return res 
Run Code Online (Sandbox Code Playgroud)

错误:TypeError:'list'对象不可调用错误

python

0
推荐指数
1
解决办法
5164
查看次数

标签 统计

database ×1

python ×1

sql ×1

sqlite ×1

sqlitejdbc ×1