@@ -35,8 +35,8 @@ module Streamlit {
35
35
* https://docs.streamlit.io/develop/api-reference/connections/st.connections.sqlconnection#:~:text=to%20data.-,st.connections.SQLConnection,-Streamlit%20Version
36
36
* We can connect to SQL databases for example with `import streamlit as st; conn = st.connection('pets_db', type='sql')`
37
37
*/
38
- private class StreamlitSQLConnection extends API:: CallNode {
39
- StreamlitSQLConnection ( ) {
38
+ private class StreamlitSqlConnection extends API:: CallNode {
39
+ StreamlitSqlConnection ( ) {
40
40
exists ( StringLiteral str , API:: CallNode n |
41
41
str .getText ( ) .matches ( "sql" )
42
42
and
@@ -56,7 +56,7 @@ module Streamlit {
56
56
private class QueryMethodCall extends DataFlow:: CallCfgNode , SqlExecution:: Range {
57
57
58
58
QueryMethodCall ( ) {
59
- exists ( StreamlitSQLConnection s |
59
+ exists ( StreamlitSqlConnection s |
60
60
this = s .getReturn ( ) .getMember ( "query" ) .getACall ( ) )
61
61
}
62
62
@@ -70,7 +70,7 @@ module Streamlit {
70
70
*/
71
71
private class StreamlitSQLAlchemyConnection extends SqlAlchemy:: Connection:: InstanceSource {
72
72
StreamlitSQLAlchemyConnection ( ) {
73
- exists ( StreamlitSQLConnection s |
73
+ exists ( StreamlitSqlConnection s |
74
74
this = s .getReturn ( ) .getMember ( "connect" ) .getACall ( ) )
75
75
}
76
76
}
@@ -79,9 +79,9 @@ private class StreamlitSQLAlchemyConnection extends SqlAlchemy::Connection::Inst
79
79
* The underlying SQLAlchemy Engine, accessed via `st.connection().engine`.
80
80
* Streamlit creates an engine to a SQL database basing off SQL Alchemy, so we can reuse the models that we already have.
81
81
*/
82
- private class StreamlitSQLAlchemyEngine extends SqlAlchemy:: Engine:: InstanceSource {
83
- StreamlitSQLAlchemyEngine ( ) {
84
- exists ( StreamlitSQLConnection s |
82
+ private class StreamlitSqlAlchemyEngine extends SqlAlchemy:: Engine:: InstanceSource {
83
+ StreamlitSqlAlchemyEngine ( ) {
84
+ exists ( StreamlitSqlConnection s |
85
85
this = s .getReturn ( ) .getMember ( "engine" ) .asSource ( ) )
86
86
}
87
87
}
@@ -92,9 +92,9 @@ private class StreamlitSQLAlchemyEngine extends SqlAlchemy::Engine::InstanceSour
92
92
* For example, the modeling for `session` includes an `execute` method, which is used to execute raw SQL queries.
93
93
* https://docs.streamlit.io/develop/api-reference/connections/st.connections.sqlconnection#:~:text=SQLConnection.engine-,SQLConnection.session,-Streamlit%20Version
94
94
*/
95
- private class StreamlitSession extends SqlAlchemy:: Session:: InstanceSource {
96
- StreamlitSession ( ) {
97
- exists ( StreamlitSQLConnection s |
95
+ private class StreamlitSqlSession extends SqlAlchemy:: Session:: InstanceSource {
96
+ StreamlitSqlSession ( ) {
97
+ exists ( StreamlitSqlConnection s |
98
98
this = s .getReturn ( ) .getMember ( "session" ) .asSource ( ) )
99
99
}
100
100
}
0 commit comments