@finos/legend-application-studio
Version:
Legend Studio application core
45 lines • 8.48 kB
TypeScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export declare const BLANK_CLASS_SNIPPET = "Class ${1:model::NewClass}\n// example of a constraint\n// [\n// SomeConstraint: true\n// ]\n{\n ${2:// example of a standard property\n // prop1: String[1];\n\n // example of a derived property\n // derivation1() {''\\}: String[1];}\n}";
export declare const CLASS_WITH_PROPERTY_SNIPPET = "Class ${1:model::NewClass}\n{\n ${2:prop1}: ${3:String[1]};\n}";
export declare const CLASS_WITH_INHERITANCE_SNIPPET = "Class ${1:model::NewClass} extends ${2:model::ParentClass}\n{\n ${3:// class content}\n}";
export declare const CLASS_WITH_CONSTRAINT_SNIPPET = "Class ${1:model::NewClass}\n[\n ${3:SomeConstraint: true}\n]\n{\n ${2:// class content}\n}";
export declare const SIMPLE_PROFILE_SNIPPET = "Profile ${1:model::NewProfile}\n{\n stereotypes: [${2:}];\n tags: [${3:}];\n}";
export declare const SIMPLE_ENUMERATION_SNIPPET = "Enum ${1:model::NewEnumeration}\n{\n ${2:VALUE_1,\n VALUE_2}\n}";
export declare const SIMPLE_ASSOCIATION_SNIPPET = "Association ${1:model::NewAssociation}\n{\n ${2:prop1}: ${3:model::Type1[1]};\n ${4:prop2}: ${5:model::Type2[1]};\n}";
export declare const BLANK_FUNCTION_SNIPPET = "function ${1:model::NewEnumeration}(${2:param1: String[1]}): ${3:String[1]}\n{\n ${4:''; // function content}\n}";
export declare const SIMPLE_FUNCTION_SNIPPET = "function ${1:model::NewEnumeration}(): String[1]\n{\n ''\n}";
export declare const SIMPLE_MEASURE_SNIPPET = "Measure ${1:model::NewEnumeration}\n{\n // canonical unit: the unit that other units will be based off for conversion\n *${1:Unit_1}: ${2:x -> $x};\n // example of other units and their conversation functions\n // Unit_2: x -> $x * 100;\n // Unit_3: x -> $x * 1000;\n}";
export declare const SIMPLE_RUNTIME_SNIPPET = "Runtime ${1:model::NewRuntime}\n{\n mappings:\n [\n ${2:model::SomeMapping}\n ];\n connections:\n [\n // example of a stored connection which covers the mapping\n // ModelStore:\n // [\n //\n // example of using connection pointer\n // id1: test::connection2,\n //\n // example of using embedded connection\n // #{\n // JsonModelConnection\n // {\n // class: model::SomeClass;\n // url: 'someUrl';\n // }\n // }#\n // ]\n ];\n}";
export declare const JSON_MODEL_CONNECTION_SNIPPET = "JsonModelConnection ${1:model::NewConnection}\n{\n class: ${2:model::SomeClass};\n // data URL\n url: '${3:data:application/json,{\\}}';\n}";
export declare const XML_MODEL_CONNECTION_SNIPPET = "XmlModelConnection ${1:model::NewConnection}\n{\n class: ${2:model::SomeClass};\n // data URL\n url: '${3:data:application/json,{\\}}';\n}";
export declare const MODEL_CHAIN_CONNECTION_SNIPPET = "ModelChainConnection ${1:model::NewConnection}\n{\n mappings: [\n ${2:model::SomeMapping}\n ];\n}";
export declare const RELATIONAL_DATABASE_CONNECTION_SNIPPET = "RelationalDatabaseConnection ${1:model::NewConnection}\n{\n store: ${2:model::SomeStore};\n // example of a simple H2 connection\n type: ${3:H2};\n specification: ${4:LocalH2 {\\}};\n auth: ${5:DefaultH2 {\\}};\n}";
export declare const POST_PROCESSOR_RELATIONAL_DATABASE_CONNECTION_SNIPPET = "RelationalDatabaseConnection ${1:model::NewConnection}\n{\n store: ${2:model::SomeStore};\n // example of a simple H2 connection with a mapper post processor\n type: ${3:H2};\n specification: ${4:LocalH2 {\\}};\n auth: ${5:DefaultH2 {\\}};\n // example of mapper post processor\n postProcessors:\n [\n mapper\n {\n mappers:\n [\n ];\n }\n ];\n}";
export declare const createConnectionSnippetWithPostProcessorSuggestionSnippet: (snippetText: string) => string;
export declare const BLANK_MAPPING_SNIPPET = "Mapping ${1:model::NewMapping}\n(\n ${2:// mapping content}\n)";
export declare const MAPPING_WITH_M2M_CLASS_MAPPING_SNIPPET = "Mapping ${1:model::NewMapping}\n(\n ${2:model::TargetClass}: Pure\n {\n ~src ${3:model::SourceClass}\n // example of property mappings\n // prop1: $src.prop1\n }\n)";
export declare const MAPPING_WITH_RELATIONAL_CLASS_MAPPING_SNIPPET = "Mapping ${1:model::NewMapping}\n(\n ${2:model::TargetClass}: Relational {\n ~mainTable ${3:[model::SomeDatabase]SomeTable}\n // example of property mappings\n // prop1: [model::SomeDatabase]SomeTable.col1,\n }\n)";
export declare const MAPPING_WITH_ENUMERATION_MAPPING_SNIPPET = "Mapping ${1:model::NewMapping}\n(\n ${2:model::TargetEnumeration}: EnumerationMapping ${3:EnumerationMappingID}\n {\n // example of enum-value mapping\n // VAL_1: ['val1'],\n // VAL_2: ['val2', 'val_2']\n }\n)";
export declare const BLANK_SERVICE_SNIPPET = "Service ${1:new::NewService}\n{\n pattern: '/${2:myPattern/}';\n owners: [${3:'owner1', 'owner2'}]; // at least 2 owners required\n documentation: ${4:'documentation'};\n autoActivateUpdates: ${5:true};\n execution: ${6:}\n testSuites:\n [\n ]\n}";
export declare const SERVICE_WITH_SINGLE_EXECUTION_SNIPPET = "Service ${1:new::NewService}\n{\n pattern: '/${2:myPattern/}';\n owners: [${3:'owner1', 'owner2'}]; // at least 2 owners required\n documentation: ${4:'documentation'};\n autoActivateUpdates: ${5:true};\n\n // example of using a single execution context\n execution: Single\n {\n query: ${6:|''};\n mapping: ${7:model::SomeMapping};\n\n // example of using embedded runtime\n // runtime:\n // #{\n // connections: [];\n // }#;\n\n // example of using runtime pointer\n // runtime: model::SomeRuntime;\n }\n testSuites:\n [\n ]\n}";
export declare const SERVICE_WITH_MULTI_EXECUTION_SNIPPET = "Service ${1:new::NewService}\n{\n pattern: '/${2:myPattern/}';\n owners: [${3:'owner1', 'owner2'}]; // at least 2 owners required\n documentation: ${4:'documentation'};\n autoActivateUpdates: ${5:true};\n\n // example of using multiple execution contexts\n execution: Multi\n {\n query: ${6:|''};\n key: '${7:keyName}';\n executions['key_1']:\n {\n mapping: ${8:model::SomeMapping};\n\n // example of using embedded runtime\n // runtime:\n // #{\n // connections: [];\n // }#;\n\n // example of using runtime pointer\n // runtime: model::SomeRuntime;\n }\n // executions['key_2']:\n // {\n // mapping: model::SomeMapping;\n // runtime: model::SomeRuntime;\n // }\n }\n testSuites:\n [\n ]\n}";
export declare const SIMPLE_GENERATION_SPECIFICATION_SNIPPET = "GenerationSpecification ${1:model::NewGenerationSpecification}\n{\n // exmple of file generation nodes (which will be generated last)\n // fileGenerations: [_meta::myAvroMisSpelled];\n\n // example of model generation nodes (tree form) to order the generations\n // generationNodes: [\n // {\n // generationElement: model::MissingElement;\n // }\n // ];\n\n ${2:// generation specification content}\n}";
export declare const BLANK_RELATIONAL_DATABASE_SNIPPET = "Database ${1:model::NewDatabase}\n(\n // example database schema\n // Schema SOME_SCHEMA\n // (\n // Table TABLE_1\n // (\n // COL_1 VARCHAR(200)\n // )\n // Table TABLE_2\n // (\n // COL_2 VARCHAR(200) PRIMARY_KEY\n // )\n // )\n\n // example database join\n // Join SomeJoin(SOME_SCHEMA.TABLE_1.COL_1 = SCHEMA1.TABLE_2.COL_2)\n\n ${2:// database content}\n)";
export declare const DATA_WITH_EXTERNAL_FORMAT_SNIPPET = "Data ${1:model::NewData}\n{\n ExternalFormat\n #{\n contentType: '${2:application/x.flatdata}';\n data: '${3:data}';\n }#\n}";
export declare const DATA_WITH_MODEL_STORE_SNIPPET = "Data ${1:model::NewData}\n{\n ModelStore\n #{\n ${2:model::SomeClass:}\n [\n ]\n }#\n}";
export declare const createDataElementSnippetWithEmbeddedDataSuggestionSnippet: (snippetText: string) => string;
//# sourceMappingURL=LegendStudioCodeSnippet.d.ts.map