Add support for date type to cassandra column types (#1176)

This commit is contained in:
victor-meng 2021-12-16 14:51:18 -08:00 committed by GitHub
parent de58f570cd
commit 529202ba7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 39 deletions

View File

@ -16,54 +16,57 @@ exports[`Settings Pane should render Default properly 1`] = `
<div <div
className="settingsSectionPart" className="settingsSectionPart"
> >
<Stack <fieldset>
horizontal={true} <legend
> className="settingsSectionLabel legendLabel"
<Text
className="settingsSectionLabel"
id="pageOptions" id="pageOptions"
variant="small"
> >
Page options Page Options
</Text> </legend>
<InfoTooltip> <InfoTooltip>
Choose Custom to specify a fixed amount of query results to show, or choose Unlimited to show as many query results per page. Choose Custom to specify a fixed amount of query results to show, or choose Unlimited to show as many query results per page.
</InfoTooltip> </InfoTooltip>
</Stack> <StyledChoiceGroup
<StyledChoiceGroup ariaLabelledBy="pageOptions"
ariaLabelledBy="pageOptions" onChange={[Function]}
onChange={[Function]} options={
options={ Array [
Array [
Object {
"key": "custom",
"text": "Custom",
},
Object {
"key": "unlimited",
"text": "Unlimited",
},
]
}
selectedKey="custom"
styles={
Object {
"flexContainer": Array [
Object { Object {
"selectors": Object { "key": "custom",
".ms-ChoiceField": Object { "text": "Custom",
"marginTop": 0, },
}, Object {
".ms-ChoiceField-wrapper label": Object { "key": "unlimited",
"fontSize": 12, "text": "Unlimited",
"paddingTop": 0, },
]
}
selectedKey="custom"
styles={
Object {
"flexContainer": Array [
Object {
"selectors": Object {
".ms-ChoiceField": Object {
"marginTop": 0,
},
".ms-ChoiceField-wrapper label": Object {
"fontSize": 12,
"paddingTop": 0,
},
".ms-ChoiceFieldGroup root-133": Object {
"clear": "both",
},
}, },
}, },
],
"root": Object {
"clear": "both",
}, },
], }
} }
} />
/> </fieldset>
</div> </div>
<div <div
className="tabs settingsSectionPart" className="tabs settingsSectionPart"

View File

@ -24,6 +24,7 @@ const {
Ascii, Ascii,
Bigint, Bigint,
Blob, Blob,
Date: DateType,
Decimal, Decimal,
Float, Float,
Int, Int,
@ -41,6 +42,7 @@ export const cassandraOptions = [
{ key: Bigint, text: Bigint }, { key: Bigint, text: Bigint },
{ key: Blob, text: Blob }, { key: Blob, text: Blob },
{ key: Boolean, text: Boolean }, { key: Boolean, text: Boolean },
{ key: DateType, text: DateType },
{ key: Decimal, text: Decimal }, { key: Decimal, text: Decimal },
{ key: Double, text: Double }, { key: Double, text: Double },
{ key: Float, text: Float }, { key: Float, text: Float },

View File

@ -14,6 +14,7 @@ export const CassandraType = {
Bigint: "Bigint", Bigint: "Bigint",
Blob: "Blob", Blob: "Blob",
Boolean: "Boolean", Boolean: "Boolean",
Date: "Date",
Decimal: "Decimal", Decimal: "Decimal",
Double: "Double", Double: "Double",
Float: "Float", Float: "Float",

View File

@ -536,7 +536,8 @@ export class CassandraAPIDataClient extends TableDataClient {
dataType === TableConstants.CassandraType.Inet || dataType === TableConstants.CassandraType.Inet ||
dataType === TableConstants.CassandraType.Ascii || dataType === TableConstants.CassandraType.Ascii ||
dataType === TableConstants.CassandraType.Varchar || dataType === TableConstants.CassandraType.Varchar ||
dataType === TableConstants.CassandraType.Timestamp dataType === TableConstants.CassandraType.Timestamp ||
dataType === TableConstants.CassandraType.Date
); );
} }