Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Facet Type NameSffTqlFacet
Language SupportThing Interaction Language (TIL) - TQL CRUD Queries requested via <Query> tag.
Transports

HttpServerExtensionArgs

WsServerExtensionArgs

Usage

 Facet Types are used using <NewFacetInstance> when creating a Package (Deployment) definition for your models.

Code Block
languagexmlruby
themeEmacs
titleSffTqlFacet Example
linenumberstrue
<!--# Typical TQL Facet Definition
-->
	<NewFacetInstance fid=NewFacetInstance(fid: "samplequeries", 		Name=: "TQL", Type=: "SffTqlFacet">):
		<OnActivate>    OnActivate:
        <!--# Associate other facet types; Either Private or Public Instances -->
			<NewFacetInstance name=
        NewFacetInstance(name: "tqlwfws", type=: "SffWdlFacet") /> <!-- # Private Instance of wdl facet -->
			<NetworkFacet>?cluster</NetworkFacet> <!--
        NetworkFacet: "?cluster"  # Public Instance of Network Facet
-->
			<TopicFacet>?TQLGenericTopic</TopicFacet> <!--        TopicFacet: "?TQLGenericTopic"  # Public Instance of Topic Facet -->
			<ImportFacet>
        ImportFacet: 
            [:RuntimeParams.MacroFacetID:]</ImportFacet> <!--  # Private Instance of Msg facet -->
			<Process>
        Process: 
            <!--# Define TQL Storage Scheme
-->
				<Storage Name=            Storage(Name: "[:RuntimeParams.TQLCacheName:]", Type=: "SqlSff", 					Comment=Comment: "[:RuntimeParams.TQLCacheName:] Database SFF Unstructured SQL database")
/>                 <!-- # Specify the Model Definition file (TDL). Normally consists of Model definitions -->
				<Namespace>
					<Include>cloud.dbm.xml</Include>
				</Namespace>
			</Process>
		</OnActivate>
		<OnOpen ModifyPipeline="WsServerExtensionArgs" />
		<OnRequest>
			<DoRequest> <!-- HandOff
            Namespace: 
                Include: cloud.dbm.xml
    OnOpen(ModifyPipeline: "WsServerExtensionArgs")
    OnRequest:    
        #HandOff the request to Facet -->
				<Process Return="CMD_NOP">
					<Message>
						<Value>
							<Include>$Request.Message.Value</Include>
						</Value>
					</Message>
				</Process>
			</DoRequest>
			<DoResponse> <!--
        DoRequest: 
            Process Return: "CMD_NOP"):
                Message: 
                    Value: 
                        Include: $Request.Message.Value
        DoResponse:  # Process the response from Facet or send it straight through -->
				<Process>
					<Message type=
            Process: 
                Message(type: "[:RuntimeParams.TQLOutputFormat:]">
						<Value>
							<Include>$Response.Message.Value</Include>
						</Value>
					</Message>
				</Process>
			</DoResponse>
		</OnRequest>
</NewFacetInstance>):
                    Value: 
                        Include: $Response.Message.Value


Endpoint Generated

ws://<HostName>:<PortNumber>/fid-samplequeries

Where PortNumber is the port on which A-Stack is started and <HostName> is the engine machine IP address

...