mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Explorer null handling (#1658)
* Cassandra null value handling * prettier run * Added boolean and date * Reverted null handling switch statement and added editing warning * ran prettier * putting new line back in * prettier run * changed warning message * updated snapshot * fixed undefined condition * removed toString from undefined
This commit is contained in:
@@ -147,7 +147,7 @@ export class CassandraAPIDataClient extends TableDataClient {
|
||||
let properties = "(";
|
||||
let values = "(";
|
||||
for (let property in entity) {
|
||||
if (entity[property]._ === null) {
|
||||
if (entity[property]._ === "" || entity[property]._ === undefined) {
|
||||
continue;
|
||||
}
|
||||
properties = properties.concat(`${property}, `);
|
||||
@@ -208,6 +208,9 @@ export class CassandraAPIDataClient extends TableDataClient {
|
||||
!originalDocument[property] ||
|
||||
newEntity[property]._.toString() !== originalDocument[property]._.toString()
|
||||
) {
|
||||
if (newEntity[property]._.toString() === "" || newEntity[property]._ === undefined) {
|
||||
continue;
|
||||
}
|
||||
let propertyQuerySegment = this.isStringType(newEntity[property].$)
|
||||
? `${property} = '${newEntity[property]._}',`
|
||||
: `${property} = ${newEntity[property]._},`;
|
||||
|
||||
Reference in New Issue
Block a user