SYMBOL INDEX (755 symbols across 102 files) FILE: explorer/__init__.py function get_version (line 10) | def get_version(short=False): FILE: explorer/actions.py function generate_report_action (line 12) | def generate_report_action(description="Generate CSV file from SQL query... function _package (line 31) | def _package(queries): function _build_zip (line 50) | def _build_zip(queries): FILE: explorer/admin.py class QueryAdmin (line 9) | class QueryAdmin(admin.ModelAdmin): class ExplorerValueAdmin (line 17) | class ExplorerValueAdmin(admin.ModelAdmin): method display_key (line 22) | def display_key(self, obj): FILE: explorer/app_settings.py function has_assistant (line 176) | def has_assistant(): function db_connections_enabled (line 180) | def db_connections_enabled(): function user_uploads_enabled (line 184) | def user_uploads_enabled(): FILE: explorer/apps.py class ExplorerAppConfig (line 6) | class ExplorerAppConfig(AppConfig): function new_get_connection (line 26) | def new_get_connection(using=None): FILE: explorer/assistant/forms.py class TableDescriptionForm (line 6) | class TableDescriptionForm(forms.ModelForm): class Meta (line 7) | class Meta: method __init__ (line 15) | def __init__(self, *args, **kwargs): FILE: explorer/assistant/models.py class PromptLog (line 6) | class PromptLog(models.Model): class Meta (line 8) | class Meta: class TableDescription (line 27) | class TableDescription(models.Model): class Meta (line 29) | class Meta: method __str__ (line 37) | def __str__(self): FILE: explorer/assistant/utils.py function openai_client (line 16) | def openai_client(): function do_req (line 24) | def do_req(prompt): function extract_response (line 37) | def extract_response(r): function table_schema (line 41) | def table_schema(db_connection, table_name): function sample_rows_from_table (line 48) | def sample_rows_from_table(connection, table_name): function format_rows_from_table (line 85) | def format_rows_from_table(rows): function build_system_prompt (line 97) | def build_system_prompt(flavor): function get_relevant_annotation (line 103) | def get_relevant_annotation(db_connection, t): function get_relevant_few_shots (line 112) | def get_relevant_few_shots(db_connection, included_tables): function get_few_shot_chunk (line 127) | def get_few_shot_chunk(db_connection, included_tables): class TablePromptData (line 138) | class TablePromptData: method render (line 144) | def render(self): function build_prompt (line 156) | def build_prompt(db_connection, assistant_request, included_tables, quer... FILE: explorer/assistant/views.py function run_assistant (line 23) | def run_assistant(request_data, user): class AssistantHelpView (line 64) | class AssistantHelpView(View): method post (line 66) | def post(self, request, *args, **kwargs): class TableDescriptionListView (line 79) | class TableDescriptionListView(PermissionRequiredMixin, ExplorerContextM... class TableDescriptionCreateView (line 86) | class TableDescriptionCreateView(PermissionRequiredMixin, ExplorerContex... class TableDescriptionUpdateView (line 94) | class TableDescriptionUpdateView(PermissionRequiredMixin, ExplorerContex... class TableDescriptionDeleteView (line 102) | class TableDescriptionDeleteView(PermissionRequiredMixin, ExplorerContex... class AssistantHistoryApiView (line 109) | class AssistantHistoryApiView(View): method post (line 111) | def post(self, request, *args, **kwargs): FILE: explorer/charts.py function get_chart (line 8) | def get_chart(result: QueryResult, chart_type: str, num_rows: int) -> Op... function get_svg (line 60) | def get_svg(fig) -> str: function is_numeric (line 69) | def is_numeric(column: Iterable) -> bool: FILE: explorer/ee/db_connections/admin.py class DatabaseConnectionAdmin (line 7) | class DatabaseConnectionAdmin(admin.ModelAdmin): FILE: explorer/ee/db_connections/create_sqlite.py function get_names (line 9) | def get_names(file, append_conn=None, user_id=None): function parse_to_sqlite (line 24) | def parse_to_sqlite(file, append_conn=None, user_id=None) -> (BytesIO, s... FILE: explorer/ee/db_connections/forms.py class JSONTextInput (line 9) | class JSONTextInput(forms.TextInput): method render (line 10) | def render(self, name, value, attrs=None, renderer=None): method value_from_datadict (line 17) | def value_from_datadict(self, data, files, name): class DatabaseConnectionForm (line 27) | class DatabaseConnectionForm(forms.ModelForm): class Meta (line 28) | class Meta: FILE: explorer/ee/db_connections/mime.py function is_csv (line 9) | def is_csv(file): function is_json (line 23) | def is_json(file): function is_json_list (line 31) | def is_json_list(file): function is_sqlite (line 44) | def is_sqlite(file): FILE: explorer/ee/db_connections/models.py class DatabaseConnectionManager (line 11) | class DatabaseConnectionManager(models.Manager): method uploads (line 13) | def uploads(self): method non_uploads (line 16) | def non_uploads(self): method default (line 19) | def default(self): class DatabaseConnection (line 23) | class DatabaseConnection(models.Model): method __str__ (line 53) | def __str__(self): method update_fingerprint (line 56) | def update_fingerprint(self): method local_fingerprint (line 60) | def local_fingerprint(self): method _download_sqlite (line 64) | def _download_sqlite(self): method _download_needed (line 69) | def _download_needed(self): method download_sqlite_if_needed (line 77) | def download_sqlite_if_needed(self): method is_upload (line 92) | def is_upload(self): method is_django_alias (line 96) | def is_django_alias(self): method local_name (line 100) | def local_name(self): method delete_local_sqlite (line 104) | def delete_local_sqlite(self): method as_django_connection (line 109) | def as_django_connection(self): method save (line 147) | def save(self, *args, **kwargs): FILE: explorer/ee/db_connections/type_infer.py function get_parser (line 10) | def get_parser(file): function csv_to_typed_df (line 22) | def csv_to_typed_df(csv_bytes, delimiter=",", has_headers=True): function json_list_to_typed_df (line 29) | def json_list_to_typed_df(json_bytes): function json_to_typed_df (line 39) | def json_to_typed_df(json_bytes): function atof_custom (line 47) | def atof_custom(value): function df_to_typed_df (line 63) | def df_to_typed_df(df): # noqa FILE: explorer/ee/db_connections/utils.py function default_db_connection (line 8) | def default_db_connection(): function default_db_connection_id (line 13) | def default_db_connection_id(): function upload_sqlite (line 18) | def upload_sqlite(db_bytes, path): function create_connection_for_uploaded_sqlite (line 29) | def create_connection_for_uploaded_sqlite(filename, s3_path): function user_dbs_local_dir (line 39) | def user_dbs_local_dir(): function uploaded_db_local_path (line 46) | def uploaded_db_local_path(name): function sqlite_to_bytesio (line 50) | def sqlite_to_bytesio(local_path): function pandas_to_sqlite (line 59) | def pandas_to_sqlite(df, table_name, local_path): function quick_hash (line 75) | def quick_hash(file_path, num_samples=10, sample_size=1024): FILE: explorer/ee/db_connections/views.py class UploadDbView (line 25) | class UploadDbView(PermissionRequiredMixin, View): method post (line 29) | def post(self, request): # noqa class DatabaseConnectionsListView (line 83) | class DatabaseConnectionsListView(PermissionRequiredMixin, ExplorerConte... class DatabaseConnectionDetailView (line 90) | class DatabaseConnectionDetailView(PermissionRequiredMixin, ExplorerCont... class DatabaseConnectionCreateView (line 96) | class DatabaseConnectionCreateView(PermissionRequiredMixin, ExplorerCont... class DatabaseConnectionUploadCreateView (line 104) | class DatabaseConnectionUploadCreateView(TemplateView): method get_context_data (line 107) | def get_context_data(self, **kwargs): class DatabaseConnectionUpdateView (line 114) | class DatabaseConnectionUpdateView(PermissionRequiredMixin, ExplorerCont... class DatabaseConnectionDeleteView (line 122) | class DatabaseConnectionDeleteView(PermissionRequiredMixin, DeleteView): method delete (line 128) | def delete(self, request, *args, **kwargs): class DatabaseConnectionRefreshView (line 135) | class DatabaseConnectionRefreshView(PermissionRequiredMixin, View): method get (line 140) | def get(self, request, pk): # noqa class DatabaseConnectionValidateView (line 151) | class DatabaseConnectionValidateView(PermissionRequiredMixin, View): method post (line 156) | def post(self, request, pk=None): # noqa FILE: explorer/exporters.py function get_exporter_class (line 15) | def get_exporter_class(format): class BaseExporter (line 20) | class BaseExporter: method __init__ (line 26) | def __init__(self, query): method get_output (line 29) | def get_output(self, **kwargs): method get_file_output (line 33) | def get_file_output(self, **kwargs): method _get_output (line 37) | def _get_output(self, res, **kwargs): method get_filename (line 45) | def get_filename(self): class CSVExporter (line 49) | class CSVExporter(BaseExporter): method _get_output (line 55) | def _get_output(self, res, **kwargs): class JSONExporter (line 68) | class JSONExporter(BaseExporter): method _get_output (line 74) | def _get_output(self, res, **kwargs): class ExcelExporter (line 88) | class ExcelExporter(BaseExporter): method _get_output (line 94) | def _get_output(self, res, **kwargs): method _format_title (line 131) | def _format_title(self): FILE: explorer/forms.py class SqlField (line 10) | class SqlField(CharField): method validate (line 12) | def validate(self, value): class QueryForm (line 33) | class QueryForm(ModelForm): method __init__ (line 40) | def __init__(self, *args, **kwargs): method clean (line 48) | def clean(self): method clean_database_connection (line 55) | def clean_database_connection(self): method created_at_time (line 65) | def created_at_time(self): method connections (line 69) | def connections(self): class Meta (line 84) | class Meta: FILE: explorer/migrations/0001_initial.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0002_auto_20150501_1515.py class Migration (line 4) | class Migration(migrations.Migration): FILE: explorer/migrations/0003_query_snapshot.py class Migration (line 4) | class Migration(migrations.Migration): FILE: explorer/migrations/0004_querylog_duration.py class Migration (line 4) | class Migration(migrations.Migration): FILE: explorer/migrations/0005_auto_20160105_2052.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0006_query_connection.py class Migration (line 4) | class Migration(migrations.Migration): FILE: explorer/migrations/0007_querylog_connection.py class Migration (line 4) | class Migration(migrations.Migration): FILE: explorer/migrations/0008_auto_20190308_1642.py class Migration (line 4) | class Migration(migrations.Migration): FILE: explorer/migrations/0009_auto_20201009_0547.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0010_sql_required.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0011_query_favorites.py class Migration (line 8) | class Migration(migrations.Migration): FILE: explorer/migrations/0012_alter_queryfavorite_query_alter_queryfavorite_user.py class Migration (line 8) | class Migration(migrations.Migration): FILE: explorer/migrations/0013_querylog_error_querylog_success.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0014_promptlog.py class Migration (line 8) | class Migration(migrations.Migration): FILE: explorer/migrations/0015_explorervalue.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0016_alter_explorervalue_key.py function insert_assistant_prompt (line 6) | def insert_assistant_prompt(apps, schema_editor): function insert_assistant_prompt_reverse (line 20) | def insert_assistant_prompt_reverse(apps, schema_editor): class Migration (line 24) | class Migration(migrations.Migration): FILE: explorer/migrations/0017_databaseconnection.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0018_alter_databaseconnection_host_and_more.py class Migration (line 7) | class Migration(migrations.Migration): FILE: explorer/migrations/0019_alter_databaseconnection_engine.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0020_databaseconnection_extras_and_more.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0021_alter_databaseconnection_password_and_more.py class Migration (line 7) | class Migration(migrations.Migration): FILE: explorer/migrations/0022_databaseconnection_upload_fingerprint.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0023_query_database_connection_and_more.py class Migration (line 7) | class Migration(migrations.Migration): FILE: explorer/migrations/0024_auto_20240803_1135.py function populate_new_foreign_key (line 8) | def populate_new_foreign_key(apps, _): class Migration (line 67) | class Migration(migrations.Migration): FILE: explorer/migrations/0025_alter_query_database_connection_alter_querylog_database_connection.py class Migration (line 7) | class Migration(migrations.Migration): FILE: explorer/migrations/0026_tabledescription.py class Migration (line 7) | class Migration(migrations.Migration): FILE: explorer/migrations/0027_query_few_shot.py class Migration (line 6) | class Migration(migrations.Migration): FILE: explorer/migrations/0028_promptlog_database_connection_promptlog_user_request.py class Migration (line 7) | class Migration(migrations.Migration): FILE: explorer/models.py class Query (line 29) | class Query(models.Model): method __init__ (line 62) | def __init__(self, *args, **kwargs): class Meta (line 67) | class Meta: method __str__ (line 72) | def __str__(self): method get_run_count (line 75) | def get_run_count(self): method last_run_log (line 78) | def last_run_log(self): method avg_duration_display (line 82) | def avg_duration_display(self): method avg_duration (line 88) | def avg_duration(self): method passes_blacklist (line 93) | def passes_blacklist(self): method final_sql (line 96) | def final_sql(self): method execute_query_only (line 99) | def execute_query_only(self): method execute_with_logging (line 116) | def execute_with_logging(self, executing_user): method execute (line 132) | def execute(self): method available_params (line 137) | def available_params(self): method available_params_w_labels (line 152) | def available_params_w_labels(self): method get_absolute_url (line 168) | def get_absolute_url(self): method params_for_url (line 172) | def params_for_url(self): method log (line 175) | def log(self, user=None): method shared (line 189) | def shared(self): method snapshots (line 195) | def snapshots(self): method is_favorite (line 207) | def is_favorite(self, user): class SnapShot (line 214) | class SnapShot: method __init__ (line 216) | def __init__(self, url, last_modified): class QueryLog (line 221) | class QueryLog(models.Model): method is_playground (line 246) | def is_playground(self): class Meta (line 249) | class Meta: class QueryFavorite (line 253) | class QueryFavorite(models.Model): class Meta (line 265) | class Meta: class QueryResult (line 269) | class QueryResult: method __init__ (line 271) | def __init__(self, sql, connection): method data (line 288) | def data(self): method headers (line 292) | def headers(self): method header_strings (line 296) | def header_strings(self): method _get_headers (line 299) | def _get_headers(self): method _get_numerics (line 304) | def _get_numerics(self): method _get_transforms (line 318) | def _get_transforms(self): method column (line 325) | def column(self, ix): method process (line 328) | def process(self): method process_columns (line 336) | def process_columns(self): method process_rows (line 340) | def process_rows(self): method execute_query (line 347) | def execute_query(self): class ColumnHeader (line 361) | class ColumnHeader: method __init__ (line 363) | def __init__(self, title): method add_summary (line 367) | def add_summary(self, column): method __str__ (line 370) | def __str__(self): class ColumnStat (line 374) | class ColumnStat: method __init__ (line 376) | def __init__(self, label, statfn, precision=2, handles_null=False): method __call__ (line 382) | def __call__(self, coldata): method __str__ (line 387) | def __str__(self): class ColumnSummary (line 391) | class ColumnSummary: method __init__ (line 393) | def __init__(self, header, col): method stats (line 411) | def stats(self): method __str__ (line 414) | def __str__(self): class ExplorerValueManager (line 418) | class ExplorerValueManager(models.Manager): method get_uuid (line 420) | def get_uuid(self): method get_startup_last_send (line 431) | def get_startup_last_send(self): method set_startup_last_send (line 441) | def set_startup_last_send(self, ts): method get_item (line 450) | def get_item(self, key): class ExplorerValue (line 454) | class ExplorerValue(models.Model): FILE: explorer/permissions.py function view_permission (line 5) | def view_permission(request, **kwargs): function view_permission_list (line 19) | def view_permission_list(request, *args, **kwargs): function change_permission (line 24) | def change_permission(request, *args, **kwargs): function connections_permission (line 28) | def connections_permission(request, *args, **kwargs): FILE: explorer/schema.py function _get_includes (line 13) | def _get_includes(): function _get_excludes (line 17) | def _get_excludes(): function _include_views (line 21) | def _include_views(): function _include_table (line 25) | def _include_table(t): function connection_schema_cache_key (line 31) | def connection_schema_cache_key(connection_id): function connection_schema_json_cache_key (line 35) | def connection_schema_json_cache_key(connection_id): function transform_to_json_schema (line 39) | def transform_to_json_schema(schema_info): function schema_json_info (line 48) | def schema_json_info(db_connection): function schema_info (line 62) | def schema_info(db_connection): function clear_schema_cache (line 71) | def clear_schema_cache(db_connection): function build_schema_info (line 79) | def build_schema_info(db_connection): FILE: explorer/src/js/assistant.js function getErrorMessage (line 8) | function getErrorMessage() { function debounce (line 13) | function debounce(func, delay) { function setupTableList (line 21) | function setupTableList() { function selectRelevantTablesSql (line 94) | function selectRelevantTablesSql(choices, keys) { function selectRelevantTablesRequest (line 101) | function selectRelevantTablesRequest(choices, keys) { function setUpAssistant (line 108) | function setUpAssistant(expand = false) { function getAssistantHistory (line 142) | function getAssistantHistory() { function submitAssistantAsk (line 229) | function submitAssistantAsk() { function setUpCopyButtons (line 288) | function setUpCopyButtons(){ FILE: explorer/src/js/codemirror-config.js method keydown (line 25) | keydown(event, view) { function displaySchemaTooltip (line 38) | function displaySchemaTooltip(content) { function fetchAndShowSchema (line 56) | function fetchAndShowSchema(view) { FILE: explorer/src/js/csrf.js function getCsrfToken (line 6) | function getCsrfToken() { FILE: explorer/src/js/explorer.js function updateSchema (line 17) | function updateSchema() { function editorFromTextArea (line 32) | function editorFromTextArea(textarea) { function selectConnection (line 47) | function selectConnection() { class ExplorerEditor (line 59) | class ExplorerEditor { method constructor (line 60) | constructor(queryId) { method getParams (line 107) | getParams() { method serializeParams (line 119) | serializeParams(params) { method updateQueryString (line 127) | updateQueryString(key, value, url) { method formatSql (line 156) | formatSql() { method showRows (line 185) | showRows() { method showSchema (line 192) | showSchema(noAutofocus) { method hideSchema (line 206) | hideSchema() { method bind (line 225) | bind() { FILE: explorer/src/js/favorites.js function toggleFavorite (line 3) | async function toggleFavorite() { FILE: explorer/src/js/pivot-setup.js function pivotSetup (line 4) | function pivotSetup($) { function savePivotState (line 33) | function savePivotState(state) { FILE: explorer/src/js/pivot.js function pivotJq (line 18) | function pivotJq($) { FILE: explorer/src/js/query-list.js function searchFocus (line 6) | function searchFocus() { function expandAll (line 12) | function expandAll(param) { function setupQueryList (line 20) | function setupQueryList() { function setUpEmailCsv (line 38) | function setUpEmailCsv() { FILE: explorer/src/js/schema.js function searchFocus (line 3) | function searchFocus() { function setupSchema (line 10) | function setupSchema() { FILE: explorer/src/js/schemaService.js function getConnElement (line 29) | function getConnElement() { FILE: explorer/src/js/table-to-csv.js function tableToCSV (line 1) | function tableToCSV(tableEl) { function csvFromTable (line 19) | function csvFromTable(className) { FILE: explorer/src/js/tableDescription.js function populateTableList (line 5) | function populateTableList() { function updateSchema (line 38) | function updateSchema() { function setupTableDescription (line 42) | function setupTableDescription() { FILE: explorer/src/js/uploads.js function setupUploads (line 3) | function setupUploads() { FILE: explorer/tasks.py function execute_query (line 33) | def execute_query(query_id, email_address): function convert_csv_to_bytesio (line 56) | def convert_csv_to_bytesio(csv_exporter): function snapshot_query (line 65) | def snapshot_query(query_id): function snapshot_queries (line 80) | def snapshot_queries(): function truncate_querylogs (line 90) | def truncate_querylogs(days): function build_schema_cache_async (line 99) | def build_schema_cache_async(db_connection_id): function remove_unused_sqlite_dbs (line 114) | def remove_unused_sqlite_dbs(): function build_async_schemas (line 125) | def build_async_schemas(): FILE: explorer/telemetry.py function instance_identifier (line 19) | def instance_identifier(): class SelfNamedEnum (line 29) | class SelfNamedEnum(Enum): method _generate_next_value_ (line 32) | def _generate_next_value_(name, start, count, last_values): class StatNames (line 36) | class StatNames(SelfNamedEnum): class Stat (line 44) | class Stat: method __init__ (line 49) | def __init__(self, name: StatNames, value): method is_summary (line 56) | def is_summary(self): method should_send_summary_stats (line 59) | def should_send_summary_stats(self): method send_summary_stats (line 67) | def send_summary_stats(self): method track (line 73) | def track(self): function _send (line 96) | def _send(data): function _get_install_quarter (line 106) | def _get_install_quarter(): function _gather_summary_stats (line 119) | def _gather_summary_stats(): FILE: explorer/templatetags/explorer_tags.py function export_buttons (line 11) | def export_buttons(query=None): function query_favorite_button (line 23) | def query_favorite_button(query_id, is_favorite, extra_classes): FILE: explorer/templatetags/vite.py function get_css_link (line 17) | def get_css_link(file: str) -> str: function get_script (line 26) | def get_script(file: str) -> str: function get_asset (line 35) | def get_asset(file: str) -> str: function vite_asset (line 43) | def vite_asset(filename: str): function vite_hmr_client (line 58) | def vite_hmr_client(): FILE: explorer/tests/factories.py class UserFactory (line 10) | class UserFactory(DjangoModelFactory): class Meta (line 12) | class Meta: class SimpleQueryFactory (line 19) | class SimpleQueryFactory(DjangoModelFactory): class Meta (line 21) | class Meta: class QueryLogFactory (line 31) | class QueryLogFactory(DjangoModelFactory): class Meta (line 33) | class Meta: FILE: explorer/tests/settings.py class PrimaryDatabaseRouter (line 39) | class PrimaryDatabaseRouter: method allow_migrate (line 40) | def allow_migrate(self, db, app_label, model_name=None, **hints): FILE: explorer/tests/test_actions.py class TestSqlQueryActions (line 10) | class TestSqlQueryActions(TestCase): method test_single_query_is_csv_file (line 12) | def test_single_query_is_csv_file(self): method test_multiple_queries_are_zip_file (line 20) | def test_multiple_queries_are_zip_file(self): method test_packaging_removes_commas_from_file_name (line 38) | def test_packaging_removes_commas_from_file_name(self): FILE: explorer/tests/test_apps.py class PendingMigrationsTests (line 7) | class PendingMigrationsTests(TestCase): method test_no_pending_migrations (line 9) | def test_no_pending_migrations(self): FILE: explorer/tests/test_assistant.py function conn (line 27) | def conn(): class TestAssistantViews (line 32) | class TestAssistantViews(TestCase): method setUp (line 34) | def setUp(self): method test_do_modify_query (line 46) | def test_do_modify_query(self, mocked_openai_client): method test_assistant_help (line 56) | def test_assistant_help(self, mocked_openai_client): class TestBuildPrompt (line 66) | class TestBuildPrompt(TestCase): method test_build_prompt_with_vendor_only (line 69) | def test_build_prompt_with_vendor_only(self, mock_get_item): method test_build_prompt_with_sql_and_annotation (line 78) | def test_build_prompt_with_sql_and_annotation(self, mock_get_item, moc... method test_build_prompt_with_few_shot (line 92) | def test_build_prompt_with_few_shot(self, mock_get_item, mock_table_sc... method test_build_prompt_with_sql_and_error (line 106) | def test_build_prompt_with_sql_and_error(self, mock_get_item, mock_sam... method test_build_prompt_with_extra_tables_fitting_window (line 120) | def test_build_prompt_with_extra_tables_fitting_window(self, mock_get_... class TestPromptContext (line 133) | class TestPromptContext(TestCase): method test_retrieves_sample_rows (line 135) | def test_retrieves_sample_rows(self): method test_truncates_long_strings (line 143) | def test_truncates_long_strings(self): method test_binary_data (line 159) | def test_binary_data(self): method test_handles_various_data_types (line 177) | def test_handles_various_data_types(self): method test_handles_operational_error (line 194) | def test_handles_operational_error(self): method test_format_rows_from_table (line 205) | def test_format_rows_from_table(self): method test_schema_info_from_table_names (line 214) | def test_schema_info_from_table_names(self): method test_schema_info_from_table_names_case_invariant (line 230) | def test_schema_info_from_table_names_case_invariant(self): class TestAssistantUtils (line 248) | class TestAssistantUtils(TestCase): method test_sample_rows_from_table (line 250) | def test_sample_rows_from_table(self): method test_sample_rows_from_tables_no_table_match (line 261) | def test_sample_rows_from_tables_no_table_match(self): method test_relevant_few_shots (line 268) | def test_relevant_few_shots(self): method test_get_relevant_annotations (line 283) | def test_get_relevant_annotations(self): class TestAssistantHistoryApiView (line 306) | class TestAssistantHistoryApiView(TestCase): method setUp (line 308) | def setUp(self): method test_assistant_history_api_view (line 314) | def test_assistant_history_api_view(self): method test_assistant_history_api_view_invalid_json (line 349) | def test_assistant_history_api_view_invalid_json(self): method test_assistant_history_api_view_no_logs (line 357) | def test_assistant_history_api_view_no_logs(self): method test_assistant_history_api_view_filtered_results (line 369) | def test_assistant_history_api_view_filtered_results(self): FILE: explorer/tests/test_create_sqlite.py function write_sqlite_and_get_row (line 14) | def write_sqlite_and_get_row(f_bytes, table_name): class TestCreateSqlite (line 29) | class TestCreateSqlite(TestCase): method test_parse_to_sqlite (line 33) | def test_parse_to_sqlite(self): method test_parse_to_sqlite_with_no_parser (line 41) | def test_parse_to_sqlite_with_no_parser(self): class TestGetNames (line 50) | class TestGetNames(TestCase): method setUp (line 51) | def setUp(self): method test_no_append_conn (line 60) | def test_no_append_conn(self): method test_with_append_conn (line 65) | def test_with_append_conn(self): method test_secure_filename (line 70) | def test_secure_filename(self): method test_empty_filename (line 76) | def test_empty_filename(self): method test_invalid_extension (line 81) | def test_invalid_extension(self): FILE: explorer/tests/test_csrf_cookie_name.py class TestCsrfCookieName (line 13) | class TestCsrfCookieName(TestCase): method test_csrf_cookie_name_in_context (line 14) | def test_csrf_cookie_name_in_context(self): method test_custom_csrf_cookie_name (line 22) | def test_custom_csrf_cookie_name(self): FILE: explorer/tests/test_db_connection_utils.py class TestSQLiteConnection (line 17) | class TestSQLiteConnection(TestCase): method test_get_sqlite_for_connection_downloads_file_if_not_exists (line 20) | def test_get_sqlite_for_connection_downloads_file_if_not_exists(self, ... method test_get_sqlite_for_connection_skips_download_if_exists (line 38) | def test_get_sqlite_for_connection_skips_download_if_exists(self, mock... class TestDjangoStyleConnection (line 63) | class TestDjangoStyleConnection(TestCase): method test_create_django_style_connection_with_extras (line 66) | def test_create_django_style_connection_with_extras(self, mock_load_ba... class TestPandasToSQLite (line 87) | class TestPandasToSQLite(TestCase): method test_pandas_to_sqlite (line 89) | def test_pandas_to_sqlite(self): method test_cant_create_connection_for_unregistered_django_alias (line 121) | def test_cant_create_connection_for_unregistered_django_alias(self): FILE: explorer/tests/test_exporters.py class TestCsv (line 16) | class TestCsv(TestCase): method test_writing_unicode (line 18) | def test_writing_unicode(self): method test_custom_delimiter (line 33) | def test_custom_delimiter(self): method test_writing_bom (line 42) | def test_writing_bom(self): class TestJson (line 49) | class TestJson(TestCase): method test_writing_json (line 51) | def test_writing_json(self): method test_writing_datetimes (line 64) | def test_writing_datetimes(self): class TestExcel (line 78) | class TestExcel(TestCase): method test_writing_excel (line 81) | def test_writing_excel(self): method test_writing_dict_fields (line 115) | def test_writing_dict_fields(self): FILE: explorer/tests/test_forms.py class TestFormValidation (line 11) | class TestFormValidation(TestCase): method test_form_is_valid_with_valid_sql (line 13) | def test_form_is_valid_with_valid_sql(self): method test_form_fails_null (line 18) | def test_form_fails_null(self): method test_form_fails_blank (line 22) | def test_form_fails_blank(self): method test_form_fails_blacklist (line 28) | def test_form_fails_blacklist(self): class QueryFormTestCase (line 35) | class QueryFormTestCase(TestCase): method test_valid_form_submission (line 37) | def test_valid_form_submission(self): method test_default_connection_first (line 56) | def test_default_connection_first(self, mocked_default_db_connection): FILE: explorer/tests/test_mime.py class TestIsCsvFunction (line 9) | class TestIsCsvFunction(TestCase): method test_is_csv_with_csv_file (line 11) | def test_is_csv_with_csv_file(self): method test_is_csv_with_non_csv_file (line 16) | def test_is_csv_with_non_csv_file(self): method test_is_csv_with_empty_content_type (line 21) | def test_is_csv_with_empty_content_type(self): class TestIsJsonFunction (line 27) | class TestIsJsonFunction(TestCase): method test_is_json_with_valid_json (line 29) | def test_is_json_with_valid_json(self): method test_is_json_with_non_json_file (line 34) | def test_is_json_with_non_json_file(self): method test_is_json_with_wrong_extension (line 38) | def test_is_json_with_wrong_extension(self): method test_is_json_with_empty_content_type (line 43) | def test_is_json_with_empty_content_type(self): class TestIsJsonListFunction (line 49) | class TestIsJsonListFunction(TestCase): method test_is_json_list_with_valid_json_lines (line 51) | def test_is_json_list_with_valid_json_lines(self): method test_is_json_list_with_multiline_json (line 56) | def test_is_json_list_with_multiline_json(self): method test_is_json_list_with_non_json_file (line 61) | def test_is_json_list_with_non_json_file(self): method test_is_json_list_with_invalid_json_lines (line 65) | def test_is_json_list_with_invalid_json_lines(self): method test_is_json_list_with_wrong_extension (line 72) | def test_is_json_list_with_wrong_extension(self): method test_is_json_list_with_empty_file (line 77) | def test_is_json_list_with_empty_file(self): class IsSqliteTestCase (line 82) | class IsSqliteTestCase(TestCase): method setUp (line 83) | def setUp(self): method test_is_sqlite_with_valid_sqlite_file (line 107) | def test_is_sqlite_with_valid_sqlite_file(self): method test_is_sqlite_with_invalid_sqlite_file_content_type (line 112) | def test_is_sqlite_with_invalid_sqlite_file_content_type(self): method test_is_sqlite_with_invalid_sqlite_file_header (line 117) | def test_is_sqlite_with_invalid_sqlite_file_header(self): method test_is_sqlite_with_exception_handling (line 123) | def test_is_sqlite_with_exception_handling(self): FILE: explorer/tests/test_models.py class TestQueryModel (line 15) | class TestQueryModel(TestCase): method test_params_get_merged (line 17) | def test_params_get_merged(self): method test_default_params_used (line 22) | def test_default_params_used(self): method test_default_params_used_even_with_labels (line 26) | def test_default_params_used_even_with_labels(self): method test_default_params_and_labels (line 30) | def test_default_params_and_labels(self): method test_query_log (line 34) | def test_query_log(self): method test_query_logs_final_sql (line 45) | def test_query_logs_final_sql(self): method test_playground_query_log (line 53) | def test_playground_query_log(self): method test_shared (line 59) | def test_shared(self): method test_get_run_count (line 66) | def test_get_run_count(self): method test_avg_duration (line 74) | def test_avg_duration(self): method test_log_saves_duration (line 86) | def test_log_saves_duration(self): method test_log_saves_errors (line 94) | def test_log_saves_errors(self): method test_get_snapshots_sorts_snaps (line 109) | def test_get_snapshots_sorts_snaps(self, mocked_get_s3_bucket, mocked_... method test_final_sql_uses_merged_params (line 127) | def test_final_sql_uses_merged_params(self): method test_final_sql_fails_blacklist_with_bad_param (line 133) | def test_final_sql_fails_blacklist_with_bad_param(self): method test_query_will_execute_with_null_database_connection (line 141) | def test_query_will_execute_with_null_database_connection(self): class TestQueryResults (line 150) | class TestQueryResults(TestCase): method setUp (line 152) | def setUp(self): method test_column_access (line 156) | def test_column_access(self): method test_headers (line 160) | def test_headers(self): method test_data (line 164) | def test_data(self): method test_unicode_with_nulls (line 167) | def test_unicode_with_nulls(self): method test_summary_gets_built (line 174) | def test_summary_gets_built(self): method test_summary_gets_built_for_multiple_cols (line 180) | def test_summary_gets_built_for_multiple_cols(self): method test_numeric_detection (line 189) | def test_numeric_detection(self): method test_transforms_are_identified (line 192) | def test_transforms_are_identified(self): method test_transform_alters_row (line 197) | def test_transform_alters_row(self): method test_multiple_transforms (line 203) | def test_multiple_transforms(self): method test_get_headers_no_results (line 209) | def test_get_headers_no_results(self): class TestColumnSummary (line 214) | class TestColumnSummary(TestCase): method test_executes (line 216) | def test_executes(self): method test_handles_null_as_zero (line 220) | def test_handles_null_as_zero(self): method test_empty_data (line 224) | def test_empty_data(self): class TestDatabaseConnection (line 229) | class TestDatabaseConnection(TestCase): method test_cant_create_a_connection_with_conflicting_name (line 231) | def test_cant_create_a_connection_with_conflicting_name(self): method test_local_name_calls_user_dbs_local_dir (line 243) | def test_local_name_calls_user_dbs_local_dir(self, mock_getcwd, mock_e... method test_single_download_triggered (line 262) | def test_single_download_triggered(self, mock_cache, mock_get_s3_bucket): method test_skip_download_when_locked (line 285) | def test_skip_download_when_locked(self, mock_cache, mock_get_s3_bucket): method test_not_downloaded_if_file_exists_and_model_is_unsaved (line 307) | def test_not_downloaded_if_file_exists_and_model_is_unsaved(self, mock... method test_fingerprint_is_updated_after_download_and_download_is_not_called_again (line 335) | def test_fingerprint_is_updated_after_download_and_download_is_not_cal... method test_default_is_set (line 390) | def test_default_is_set(self): FILE: explorer/tests/test_schema.py function conn (line 11) | def conn(): class TestSchemaInfo (line 15) | class TestSchemaInfo(TestCase): method setUp (line 17) | def setUp(self): method test_schema_info_returns_valid_data (line 22) | def test_schema_info_returns_valid_data(self, mocked_excludes, method test_table_exclusion_list (line 36) | def test_table_exclusion_list(self, mocked_excludes, mocked_includes): method test_app_inclusion_list (line 45) | def test_app_inclusion_list(self, mocked_excludes, mocked_includes): method test_app_inclusion_list_excluded (line 55) | def test_app_inclusion_list_excluded(self, mocked_excludes, method test_app_include_views (line 65) | def test_app_include_views(self, mocked_include_views): method test_app_exclude_views (line 73) | def test_app_exclude_views(self, mocked_include_views): method test_transform_to_json (line 80) | def test_transform_to_json(self): function setup_sample_database_view (line 92) | def setup_sample_database_view(): FILE: explorer/tests/test_tasks.py class TestTasks (line 19) | class TestTasks(TestCase): method test_async_results (line 23) | def test_async_results(self, mocked_upload): method test_async_results_fails_with_message (line 49) | def test_async_results_fails_with_message(self, mocked_upload): method test_snapshots (line 64) | def test_snapshots(self, mocked_upload): method test_truncating_querylogs (line 76) | def test_truncating_querylogs(self): class RemoveUnusedSQLiteDBsTestCase (line 92) | class RemoveUnusedSQLiteDBsTestCase(TestCase): method set_up_the_things (line 94) | def set_up_the_things(self, offset): method test_remove_unused_sqlite_dbs (line 115) | def test_remove_unused_sqlite_dbs(self): method test_do_not_remove_recently_used_db (line 122) | def test_do_not_remove_recently_used_db(self): FILE: explorer/tests/test_telemetry.py class TestTelemetry (line 8) | class TestTelemetry(TestCase): method setUp (line 10) | def setUp(self): method test_instance_identifier (line 13) | def test_instance_identifier(self): method test_gather_summary_stats (line 21) | def test_gather_summary_stats(self): method test_stats_not_sent_too_frequently (line 28) | def test_stats_not_sent_too_frequently(self, mocked_app_settings, mock... method test_stats_not_sent_if_disabled (line 54) | def test_stats_not_sent_if_disabled(self, mocked_app_settings, mocked_... method test_get_install_quarter_with_no_migrations (line 61) | def test_get_install_quarter_with_no_migrations(self, mock_filter): method test_get_install_quarter_edge_cases (line 67) | def test_get_install_quarter_edge_cases(self, mock_filter): FILE: explorer/tests/test_type_infer.py function _get_csv (line 10) | def _get_csv(csv_name): function _get_json (line 21) | def _get_json(json_name): class TestCsvToTypedDf (line 33) | class TestCsvToTypedDf(TestCase): method test_mixed_types (line 35) | def test_mixed_types(self): method test_all_types (line 41) | def test_all_types(self): method test_integer_parsing (line 48) | def test_integer_parsing(self): method test_float_parsing (line 53) | def test_float_parsing(self): method test_date_parsing (line 57) | def test_date_parsing(self): class TestJsonToTypedDf (line 69) | class TestJsonToTypedDf(TestCase): method test_basic_json (line 71) | def test_basic_json(self): method test_nested_json (line 77) | def test_nested_json(self): method test_json_list (line 84) | def test_json_list(self): FILE: explorer/tests/test_utils.py class TestSqlBlacklist (line 13) | class TestSqlBlacklist(TestCase): method setUp (line 15) | def setUp(self): method tearDown (line 18) | def tearDown(self): method test_overriding_blacklist (line 21) | def test_overriding_blacklist(self): method test_not_overriding_blacklist (line 27) | def test_not_overriding_blacklist(self): method test_select_keywords_as_literals (line 33) | def test_select_keywords_as_literals(self): method test_select_containing_drop_in_word (line 38) | def test_select_containing_drop_in_word(self): method test_select_with_case (line 42) | def test_select_with_case(self): method test_select_with_subselect (line 57) | def test_select_with_subselect(self): method test_select_with_replace_function (line 68) | def test_select_with_replace_function(self): method test_dml_commit (line 73) | def test_dml_commit(self): method test_dml_delete (line 78) | def test_dml_delete(self): method test_dml_insert (line 85) | def test_dml_insert(self): method test_dml_merge (line 90) | def test_dml_merge(self): method test_dml_replace (line 101) | def test_dml_replace(self): method test_dml_rollback (line 106) | def test_dml_rollback(self): method test_dml_set (line 111) | def test_dml_set(self): method test_dml_start (line 116) | def test_dml_start(self): method test_dml_update (line 121) | def test_dml_update(self): method test_dml_upsert (line 128) | def test_dml_upsert(self): method test_ddl_alter (line 133) | def test_ddl_alter(self): method test_ddl_create (line 143) | def test_ddl_create(self): method test_ddl_drop (line 155) | def test_ddl_drop(self): method test_ddl_rename (line 160) | def test_ddl_rename(self): method test_ddl_truncate (line 165) | def test_ddl_truncate(self): method test_dcl_grant (line 170) | def test_dcl_grant(self): method test_dcl_revoke (line 175) | def test_dcl_revoke(self): method test_dcl_revoke_bad_syntax (line 180) | def test_dcl_revoke_bad_syntax(self): class TestParams (line 186) | class TestParams(TestCase): method test_swappable_params_are_built_correctly (line 188) | def test_swappable_params_are_built_correctly(self): method test_params_get_swapped (line 192) | def test_params_get_swapped(self): method test_empty_params_does_nothing (line 199) | def test_empty_params_does_nothing(self): method test_non_string_param_gets_swapper (line 205) | def test_non_string_param_gets_swapper(self): method _assertSwap (line 212) | def _assertSwap(self, tuple): method test_extracting_params (line 215) | def test_extracting_params(self): method test_shared_dict_update (line 236) | def test_shared_dict_update(self): method test_get_params_from_url (line 241) | def test_get_params_from_url(self): method test_get_params_for_request (line 248) | def test_get_params_for_request(self): method test_get_params_for_request_empty (line 260) | def test_get_params_for_request_empty(self): class TestSecureFilename (line 265) | class TestSecureFilename(TestCase): method test_basic_ascii (line 266) | def test_basic_ascii(self): method test_special_characters (line 269) | def test_special_characters(self): method test_leading_trailing_underscores (line 272) | def test_leading_trailing_underscores(self): method test_unicode_characters (line 277) | def test_unicode_characters(self): method test_empty_filename (line 281) | def test_empty_filename(self): method test_bad_extension (line 285) | def test_bad_extension(self): method test_empty_extension (line 289) | def test_empty_extension(self): method test_spaces (line 293) | def test_spaces(self): FILE: explorer/tests/test_views.py function reload_app_settings (line 29) | def reload_app_settings(): class TestQueryListView (line 37) | class TestQueryListView(TestCase): method setUp (line 39) | def setUp(self): method test_admin_required (line 45) | def test_admin_required(self): method test_headers (line 50) | def test_headers(self): method test_permissions_show_only_allowed_queries (line 60) | def test_permissions_show_only_allowed_queries(self): method test_run_count (line 72) | def test_run_count(self): class TestQueryCreateView (line 80) | class TestQueryCreateView(TestCase): method setUp (line 82) | def setUp(self): method test_change_permission_required (line 90) | def test_change_permission_required(self): method test_renders_with_title (line 95) | def test_renders_with_title(self): function custom_view (line 102) | def custom_view(request): class TestQueryDetailView (line 106) | class TestQueryDetailView(TestCase): method setUp (line 109) | def setUp(self): method test_query_with_bad_sql_renders_error (line 115) | def test_query_with_bad_sql_renders_error(self): method test_query_with_bad_sql_renders_error_on_save (line 123) | def test_query_with_bad_sql_renders_error_on_save(self): method test_posting_query_saves_correctly (line 132) | def test_posting_query_saves_correctly(self): method test_change_permission_required_to_save_query (line 143) | def test_change_permission_required_to_save_query(self): method test_modified_date_gets_updated_after_viewing_query (line 157) | def test_modified_date_gets_updated_after_viewing_query(self): method test_doesnt_render_results_if_show_is_none (line 166) | def test_doesnt_render_results_if_show_is_none(self): method test_doesnt_render_results_if_show_is_none_on_post (line 176) | def test_doesnt_render_results_if_show_is_none_on_post(self): method test_doesnt_render_results_if_params_and_no_autorun (line 187) | def test_doesnt_render_results_if_params_and_no_autorun(self): method test_does_render_results_if_params_and_autorun (line 199) | def test_does_render_results_if_params_and_autorun(self): method test_does_render_label_if_params_and_autorun (line 211) | def test_does_render_label_if_params_and_autorun(self): method test_admin_required (line 223) | def test_admin_required(self): method test_admin_required_with_explorer_no_permission_setting (line 231) | def test_admin_required_with_explorer_no_permission_setting(self): method test_individual_view_permission (line 243) | def test_individual_view_permission(self): method test_header_token_auth (line 257) | def test_header_token_auth(self): method test_url_token_auth (line 270) | def test_url_token_auth(self): method test_user_query_views (line 284) | def test_user_query_views(self): method test_query_snapshot_renders (line 304) | def test_query_snapshot_renders(self, mocked_conn): method test_failing_blacklist_means_query_doesnt_execute (line 323) | def test_failing_blacklist_means_query_doesnt_execute(self): method test_fullscreen (line 338) | def test_fullscreen(self): method test_multiple_connections_integration (line 347) | def test_multiple_connections_integration(self): class TestDownloadView (line 379) | class TestDownloadView(TestCase): method setUp (line 380) | def setUp(self): method test_admin_required (line 387) | def test_admin_required(self): method test_params_in_download (line 394) | def test_params_in_download(self): method test_download_defaults_to_csv (line 403) | def test_download_defaults_to_csv(self): method test_download_csv (line 412) | def test_download_csv(self): method test_bad_query_gives_500 (line 421) | def test_bad_query_gives_500(self): method test_download_json (line 429) | def test_download_json(self): class TestQueryPlayground (line 444) | class TestQueryPlayground(TestCase): method setUp (line 446) | def setUp(self): method test_empty_playground_renders (line 452) | def test_empty_playground_renders(self): method test_playground_renders_with_query_sql (line 457) | def test_playground_renders_with_query_sql(self): method test_playground_renders_with_posted_sql (line 465) | def test_playground_renders_with_posted_sql(self): method test_playground_doesnt_render_with_posted_sql_if_show_is_none (line 473) | def test_playground_doesnt_render_with_posted_sql_if_show_is_none(self): method test_playground_renders_with_empty_posted_sql (line 481) | def test_playground_renders_with_empty_posted_sql(self): method test_query_with_no_resultset_doesnt_throw_error (line 486) | def test_query_with_no_resultset_doesnt_throw_error(self): method test_admin_required (line 493) | def test_admin_required(self): method test_admin_required_with_no_permission_view_setting (line 498) | def test_admin_required_with_no_permission_view_setting(self): method test_loads_query_from_log (line 508) | def test_loads_query_from_log(self): method test_fails_blacklist (line 517) | def test_fails_blacklist(self): method test_fullscreen (line 525) | def test_fullscreen(self): class TestCSVFromSQL (line 536) | class TestCSVFromSQL(TestCase): method setUp (line 538) | def setUp(self): method test_admin_required (line 544) | def test_admin_required(self): method test_downloading_from_playground (line 549) | def test_downloading_from_playground(self): method test_stream_csv_from_query (line 560) | def test_stream_csv_from_query(self): class TestSQLDownloadViews (line 568) | class TestSQLDownloadViews(TestCase): method setUp (line 571) | def setUp(self): method test_sql_download_csv (line 577) | def test_sql_download_csv(self): method test_sql_download_respects_connection (line 585) | def test_sql_download_respects_connection(self): method test_sql_download_csv_with_custom_delim (line 612) | def test_sql_download_csv_with_custom_delim(self): method test_sql_download_csv_with_tab_delim (line 623) | def test_sql_download_csv_with_tab_delim(self): method test_sql_download_csv_with_bad_delim (line 632) | def test_sql_download_csv_with_bad_delim(self): method test_sql_download_json (line 641) | def test_sql_download_json(self): class TestSchemaView (line 650) | class TestSchemaView(TestCase): method setUp (line 652) | def setUp(self): method test_returns_schema_contents (line 659) | def test_returns_schema_contents(self): method test_returns_schema_contents_json (line 666) | def test_returns_schema_contents_json(self): method test_returns_404_if_conn_doesnt_exist (line 673) | def test_returns_404_if_conn_doesnt_exist(self): method test_admin_required (line 679) | def test_admin_required(self): class TestFormat (line 687) | class TestFormat(TestCase): method setUp (line 689) | def setUp(self): method test_returns_formatted_sql (line 695) | def test_returns_formatted_sql(self): class TestParamsInViews (line 705) | class TestParamsInViews(TestCase): method setUp (line 707) | def setUp(self): method test_retrieving_query_works_with_params (line 714) | def test_retrieving_query_works_with_params(self): method test_saving_non_executing_query_with__wrong_url_params_works (line 722) | def test_saving_non_executing_query_with__wrong_url_params_works(self): method test_users_without_change_permissions_can_use_params (line 732) | def test_users_without_change_permissions_can_use_params(self): class TestCreatedBy (line 741) | class TestCreatedBy(TestCase): method setUp (line 743) | def setUp(self): method test_query_update_doesnt_change_created_user (line 756) | def test_query_update_doesnt_change_created_user(self): method test_new_query_gets_created_by_logged_in_user (line 765) | def test_new_query_gets_created_by_logged_in_user(self): class TestQueryLog (line 771) | class TestQueryLog(TestCase): method setUp (line 773) | def setUp(self): method test_playground_saves_query_to_log (line 779) | def test_playground_saves_query_to_log(self): method test_creating_query_does_not_save_to_log (line 786) | def test_creating_query_does_not_save_to_log(self): method test_query_saves_to_log (line 791) | def test_query_saves_to_log(self): method test_query_gets_logged_and_appears_on_log_page (line 801) | def test_query_gets_logged_and_appears_on_log_page(self): method test_admin_required (line 812) | def test_admin_required(self): method test_is_playground (line 817) | def test_is_playground(self): class TestEmailQuery (line 824) | class TestEmailQuery(TestCase): method setUp (line 826) | def setUp(self): method test_email_calls_task (line 833) | def test_email_calls_task(self, mocked_execute): method test_no_email (line 842) | def test_no_email(self): class TestQueryFavorites (line 852) | class TestQueryFavorites(TestCase): method setUp (line 854) | def setUp(self): method test_returns_favorite_list (line 862) | def test_returns_favorite_list(self): class TestQueryFavorite (line 869) | class TestQueryFavorite(TestCase): method setUp (line 871) | def setUp(self): method test_toggle (line 878) | def test_toggle(self): class UploadDbViewTest (line 892) | class UploadDbViewTest(TestCase): method setUp (line 894) | def setUp(self): method test_post_csv_file (line 901) | def test_post_csv_file(self): method test_upload_file (line 922) | def test_upload_file(self, mock_upload_sqlite): method test_post_no_file (line 961) | def test_post_no_file(self): method test_delete_existing_connection (line 967) | def test_delete_existing_connection(self): method test_delete_non_existing_connection (line 982) | def test_delete_non_existing_connection(self): method test_post_file_too_large (line 988) | def test_post_file_too_large(self): method test_bad_parse_type (line 998) | def test_bad_parse_type(self, patched_parse): method test_bad_parse_mime (line 1005) | def test_bad_parse_mime(self): method test_cant_append_sqlite_to_file (line 1012) | def test_cant_append_sqlite_to_file(self, patched_is_sqlite): class DatabaseConnectionValidateViewTestCase (line 1026) | class DatabaseConnectionValidateViewTestCase(TestCase): method setUp (line 1028) | def setUp(self): method test_validate_connection_success (line 1054) | def test_validate_connection_success(self): method test_validate_connection_invalid_form (line 1059) | def test_validate_connection_invalid_form(self): method test_update_existing_connection (line 1064) | def test_update_existing_connection(self): method test_database_connection_error (line 1071) | def test_database_connection_error(self, mock_load): class TestDatabaseConnectionRefreshView (line 1079) | class TestDatabaseConnectionRefreshView(TestCase): method setUp (line 1081) | def setUp(self): method test_refresh_connection (line 1097) | def test_refresh_connection(self): method tearDown (line 1119) | def tearDown(self): class SimpleViewTests (line 1126) | class SimpleViewTests(TestCase): method setUp (line 1128) | def setUp(self): method test_database_connection_detail_view (line 1143) | def test_database_connection_detail_view(self): method test_database_connection_create_view (line 1147) | def test_database_connection_create_view(self): method test_database_connection_update_view (line 1151) | def test_database_connection_update_view(self): method test_database_connections_list_view (line 1155) | def test_database_connections_list_view(self): method test_database_connection_delete_view (line 1159) | def test_database_connection_delete_view(self): method test_database_connection_upload_view (line 1163) | def test_database_connection_upload_view(self): method test_table_description_list_view (line 1167) | def test_table_description_list_view(self): FILE: explorer/utils.py function passes_blacklist (line 22) | def passes_blacklist(sql: str) -> Tuple[bool, Iterable[str]]: function walk_tokens (line 42) | def walk_tokens(token: TokenList) -> Iterable[Token]: function _format_field (line 56) | def _format_field(field): function param (line 60) | def param(name): function swap_params (line 64) | def swap_params(sql, params): function extract_params (line 73) | def extract_params(text): function safe_login_prompt (line 85) | def safe_login_prompt(request): function shared_dict_update (line 98) | def shared_dict_update(target, source): function safe_cast (line 105) | def safe_cast(val, to_type, default=None): function get_int_from_request (line 112) | def get_int_from_request(request, name, default): function get_params_from_request (line 117) | def get_params_from_request(request): function get_params_for_url (line 130) | def get_params_for_url(query): function url_get_rows (line 135) | def url_get_rows(request): function url_get_query_id (line 141) | def url_get_query_id(request): function url_get_log_id (line 145) | def url_get_log_id(request): function url_get_show (line 149) | def url_get_show(request): function url_get_fullscreen (line 153) | def url_get_fullscreen(request): function url_get_params (line 157) | def url_get_params(request): function allowed_query_pks (line 161) | def allowed_query_pks(user_id): function user_can_see_query (line 165) | def user_can_see_query(request, **kwargs): function fmt_sql (line 171) | def fmt_sql(sql): function noop_decorator (line 175) | def noop_decorator(f): class InvalidExplorerConnectionException (line 179) | class InvalidExplorerConnectionException(Exception): function delete_from_s3 (line 183) | def delete_from_s3(s3_path): function get_s3_bucket (line 194) | def get_s3_bucket(): function s3_csv_upload (line 219) | def s3_csv_upload(key, data): function s3_url (line 227) | def s3_url(bucket, key): function is_xls_writer_available (line 235) | def is_xls_writer_available(): function secure_filename (line 243) | def secure_filename(filename): FILE: explorer/views/auth.py class PermissionRequiredMixin (line 8) | class PermissionRequiredMixin: method handle_no_permission (line 13) | def handle_no_permission(request): method get_permission_required (line 16) | def get_permission_required(self): method has_permission (line 25) | def has_permission(self, request, *args, **kwargs): method dispatch (line 33) | def dispatch(self, request, *args, **kwargs): class SafeLoginView (line 39) | class SafeLoginView(LoginView): function safe_login_view_wrapper (line 43) | def safe_login_view_wrapper(request): FILE: explorer/views/create.py class CreateQueryView (line 8) | class CreateQueryView(PermissionRequiredMixin, ExplorerContextMixin, method form_valid (line 15) | def form_valid(self, form): FILE: explorer/views/delete.py class DeleteQueryView (line 9) | class DeleteQueryView(PermissionRequiredMixin, ExplorerContextMixin, FILE: explorer/views/download.py class DownloadQueryView (line 10) | class DownloadQueryView(PermissionRequiredMixin, View): method get (line 14) | def get(self, request, query_id, *args, **kwargs): class DownloadFromSqlView (line 19) | class DownloadFromSqlView(PermissionRequiredMixin, View): method post (line 23) | def post(self, request, *args, **kwargs): FILE: explorer/views/email.py class EmailCsvQueryView (line 8) | class EmailCsvQueryView(PermissionRequiredMixin, View): method post (line 12) | def post(self, request, query_id, *args, **kwargs): FILE: explorer/views/export.py function _export (line 8) | def _export(request, query, download=True): FILE: explorer/views/format_sql.py function format_sql (line 8) | def format_sql(request): FILE: explorer/views/list.py class ListQueryView (line 15) | class ListQueryView(PermissionRequiredMixin, ExplorerContextMixin, ListV... method recently_viewed (line 19) | def recently_viewed(self): method get_context_data (line 37) | def get_context_data(self, **kwargs): method get_queryset (line 46) | def get_queryset(self): method _build_queries_and_headers (line 61) | def _build_queries_and_headers(self): class ListQueryLogView (line 129) | class ListQueryLogView(PermissionRequiredMixin, ExplorerContextMixin, Li... method get_queryset (line 135) | def get_queryset(self): FILE: explorer/views/mixins.py class ExplorerContextMixin (line 7) | class ExplorerContextMixin: method gen_ctx (line 9) | def gen_ctx(self): method get_context_data (line 29) | def get_context_data(self, **kwargs): method render_template (line 34) | def render_template(self, template, ctx): FILE: explorer/views/query.py class PlayQueryView (line 21) | class PlayQueryView(PermissionRequiredMixin, ExplorerContextMixin, View): method get (line 24) | def get(self, request): method post (line 37) | def post(self, request): method render (line 58) | def render(self): method render_with_sql (line 67) | def render_with_sql(self, request, query, run_query=True, error=None): class QueryView (line 89) | class QueryView(PermissionRequiredMixin, ExplorerContextMixin, View): method get (line 92) | def get(self, request, query_id): method post (line 122) | def post(self, request, query_id): method get_instance_and_form (line 151) | def get_instance_and_form(request, query_id): FILE: explorer/views/query_favorite.py class QueryFavoritesView (line 9) | class QueryFavoritesView(PermissionRequiredMixin, ExplorerContextMixin, ... method get (line 12) | def get(self, request): class QueryFavoriteView (line 20) | class QueryFavoriteView(PermissionRequiredMixin, ExplorerContextMixin, V... method build_favorite_response (line 24) | def build_favorite_response(user, query_id): method get (line 33) | def get(self, request, query_id): method post (line 36) | def post(self, request, query_id): FILE: explorer/views/schema.py class SchemaView (line 13) | class SchemaView(PermissionRequiredMixin, View): method dispatch (line 18) | def dispatch(self, *args, **kwargs): method get (line 21) | def get(self, request, *args, **kwargs): class SchemaJsonView (line 42) | class SchemaJsonView(PermissionRequiredMixin, View): method get (line 46) | def get(self, request, *args, **kwargs): FILE: explorer/views/stream.py class StreamQueryView (line 10) | class StreamQueryView(PermissionRequiredMixin, View): method get (line 14) | def get(self, request, query_id, *args, **kwargs): FILE: explorer/views/utils.py function query_viewmodel (line 12) | def query_viewmodel(request, query, title=None, form=None, message=None, FILE: setup.py function requirements (line 19) | def requirements(fname):