Skip to content

Commit 1d366f7

Browse files
committed
fix Power BI xml response changing
Signed-off-by: dbulahov <[email protected]>
1 parent 44adf73 commit 1d366f7

File tree

14 files changed

+238
-2
lines changed

14 files changed

+238
-2
lines changed

api/src/main/java/org/eclipse/daanse/xmla/api/PropertyDefinition.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,15 @@ public enum PropertyDefinition {
186186
// Microsoft-specific XMLA definition.
187187
DbpropMsmdSubqueries(RowsetDefinitionType.INTEGER, null, XmlaConstants.Access.ReadWrite, "1",
188188
XmlaConstants.Method.DISCOVER_AND_EXECUTE,
189-
"An enumeration value that determines the behavior of subqueries.");
189+
"An enumeration value that determines the behavior of subqueries."),
190+
191+
DbpropMsmdActivityID(RowsetDefinitionType.STRING, null, XmlaConstants.Access.ReadWrite, null,
192+
XmlaConstants.Method.DISCOVER_AND_EXECUTE,
193+
"DbpropMsmdActivityID"),
194+
195+
DBMSVersion(RowsetDefinitionType.STRING, null, XmlaConstants.Access.Read, "11.0.7001.0",
196+
XmlaConstants.Method.DISCOVER_AND_EXECUTE,
197+
"DBMSVersion");
190198

191199
final RowsetDefinitionType type;
192200
final Set<? extends Enum> enumSet;

api/src/main/java/org/eclipse/daanse/xmla/api/common/enums/ItemTypeEnum.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ public enum ItemTypeEnum {
2525

2626
STRING("xsd:string"),
2727

28-
DATETIME("xsd:dateTime");
28+
DATETIME("xsd:dateTime"),
29+
30+
UNSIGNEDSHOT("xsd:unsignedShort"),
31+
32+
UNSIGNEDINT("xsd:xsd:unsignedInt"),
33+
34+
BOOLEAN("xsd:boolean");
2935

3036
private final String value;
3137

api/src/main/java/org/eclipse/daanse/xmla/api/common/properties/OperationNames.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class OperationNames {
2727
public static final String DBSCHEMA_CATALOGS = "DBSCHEMA_CATALOGS";
2828
public static final String DISCOVER_DATASOURCES = "DISCOVER_DATASOURCES";
2929
public static final String DISCOVER_XML_METADATA = "DISCOVER_XML_METADATA";
30+
public static final String DISCOVER_CSDL_METADATA = "DISCOVER_CSDL_METADATA";
3031
public static final String DBSCHEMA_COLUMNS = "DBSCHEMA_COLUMNS";
3132
public static final String DBSCHEMA_PROVIDER_TYPES = "DBSCHEMA_PROVIDER_TYPES";
3233
public static final String DBSCHEMA_SCHEMATA = "DBSCHEMA_SCHEMATA";
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
* Stefan Bischof (bipolis.org) - initial
13+
*/
14+
package org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata;
15+
16+
import org.eclipse.daanse.xmla.api.annotation.Operation;
17+
import org.eclipse.daanse.xmla.api.discover.Properties;
18+
19+
import static org.eclipse.daanse.xmla.api.common.properties.OperationNames.DISCOVER_CSDL_METADATA;
20+
21+
@Operation(name = DISCOVER_CSDL_METADATA, guid = "87B86062-21C3-460F-B4F8-5BE98394F13B")
22+
public interface DiscoverCsdlMetaDataRequest {
23+
24+
Properties properties();
25+
26+
DiscoverCsdlMetaDataRestrictions restrictions();
27+
28+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
* Stefan Bischof (bipolis.org) - initial
13+
*/
14+
package org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata;
15+
16+
/**
17+
* This schema rowset returns a rowset with one row and one column. The single cell in the rowset
18+
* contains an XML document that contains the requested XML metadata.
19+
*/
20+
public interface DiscoverCsdlMetaDataResponseRow {
21+
22+
/**
23+
* @return An XML document that describes the object requested by the restriction.
24+
*/
25+
String metaData();
26+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
* Stefan Bischof (bipolis.org) - initial
13+
*/
14+
package org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata;
15+
16+
import static org.eclipse.daanse.xmla.api.common.properties.XsdType.XSD_STRING;
17+
18+
import java.util.Optional;
19+
20+
import org.eclipse.daanse.xmla.api.annotation.Restriction;
21+
22+
public interface DiscoverCsdlMetaDataRestrictions {
23+
24+
@Restriction(name = "CATALOG_NAME", type = XSD_STRING, order = 0)
25+
Optional<String> catalogName();
26+
27+
@Restriction(name = "PERSPECTIVE_NAME", type = XSD_STRING, order = 1)
28+
Optional<String> perspectiveName();
29+
30+
@Restriction(name = "VERSION", type = XSD_STRING)
31+
Optional<String> version();
32+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
* Stefan Bischof (bipolis.org) - initial
13+
*/
14+
15+
@org.osgi.annotation.bundle.Export
16+
@org.osgi.annotation.versioning.Version("0.0.1")
17+
package org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
* Stefan Bischof (bipolis.org) - initial
13+
*/
14+
package org.eclipse.daanse.xmla.model.record.discover.discover.csdlmetadata;
15+
16+
import org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata.DiscoverCsdlMetaDataRequest;
17+
import org.eclipse.daanse.xmla.model.record.discover.PropertiesR;
18+
19+
public record DiscoverCsdlMetaDataRequestR(PropertiesR properties, DiscoverCsdlMetaDataRestrictionsR restrictions)
20+
implements DiscoverCsdlMetaDataRequest {
21+
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
* Stefan Bischof (bipolis.org) - initial
13+
*/
14+
package org.eclipse.daanse.xmla.model.record.discover.discover.csdlmetadata;
15+
16+
import org.eclipse.daanse.xmla.api.discover.discover.xmlmetadata.DiscoverXmlMetaDataResponseRow;
17+
18+
public record DiscoverCsdlMetaDataResponseRowR(String metaData) implements DiscoverXmlMetaDataResponseRow {
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
* Stefan Bischof (bipolis.org) - initial
13+
*/
14+
package org.eclipse.daanse.xmla.model.record.discover.discover.csdlmetadata;
15+
16+
import java.util.Optional;
17+
18+
import org.eclipse.daanse.xmla.api.discover.discover.csdlmetadata.DiscoverCsdlMetaDataRestrictions;
19+
20+
public record DiscoverCsdlMetaDataRestrictionsR(Optional<String> catalogName, Optional<String> perspectiveName, Optional<String> version ) implements DiscoverCsdlMetaDataRestrictions {
21+
22+
}

0 commit comments

Comments
 (0)