mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Escape quotes in identifiers in CQL queries
This commit is contained in:
committed by
GitHub
parent
a9a57f4ba9
commit
5ffa746adb
@@ -6,6 +6,7 @@ import { Action } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||
import { CassandraTableKey, CassandraAPIDataClient } from "../TableDataClient";
|
||||
import DataTableViewModel from "./DataTableViewModel";
|
||||
import * as DataTableUtilities from "./DataTableUtilities";
|
||||
import { getQuotedCqlIdentifier } from "../CqlUtilities";
|
||||
import TableCommands from "./TableCommands";
|
||||
import TableEntityCache from "./TableEntityCache";
|
||||
import * as Constants from "../Constants";
|
||||
@@ -57,7 +58,9 @@ export default class TableEntityListViewModel extends DataTableViewModel {
|
||||
this.queryTablesTab = queryTablesTab;
|
||||
this.id = `tableEntityListViewModel${this.queryTablesTab.tabId}`;
|
||||
this.cqlQuery = ko.observable<string>(
|
||||
`SELECT * FROM ${this.queryTablesTab.collection.databaseId}.${this.queryTablesTab.collection.id()}`
|
||||
`SELECT * FROM ${getQuotedCqlIdentifier(this.queryTablesTab.collection.databaseId)}.${getQuotedCqlIdentifier(
|
||||
this.queryTablesTab.collection.id()
|
||||
)}`
|
||||
);
|
||||
this.oDataQuery = ko.observable<string>();
|
||||
this.sqlQuery = ko.observable<string>("SELECT * FROM c");
|
||||
|
||||
Reference in New Issue
Block a user