<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="pretty-atom-feed.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<title>Seb Duggan</title>
	<subtitle>Personal website of Seb Duggan, a web developer in the UK. Writes about code, dogs, records, family history, and more.</subtitle>
	<link href="https://sebduggan.uk/rss/rss/feed.xml" rel="self" />
	<link href="https://sebduggan.uk/" />
	<updated>2025-05-27T05:30:00Z</updated>
	<id>https://sebduggan.uk/</id>
	<author>
		<name>Seb Duggan</name>
	</author>
	<entry>
		<title>Edwin</title>
		<link href="https://sebduggan.uk/posts/2025/edwin/" />
		<updated>2025-05-27T05:30:00Z</updated>
		<id>https://sebduggan.uk/posts/2025/edwin/</id>
		<content type="html">&lt;figure&gt;
	&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/xkH8hqoU8p-600.avif 600w, https://sebduggan.uk/img/xkH8hqoU8p-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/xkH8hqoU8p-600.webp 600w, https://sebduggan.uk/img/xkH8hqoU8p-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/xkH8hqoU8p-600.jpeg&quot; alt=&quot;Vintage photograph of a young man in a suit sitting on grass with two dogs, one shaggy terrier on his lap and a spaniel lying in front, against a painted countryside backdrop&quot; width=&quot;1000&quot; height=&quot;701&quot; srcset=&quot;https://sebduggan.uk/img/xkH8hqoU8p-600.jpeg 600w, https://sebduggan.uk/img/xkH8hqoU8p-1000.jpeg 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;/picture&gt;
	&lt;figcaption&gt;My great-uncle Edwin pictured as a young man with the family dogs&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Exactly 85 years ago, on 27th May 1940, while the eyes of the nation were turned to the events unfolding on the beaches at Dunkirk, six RAF aircraft set out from Shetland to patrol the Norwegian coast, but only five returned. The three-man crew of the missing aircraft included my great-uncle Edwin; he was just 19 years old.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Edwin Holbrow Alexander was born in 1920, the youngest of the five children (three girls, two boys) of Herbert George Alexander and his wife Annie Georgina. Herbert had enjoyed success for many years as a renowned grower and cultivator of orchids (one of the most famous hybrids is named &lt;em&gt;Cymbidium Alexanderi&lt;/em&gt; after him), and managed the collection at Westonbirt, near Tetbury, Gloucestershire. He sat alongside his employer, Sir George Holford, on the Royal Horticultural Society’s orchid committee; and on Sir George’s death in 1926 he bequeathed the entire orchid collection to Herbert.&lt;/p&gt;
&lt;figure&gt;
	&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/jSCLJWoa1v-600.avif 600w, https://sebduggan.uk/img/jSCLJWoa1v-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/jSCLJWoa1v-600.webp 600w, https://sebduggan.uk/img/jSCLJWoa1v-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/jSCLJWoa1v-600.jpeg&quot; alt=&quot;Sepia-toned studio portrait of three males from different generations, dressed in suits. A young boy stands between an older man with a moustache and a younger man, depicting a family group of father, son, and younger brother&quot; width=&quot;1000&quot; height=&quot;717&quot; srcset=&quot;https://sebduggan.uk/img/jSCLJWoa1v-600.jpeg 600w, https://sebduggan.uk/img/jSCLJWoa1v-1000.jpeg 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;/picture&gt;
	&lt;figcaption&gt;Edwin (centre) with older brother Stanley and father Herbert&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The future looked bright for the family in the 1930s. Edwin’s older brother Stanley (ten years his senior) was already involved in the family horticultural business, which was flourishing, and he was being lined up to take over the reins; but the outbreak of war in 1939 would change everything.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;With war on the horizon, Herbert’s sons both joined up. Stanley, who had already served four years from 1933 to 1937 in the Royal Gloucesterchire Hussars, re-enlisted to the Gloucestershire Regiment in May 1939. Edwin, still only 18, was granted a short service commission as Acting Pilot Officer (the lowest ranking commissioned officer) in the Royal Air Force on 29th April 1939.&lt;/p&gt;
&lt;figure&gt;
	&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/AOH58dkuvZ-528.avif 528w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/AOH58dkuvZ-528.webp 528w&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/AOH58dkuvZ-528.jpeg&quot; alt=&quot;Studio portrait of a young man in Royal Air Force uniform, standing with hands behind his back, wearing a side cap and displaying pilot wings on his chest&quot; width=&quot;528&quot; height=&quot;768&quot;&gt;&lt;/picture&gt;
	&lt;figcaption&gt;Edwin in the uniform of a Pilot Officer in the RAF&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;After the outbreak of war, Edwin was moved on 6th November 1939 to the RAF’s active list as a Pilot Officer, and was assigned to 254 Squadron. 254 had at the start of the war been re-formed as a coastal fighter unit, based at Stradishall in Suffolk, carrying out coastal patrols and convoy escorts along the east coast, later adding reconnaissance and fighter escort.&lt;/p&gt;
&lt;p&gt;The squadron was equipped with Bristol Blenheim IVF fighter-bombers which, although dating from the mid-1930s, had already been rendered mostly obsolete by advances in technology in the intervening years. Originally designed as bombers, they had been retro-fitted as three-seater fighters; but they were overly susceptible to enemy fire, both from ground and air, and would later be switched to service as night fighters, where they were less vulnerable to high-performance planes such as the Messerschmitt 109.&lt;/p&gt;
&lt;figure&gt;
	&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/O7K_41AzNt-600.avif 600w, https://sebduggan.uk/img/O7K_41AzNt-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/O7K_41AzNt-600.webp 600w, https://sebduggan.uk/img/O7K_41AzNt-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/O7K_41AzNt-600.jpeg&quot; alt=&quot;Black and white photograph of three Royal Air Force Bristol Blenheim fighter bombers in flight formation against a clear sky, with visible roundels and squadron codes on the fuselage&quot; width=&quot;1000&quot; height=&quot;514&quot; srcset=&quot;https://sebduggan.uk/img/O7K_41AzNt-600.jpeg 600w, https://sebduggan.uk/img/O7K_41AzNt-1000.jpeg 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;/picture&gt;
	&lt;figcaption&gt;Bristol Blenheim IVF fighter-bombers of 254 Squadron&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;On 16th May 1940, the squadron relocated to RAF Sumburgh in the Shetlands - today the island’s airport, but at the time little more than a grass strip. The following is taken from an account by Wing Commander H.C. Randall DFC, in his memoir &lt;em&gt;Moths to Mosquitos&lt;/em&gt;. Based on the date in his account, he would probably have known Edwin (although maybe only briefly).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On the 25th May 1940, I was posted to the most northern airfield at which I was ever to be based – Sumburgh in the Shetland Islands. As well as my most northern posting, it also marked a new low in standards of accommodation. No. 254 was the first Squadron to have been posted here, though there had already been a flight of Gladiators intended for the island’s own defence. The runways had only just been finished, though the same could not have been said about some of the buildings. In fact we were to sleep under canvas.&lt;/p&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;The mess was a large marquee, and the bar was constructed from empty wooden boxes, each of which had previously been used to transport two 4-gallon petrol canisters. These petrol canisters were the only source of fuel for our Blenheims and worse still, was the fact that the planes had to be completely refueled by hand! Initially the fuel had to be filtered through chamois leather to remove excess water. The boxes soon became the principal, and sometimes only, source of furnishing on the airfield. They were used in the tents as bedside cabinets, chairs and other useful things.&lt;/p&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;As an airfield Sumburgh was not ideal. At one end of the runway you had Sumburgh Head itself, and at the other you would approach over the village itself down a slope. The short runway had the sea at both ends. Although we were there in the summer and the sea was so close, no one swam as the water was far from warm. I have to admit to attempting a paddle once, but this was rapidly given up as a bad idea! There also seemed to be a perpetual wind at Sumburgh. You were always aware of the sound of empty petrol tins being blown round the airfield. Later when Nissan huts finally arrived, sheets of airborne corrugated iron replaced the petrol containers!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;
	&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/sukd9OBXTQ-600.avif 600w, https://sebduggan.uk/img/sukd9OBXTQ-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/sukd9OBXTQ-600.webp 600w, https://sebduggan.uk/img/sukd9OBXTQ-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/sukd9OBXTQ-600.jpeg&quot; alt=&quot;Black and white photograph of a military encampment with multiple canvas tents scattered across open, grassy terrain, likely RAF Sumburgh during wartime, with hills and water visible in the background&quot; width=&quot;1000&quot; height=&quot;585&quot; srcset=&quot;https://sebduggan.uk/img/sukd9OBXTQ-600.jpeg 600w, https://sebduggan.uk/img/sukd9OBXTQ-1000.jpeg 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;/picture&gt;
	&lt;figcaption&gt;Temporary canvas accommodation at RAF Sumburgh, Shetland&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;hr&gt;
&lt;p&gt;At 05:30 on 27th May 1940, six Bristol Blenheim IVF from 254 Squadron 18 Group were sent from Sumburgh RAF station in two sections of three to sweep the south-western coast of Norway, mainly in search of enemy airfields, but also to locate the auxiliary naval vessel Königsberg (although records seem to show that it had already been sunk the previous month).&lt;/p&gt;
&lt;p&gt;Blenheim R3624 (QY-M) was crewed by Edwin and two others: Sergeant Basil A.J. Henrick (also 19) and Sergeant Thomas P.N. Hammond (23). Near Stavanger on the Norwegian coast they were engaged by the enemy, and Edwin’s aircraft was shot down by the Messerschmitt Bf 109 of Lt. Deuschle of II./JG77 (although it was also claimed by Hptm. Lang). It is strange to think that, in a conflict where so many died, aerial combat was still so personal and one-to-one that it is possible to know the name of the pilot who shot Edwin’s plane down.&lt;/p&gt;
&lt;p&gt;Coastguards reported that an aircraft had crashed into the sea, and the Thurso lifeboat was launched - but no trace was ever found and the men were reported as missing. Edwin is commemorated, alongside so many others, at the RAF memorial at Runnymede.&lt;/p&gt;
&lt;figure&gt;
	&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/Fep3MtgP79-600.avif 600w, https://sebduggan.uk/img/Fep3MtgP79-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/Fep3MtgP79-600.webp 600w, https://sebduggan.uk/img/Fep3MtgP79-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/Fep3MtgP79-600.jpeg&quot; alt=&quot;Inscribed stone memorial panel from 1940 listing names of Royal Air Force Pilot Officers who died in service, including ALEXANDER E.H., located at the Air Forces Memorial in Runnymede&quot; width=&quot;1000&quot; height=&quot;546&quot; srcset=&quot;https://sebduggan.uk/img/Fep3MtgP79-600.jpeg 600w, https://sebduggan.uk/img/Fep3MtgP79-1000.jpeg 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;/picture&gt;
	&lt;figcaption&gt;Section of the RAF memorial wall at Runnymede displaying Edwin’s name&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;hr&gt;
&lt;p&gt;The loss of Edwin hit the family hard. The following is an excerpt from a letter, written just a couple of weeks later, from my grandmother Vanda (one of Edwin’s sisters) to her brother Stanley:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Didn’t you think the letter to Pa from Bertie’s squadron leader was grand. He was always just Bertie to everyone – none of this terrible side one sees on some officers! I think even the Germans will fall for him – I feel he must be a prisoner Stan don’t you. I mean anyone as grand as Bertie and so straightforward &amp;amp; honest just couldn’t be sent out of this world so quickly. All I hope is that if he is a prisoner they’ll treat him decently – I’ll &lt;u&gt;never&lt;/u&gt; &lt;u&gt;never&lt;/u&gt; give up hope that he’s not alive, ‘cos it seems quite impossible to me. Doesn’t it seem like that to you?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And she really never did give up that hope: she always believed that somehow one day he would just walk through the door.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;It was not, alas, the only wartime loss to be suffered by the family. On 24th September 1944, in the push across Europe after the D-Day landings, Edwin’s brother Stanley (now a Major in the Reconnaissance Corps) was leading a forward recce mission near the town of Mierlo in the Netherlands, when his jeep hit a landmine by the side of the road, and he was killed. He was 34, with two young sons - one aged two, the other only 2 months. He is buried at the war cemetery in Mierlo.&lt;/p&gt;
&lt;p&gt;Herbert George Alexander was devastated by the loss of his two sons, and with them the future of the orchid business into which he had invested so much of his life. In their memory he dedicated a pair of stained glass windows at Westonbirt church (now privately owned by Westonbirt School), bearing the insiginia of the Reconnaissance Corps and the Royal Air Force, and with the inscriptions:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Be thou faithful unto death and I will give thee a Crown of Life&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To the Glory of God and in loving and grateful memory of Major Stanley George Alexander Reconnaissance Corps killed in action Holland 1944 aged 34 and his brother Pilot Officer Edwin Holbrow Alexander RAF killed in action over Norway 1940 in his twentieth year. Erected by their father and family.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;
	&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/8UWuIM4jBX-690.avif 690w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/8UWuIM4jBX-690.webp 690w&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/8UWuIM4jBX-690.jpeg&quot; alt=&quot;Stained glass memorial window featuring two panels: one showing St George with a red cross shield and spear, and the other St Michael with blue wings and a sword. Below is a dedication to Major Stanley Alexander, killed in action in Holland in 1944, and his brother Pilot Officer Edwin Alexander, killed in action over Norway in 1940&quot; width=&quot;690&quot; height=&quot;1098&quot;&gt;&lt;/picture&gt;
	&lt;figcaption&gt;Stained glass windows at Westonbirt church&lt;/figcaption&gt;
&lt;/figure&gt;
</content>
	</entry>
	<entry>
		<title>Another year, another site redesign</title>
		<link href="https://sebduggan.uk/posts/2025/another-site-redesign/" />
		<updated>2025-03-18T14:38:00Z</updated>
		<id>https://sebduggan.uk/posts/2025/another-site-redesign/</id>
		<content type="html">&lt;p&gt;Well, this is embarassing. It is exactly two years, to the day, since I posted about the &lt;a href=&quot;https://posts/2023/relaunching-my-site-in-eleventy.md&quot;&gt;reworking of my site in Eleventy&lt;/a&gt;. Specifically, I noted my lack of posting, and vowed to do better.&lt;/p&gt;
&lt;p&gt;Jump forward to the present day, and that is still the last thing I posted on my site. And before that it was a gap of 6 years. Not exactly setting the internet alight…&lt;/p&gt;
&lt;figure&gt;
	&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/Rq8TQliebC-600.avif 600w, https://sebduggan.uk/img/Rq8TQliebC-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/Rq8TQliebC-600.webp 600w, https://sebduggan.uk/img/Rq8TQliebC-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/Rq8TQliebC-600.png&quot; alt=&quot;A screenshot of the old site, showing how dull and uninspired it was&quot; width=&quot;1000&quot; height=&quot;560&quot; srcset=&quot;https://sebduggan.uk/img/Rq8TQliebC-600.png 600w, https://sebduggan.uk/img/Rq8TQliebC-1000.png 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;/picture&gt;
	&lt;figcaption&gt;Let&#39;s face it, the old site was not pretty...&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;But now I have finally done the redesign I planned 2 years ago, and I must say I’m rather pleased with how it’s turned out. Here are some of the main features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;built using &lt;a href=&quot;https://www.11ty.dev/&quot;&gt;Eleventy 3.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;social sharing images generated automatically using the &lt;a href=&quot;https://github.com/KiwiKilian/eleventy-plugin-og-image&quot;&gt;OG Image plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;code examples rendered using &lt;a href=&quot;https://www.hoeser.dev/blog/2023-02-07-eleventy-shiki-simple/&quot;&gt;Shiki&lt;/a&gt; with added language definition for CFML&lt;/li&gt;
&lt;li&gt;light/dark mode theme switcher (I prefer the dark)&lt;/li&gt;
&lt;li&gt;article reading times&lt;/li&gt;
&lt;li&gt;self-hosted fonts for speed and privacy&lt;/li&gt;
&lt;li&gt;blazingly fast – 100s across the board in Lighthouse&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This time round I’ve reverted to using Nunjucks templates, rather than WebC. I found I was struggling too much to overcome hurdles, and didn’t need any further impediments!&lt;/p&gt;
&lt;p&gt;At this stage, I haven’t added a CMS. I’m wavering between &lt;a href=&quot;https://decapcms.org/&quot;&gt;Decap CMS&lt;/a&gt; which I used before, and &lt;a href=&quot;https://tina.io/&quot;&gt;Tina CMS&lt;/a&gt;, which seems to offer something similar. But htey can be added in later.&lt;/p&gt;
&lt;h2&gt;What about the old content?&lt;/h2&gt;
&lt;p&gt;One of the concerns I had was that most of the (admittedly small number of) old posts are now hopelessly outdated, and not relevant to what I now work with. I did consider just deleting them (I still may), but I think for now I’ll just slap a banner on them to make it clear that this is old content.&lt;/p&gt;
&lt;p&gt;Having said that, it would be nice not to have that reminder of my failure to blog – 17 posts over a period of 16 years.&lt;/p&gt;
&lt;h2&gt;What’s next?&lt;/h2&gt;
&lt;p&gt;I’ve recently got back into analogue audio (vinyl records and reel-to-reel tapes), so there will be some content related to that on here. I’m considering an API connection to pull in data from my &lt;a href=&quot;https://www.discogs.com/user/sebduggan/collection&quot;&gt;Discogs collection&lt;/a&gt; to display here on the site (I already have a &lt;a href=&quot;https://records.md&quot;&gt;records page&lt;/a&gt; ready and waiting…).&lt;/p&gt;
&lt;p&gt;I’ll be posting much more often about code, but also about other things that interest me; for instance, some family history stories turned up in my genealogy research. Most of all, though, I just want to get into the habit of writing stuff!&lt;/p&gt;
</content>
	</entry>
	<entry>
		<title>Relaunching my site in Eleventy</title>
		<link href="https://sebduggan.uk/posts/2023/relaunching-my-site-in-eleventy/" />
		<updated>2023-03-18T18:13:00Z</updated>
		<id>https://sebduggan.uk/posts/2023/relaunching-my-site-in-eleventy/</id>
		<content type="html">&lt;p&gt;When I last rebuilt my personal site, back in 2017, I was full of good intentions. It was built on Hugo, which was the SSG I chose at the time (a coin flip between Hugo and Jekyll). It had a basic theme, and could be published by simply committing to a Git repo. What could possibly go wrong?&lt;/p&gt;
&lt;p&gt;Jump forward 6 years, and the only content I posted was three related articles within the first month. And ever since, it has simply stagnated. It didn’t help that for some reason I found it difficult to get the environment set up on my new laptop…&lt;/p&gt;
&lt;p&gt;Now, in 2023, it seems that all the cool kids are using &lt;a href=&quot;https://www.11ty.dev/&quot;&gt;Eleventy&lt;/a&gt; - and I can see why. A combination of speed (it blows the other SSGs out of the water) and ease of use (being based on Node, it’s using stuff I‘ve already got set up and installed) makes it the obvious choice. On top of that, there’s an active and friendly community out there too.&lt;/p&gt;
&lt;p&gt;The release of Eleventy 2.0 seemed the perfect time to make the switch. This site is currently bare-bones, but if I waited until I had the site perfect I’d never get it launched (or write any new content for it).&lt;/p&gt;
&lt;p&gt;So, I’ll be developing the site out in the open, gradually implementing new features and designs. But this is what I have done so far:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;migrated my existing content (what little there is of it) into Eleventy&lt;/li&gt;
&lt;li&gt;based the site on the &lt;a href=&quot;https://www.11ty.dev/docs/starter/&quot;&gt;eleventy-base-blog starter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;converted much of the site to be based on &lt;a href=&quot;https://www.11ty.dev/docs/languages/webc/&quot;&gt;WebC&lt;/a&gt; components and layouts. This seems really cool!&lt;/li&gt;
&lt;li&gt;added a &lt;a href=&quot;https://www.robincussol.com/optimize-your-img-tags-with-eleventy-image-and-webc/&quot;&gt;WebC component to replace images&lt;/a&gt; with responsive alternate sizes and formats&lt;/li&gt;
&lt;li&gt;implemented &lt;a href=&quot;https://www.hoeser.dev/blog/2023-02-07-eleventy-shiki-simple/&quot;&gt;Shiki&lt;/a&gt; for rendering code examples, in place of the standard Eleventy syntax highlighter. Also added a custom language definition to handle CFML code blocks&lt;/li&gt;
&lt;li&gt;added Netlify CMS (which seems to have become &lt;a href=&quot;https://decapcms.org&quot;&gt;Decap CMS&lt;/a&gt; since I started on this project) to make it easier to draft and publish new content. I’m hoping this will be the magic bullet that will encourage me to post more regularly!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And, for the future, I plan to overhaul the theme to make it mine; make more use of WebC components (did I mention how cool these are?); and add webmentions to my posts.&lt;/p&gt;
&lt;p&gt;So, here’s to a new beginning - I hope I can keep to my good intentions…&lt;/p&gt;
</content>
	</entry>
	<entry>
		<title>Preside selectData(): related objects and joins</title>
		<link href="https://sebduggan.uk/posts/2017/preside-selectdata-related-objects-and-joins/" />
		<updated>2017-02-21T12:00:00Z</updated>
		<id>https://sebduggan.uk/posts/2017/preside-selectdata-related-objects-and-joins/</id>
		<content type="html">&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/ix6VkoWbdS-600.avif 600w, https://sebduggan.uk/img/ix6VkoWbdS-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/ix6VkoWbdS-600.webp 600w, https://sebduggan.uk/img/ix6VkoWbdS-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/ix6VkoWbdS-184.svg&quot; alt=&quot;Preside&quot; width=&quot;184&quot; height=&quot;68&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;In the first two parts of this series, I’ve looked at &lt;a href=&quot;https://sebduggan.uk/posts/preside-selectdata-the-basics/&quot;&gt;selecting&lt;/a&gt; and &lt;a href=&quot;https://sebduggan.uk/posts/preside-selectdata-filtering-data/&quot;&gt;filtering&lt;/a&gt; data from Preside objects using &lt;code&gt;selectData()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In this third and final instalment, we’ll be accessing the power of related objects. Simple, standalone data objects are all very well, but even a very basic application will define connections between objects. These will be in the form of &lt;strong&gt;many-to-many&lt;/strong&gt; and &lt;strong&gt;many-to-one&lt;/strong&gt; relationships (also &lt;strong&gt;one-to-many&lt;/strong&gt;, which is a many-to-one relationship looked at from the other direction).&lt;/p&gt;
&lt;p&gt;If we look at the &lt;code&gt;starwars_character.cfc&lt;/code&gt; object, we can see both types of relationship:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;component&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	// ... other basic properties defined ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	property&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;  relationship&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;many-to-one&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;  relatedTo&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_planet&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	property&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;films&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;      relationship&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;many-to-many&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; relatedTo&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;     relatedVia&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	property&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;species&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;    relationship&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;many-to-many&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; relatedTo&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_species&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;  relatedVia&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character_species&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	property&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starships&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;  relationship&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;many-to-many&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; relatedTo&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_starship&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; relatedVia&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_starship_pilot&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	property&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;vehicles&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;   relationship&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;many-to-many&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; relatedTo&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_vehicle&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;  relatedVia&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_vehicle_pilot&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can see from this that a character has a &lt;code&gt;homeworld&lt;/code&gt; property, by which it can be related to one single planet; but then can be related to multiple &lt;code&gt;films&lt;/code&gt;, &lt;code&gt;vehicles&lt;/code&gt;, etc.&lt;/p&gt;
&lt;h2&gt;Basic joins&lt;/h2&gt;
&lt;p&gt;The key to &lt;code&gt;selectData()&lt;/code&gt; joins is to use a dotted syntax in your column definition, very much like you would in SQL. Bear in mind though that you are using property names rather than table names, e.g. &lt;code&gt;property_name_of_related_object.property_on_related_object&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;		  &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld.name as homeworld_name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here we are selecting each character along with the name of their homeworld. Note that &lt;code&gt;homeworld.name&lt;/code&gt; is actually retrieving data from the &lt;code&gt;starwars_planet&lt;/code&gt; object – but the property name is &lt;code&gt;homeworld&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Behind the scenes, Preside is converting this to the following SQL (but you usually won’t need to worry about this):&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;    `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; as&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; homeworld_name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;      `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;pobj_starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;left join&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;pobj_starwars_planet&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; on&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Extended joins&lt;/h2&gt;
&lt;p&gt;This gives you data from an object that is directly related to your main object, but Preside allows you to traverse joins as deep as you like. For instance, you might want to get values from an object related to an object related to your main object. To do this, you simple separate the objects in your chain with a &lt;code&gt;$&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In this example, we are getting a list of characters, their homeworld, and the titles of films in which that homeworld has appeared:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;		  &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld.name as homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld$films.title as homeworld_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name, homeworld.name, homeworld$films.episode_id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;You will see that the &lt;strong&gt;many-to-many&lt;/strong&gt; relationships are stored in linking tables (whose names are defined here using the &lt;code&gt;relatedVia&lt;/code&gt; attribute, but you can leave Preside to set default names for these tables). When selecting data using &lt;code&gt;selectData()&lt;/code&gt; you can ignore these linking tables, as Preside does all the heavy lifting for you – it will create SQL joins between &lt;code&gt;starwars_character&lt;/code&gt; and &lt;code&gt;starwars_film_character&lt;/code&gt;, and then between &lt;code&gt;starwars_film_character&lt;/code&gt; and &lt;code&gt;starwars_film&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Or, one step further down the rabbit-hole, we can also add all the species that appeared in films in which that homeworld appeared:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;		  &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld.name as homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld$films.title as homeworld_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld$films$species.name as homeworld_film_species&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name, homeworld.name, homeworld$films.episode_id, homeworld$films$species.name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that we use the same syntax for relationships when defining &lt;code&gt;orderBy&lt;/code&gt; parameters (and also &lt;code&gt;groupBy&lt;/code&gt;, &lt;code&gt;filter&lt;/code&gt;, etc.).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Because we are returning a query with joins, there will be many rows of data for each character, containing all the combinations of homeworlds, films and species that match the request. You might want to use the &lt;code&gt;group&lt;/code&gt; attribute on your &lt;code&gt;cfloop&lt;/code&gt; or &lt;code&gt;cfoutput&lt;/code&gt; for the query in order to group the data meaningfully.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Join types&lt;/h2&gt;
&lt;p&gt;By default, most joins that Preside performs will be &lt;code&gt;left outer join&lt;/code&gt; (joins to required properties will, however, use an &lt;code&gt;inner join&lt;/code&gt;). So the following query will return &lt;em&gt;all&lt;/em&gt; characters and the starships they are associated with, or a blank/null value for the starship if they are not associated with any:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starships.name as starship&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, it may be that you only wish to return those characters who actually have starships assigned to them. In SQL this is done using an &lt;code&gt;inner join&lt;/code&gt;; you can instruct Preside to use inner joins for all joins in a query by using the &lt;code&gt;forceJoins&lt;/code&gt; argument:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starships.name as starship&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; forceJoins   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;inner&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Valid values for this are &lt;code&gt;left&lt;/code&gt; (the default) and &lt;code&gt;inner&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Extra joins and subqueries&lt;/h2&gt;
&lt;p&gt;Of course, sometimes the data you want to extract from the database will not be accessible via the object’s defined relationships. Maybe you need a subquery that does some calculation for you, or maybe you need to join a table to itself.&lt;/p&gt;
&lt;p&gt;This is achieved using the &lt;code&gt;extraJoins&lt;/code&gt; argument. This is an array of explicitly defined subqueries, along with all the information needed to join it to your main query:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld.name as homeworld_name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_count.character_count&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_count.character_count desc, name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_count.homeworld = starwars_character.homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; extraJoins   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		  subQuery&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;       =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;select count( id ) as character_count, homeworld from pobj_starwars_character group by homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;subQueryAlias&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;  =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_count&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;subQueryColumn&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;joinToTable&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;    =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;joinToColumn&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;   =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;           =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;inner&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  } ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This query will return a list of characters along with the total count of characters from the same homeworld. All 6 of the parameters for the &lt;code&gt;extraJoin&lt;/code&gt; are required:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;subQuery&lt;/code&gt; is the SQL of the subquery. Note that table names in here are the actual database table names, &lt;em&gt;not&lt;/em&gt; the name of the Preside object. &lt;code&gt;subQueryAlias&lt;/code&gt; gives the subquery a name, and &lt;code&gt;subQueryColumn&lt;/code&gt; is the column in this query that will be used to join to a column on the main query (defined by &lt;code&gt;joinToTable&lt;/code&gt; (Preside object name) and &lt;code&gt;joinToColumn&lt;/code&gt;). Finally, the &lt;code&gt;type&lt;/code&gt; parameter defines the type of join (&lt;code&gt;inner&lt;/code&gt; or &lt;code&gt;left&lt;/code&gt;) that will be used to join to the subquery.&lt;/p&gt;
&lt;p&gt;To clarify how all this fits together, here is the generated SQL from this request:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; as&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; homeworld_name, &lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;homeworld_count&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;character_count&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;   `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;pobj_starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;left join&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;pobj_starwars_planet&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	on&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;inner join&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	select&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; count( id ) &lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; character_count, homeworld&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	from&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; pobj_starwars_character&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	group by&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; homeworld&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_count&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	on&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_count&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; `&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; homeworld_count&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; starwars_character&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;homeworld&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;order by&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; homeworld_count&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;character_count&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; desc&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Remember from &lt;a href=&quot;https://sebduggan.uk/posts/preside-selectdata-the-basics/&quot;&gt;part one&lt;/a&gt; how you can use the &lt;code&gt;getSqlAndParamsOnly&lt;/code&gt; argument to return a query and its parameters? This can come in very handy when you’re building complex joins with subqueries…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one more (optional) parameter that an &lt;code&gt;extraJoin&lt;/code&gt; can take, and that is &lt;code&gt;additionalClauses&lt;/code&gt;. This is a SQL string which will be added to the &lt;code&gt;on&lt;/code&gt; clause which joins the subquery. The following (rather contrived) example will return a list of characters, their homeworld, and the number of characters from that homeworld who share the same hair colour.&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld.name as homeworld_name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;count( homeworld_subquery.hair_color ) as same_hair_color_count&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; groupBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character.id, homeworld_subquery.hair_color&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_subquery.homeworld = starwars_character.homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; extraJoins   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		  subQuery&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;          =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;select id, homeworld, hair_color from pobj_starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;subQueryAlias&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;     =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_subquery&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;subQueryColumn&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;    =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;joinToTable&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;       =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;joinToColumn&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;      =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;              =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;inner&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;additionalClauses&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;homeworld_subquery.hair_color = starwars_character.hair_color&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  } ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Both the &lt;code&gt;subQuery&lt;/code&gt; and &lt;code&gt;additionalClauses&lt;/code&gt; values may include dynamically defined filter parameters, using the same &lt;code&gt;:parameter_name&lt;/code&gt; syntax as elsewhere. These dynamic values would be defined in the &lt;code&gt;filterParams&lt;/code&gt; argument of the main query, and may be shared by the main query and its subqueries.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Aggregate functions&lt;/h2&gt;
&lt;p&gt;In the previous example, you’ll notice that we’ve used a &lt;code&gt;count()&lt;/code&gt; aggregate function in our &lt;code&gt;selectFields&lt;/code&gt;. This shows how easy it is to include aggregate data functions (this combines here with the &lt;code&gt;groupBy&lt;/code&gt; clause). Here are a few more examples of simple aggregation of data:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;longestVehicle&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_vehicle&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;max( length ) as max_length&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;vehiclesClasses&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_vehicle&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;vehicle_class&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;count( vehicle_class ) as vehicle_count&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; groupBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;vehicle_class&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;vehicle_count desc, vehicle_class&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There are of course occasions when a subquery using an &lt;code&gt;extraJoin&lt;/code&gt; will be the better solution, but most basic aggregation can be achieved just by including here – especially as of Preside 10.8.0, which adds to &lt;code&gt;selectData()&lt;/code&gt; the &lt;code&gt;having&lt;/code&gt; argument:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;vehiclesClasses&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_vehicle&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;vehicle_class&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;count( vehicle_class ) as vehicle_count&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; groupBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;vehicle_class&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; having       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;count( vehicle_class ) &gt;= 4&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;vehicle_count desc, vehicle_class&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will return a list of vehicle classes with counts of vehicles, for classes with 4 or more vehicles. &lt;code&gt;having&lt;/code&gt; functions exactly as it does in raw SQL, basically acting as a &lt;code&gt;where&lt;/code&gt; clause which acts on the aggregate function.&lt;/p&gt;
&lt;p&gt;Finally, you can use your DBMS’s proprietary aggregate functions, just like any other function. A particularly useful one is MySQL’s &lt;code&gt;group_concat()&lt;/code&gt;, which you can use to generate lists of grouped data directly in the database; it is handy for getting a list of IDs of related records in order to pre-populate object pickers, etc. Note that it is MySQL only: PostgreSQL has the similar &lt;code&gt;string_agg()&lt;/code&gt; function; but MS SQL Server doesn’t let you do this without some ugly fiddling about with &lt;code&gt;xml path&lt;/code&gt;. So if you’re looking to create a database-agnostic application, you’ll probably be better sticking with standard SQL and grouping the data in your CFML code.&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;group_concat( films.title separator &#39;, &#39; ) as films_appeared_in&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; groupBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I hope I’ve demonstrated in these posts the power of getting data from Preside’s object model. I’ve learned a lot from putting this together, especially about complex joins and the trickier filters.&lt;/p&gt;
&lt;p&gt;If you have any questions or suggestions, come and join us at the &lt;a href=&quot;https://community.preside.org/&quot;&gt;Preside Community forum&lt;/a&gt;, which is the best place to get any Preside questions answered…&lt;/p&gt;
</content>
	</entry>
	<entry>
		<title>Preside selectData(): filtering data</title>
		<link href="https://sebduggan.uk/posts/2017/preside-selectdata-filtering-data/" />
		<updated>2017-02-13T12:00:00Z</updated>
		<id>https://sebduggan.uk/posts/2017/preside-selectdata-filtering-data/</id>
		<content type="html">&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/ix6VkoWbdS-600.avif 600w, https://sebduggan.uk/img/ix6VkoWbdS-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/ix6VkoWbdS-600.webp 600w, https://sebduggan.uk/img/ix6VkoWbdS-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/ix6VkoWbdS-184.svg&quot; alt=&quot;Preside&quot; width=&quot;184&quot; height=&quot;68&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;If you’ve read &lt;a href=&quot;https://sebduggan.uk/posts/preside-selectdata-the-basics/&quot;&gt;part one of this series&lt;/a&gt;, you know how to retrieve data from Preside objects using &lt;code&gt;selectData()&lt;/code&gt;. But any web application will need you to refine the data down to a subset of the whole dataset, or just a simple record (think of a SQL &lt;code&gt;where&lt;/code&gt; clause).&lt;/p&gt;
&lt;h2&gt;Simple filtering&lt;/h2&gt;
&lt;p&gt;Every Preside data object has a unique id, and we can use this to retrieve a single record from the database:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;film&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; id         &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;9F049349-18C4-4ED6-848BC0A41F510821&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In practice, of course, the ID you pass in is most likely to be dynamic – maybe defined in the URL or form parameters in a request from another page.&lt;/p&gt;
&lt;p&gt;Selecting by &lt;code&gt;id&lt;/code&gt; (the record’s primary key) is a special case; if you want to filter the records on any other field or fields, you pass a struct of filters to the &lt;code&gt;filter&lt;/code&gt; argument:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;film&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		episode_id&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can filter by multiple column values at the same time - if you do this using a &lt;code&gt;filter&lt;/code&gt; struct, it will return records that match &lt;em&gt;all&lt;/em&gt; the filter values, equivalent to SQL’s &lt;code&gt;where ... and ...&lt;/code&gt;. In the next example, we’re asking for all characters who are female &lt;em&gt;and&lt;/em&gt; have brown hair:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter     &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		  gender&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;     =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;female&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;hair_color&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;brown&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This method of filtering also allows you to match a column against one of a set of values (a SQL &lt;code&gt;where ... in (...)&lt;/code&gt; clause). This is achieved by passing an array of values in the filter struct. So this next query would retrieve characters whose eyes are either brown, blue or black:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter     &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		eye_color&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;brown&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;blue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;black&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;More complex filters&lt;/h2&gt;
&lt;p&gt;All the examples so far have been filtering for an “equals” match. But what if you need to do a greater than or non-equality comparison, or a complex grouping of conditions?&lt;/p&gt;
&lt;p&gt;For this, you simply pass any valid SQL string to the &lt;code&gt;filter&lt;/code&gt; argument instead of a struct:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;theGoodFilms&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter     &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id &gt;= 4 and episode_id != 6&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, usually the values will be dynamic, according to the requiredments of the request. To pass parameterised values into the filter, pass a struct of values in via the &lt;code&gt;filterParams&lt;/code&gt; argument:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;film&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;title != :title&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filterParams &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		title&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;A New Hope&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;skywalkers&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name like :name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filterParams &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;%Skywalker&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In these cases, because the parameter name is the same as the field name (&lt;code&gt;title&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;), Preside is able to use the object definition to know what the SQL type is of the parameter (in both cases, it’s &lt;code&gt;varchar&lt;/code&gt;). However, often you will need to give the parameter a different name (for example, if we were executing the previous example with &lt;code&gt;filterParams&lt;/code&gt;). You will now need to define explicitly the type of the parameter by setting its value to be a struct containing &lt;code&gt;type&lt;/code&gt; (the SQL type of the field, as defined in your object, e.g. &lt;code&gt;int&lt;/code&gt; or &lt;code&gt;varchar&lt;/code&gt;) and &lt;code&gt;value&lt;/code&gt; (the actual value to be parameterised):&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;theGoodFilms&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id &gt;= :minEpisode and episode_id != :excludeEpisode&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filterParams &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		  minEpisode&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;     =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;excludeEpisode&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Using the &lt;code&gt;filterParams&lt;/code&gt; technique, you can still pass in arrays for SQL &lt;code&gt;in ( ... )&lt;/code&gt; queries:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;eye_color not in ( :eye_color )&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filterParams &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		eye_color&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;brown&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;blue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;black&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;eye_color not in ( :colours )&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filterParams &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		colours&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;brown&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;blue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;black&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ] }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;WARNING!&lt;/strong&gt; Never include variables directly in the &lt;code&gt;filter&lt;/code&gt; string. These will be inserted directly into the generated SQL statement, and will leave you wide open to &lt;a href=&quot;https://en.wikipedia.org/wiki/SQL_injection&quot;&gt;SQL injection attacks&lt;/a&gt;. &lt;strong&gt;Always&lt;/strong&gt; pass dynamic variables in via &lt;code&gt;filterParams&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Extra filters&lt;/h2&gt;
&lt;p&gt;There are occasions when you will have a basic set of filters for a scenario, but you may also want in addition to apply other filters (some of which might be generated by helper methods). You &lt;em&gt;could&lt;/em&gt; achieve this by appending all the filters to the main filter set, but the neater way is by using the &lt;code&gt;extraFilters&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;extraFilters&lt;/code&gt; is an array of filter conditions, each of which can be constructed using any of the variations discussed above. Each item in the array will be a struct with a &lt;code&gt;filter&lt;/code&gt; value and an optional &lt;code&gt;filterParams&lt;/code&gt; value.&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;characters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; filter       &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;gender&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;female&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; extraFilters &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		  {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			filter&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;hair_color&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;black&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;brown&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ] }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			  filter&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;eye_color != :excludeColour&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;			, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filterParams&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;				excludeColour&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;blue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;			  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;getMyExtraCustomFilter&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the above example we see a regular filter, plus &lt;code&gt;extraFilters&lt;/code&gt; containing a simple filter, a filter with explicitly defined parameters, and a filter returned from a separate method. All four of these filters will be combined into one SQL &lt;code&gt;where&lt;/code&gt; clause.&lt;/p&gt;
&lt;h2&gt;Saved filters&lt;/h2&gt;
&lt;p&gt;Preside allows you to pre-define filters to be used by your application in your &lt;code&gt;Config.cfc&lt;/code&gt; file. These are actually of more use in other scenarios, such as filtering the records shown in an &lt;code&gt;objectPicker&lt;/code&gt; form control, but they can also be used by &lt;code&gt;selectData()&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;// application/config/Config.cfc&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; void&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; configure&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	// other configuration options...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	settings&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;created_in_last_month&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filter&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;datemodified &gt;= date_add( now(), interval -1 month )&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; }&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	settings&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filters&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;modified_in_last_week&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filter&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;datemodified &gt;= date_add( now(), interval -3 day   )&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; }&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;savedFilters&lt;/code&gt; are then passed in as an array, and will be applied in addition to any other filters you have defined.&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;recentVehicles&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_vehicle&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; savedFilters &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;created_in_last_month&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;modified_in_last_week&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;When defining saved filters in &lt;code&gt;Config.cfc&lt;/code&gt;, they will generally not be dynamic; however, you can define a saved filter as a closure function which will return the filter configuration based on its internal logic. The closure will take two arguments, the first of which will be an empty struct of arguments, but the second will be the &lt;code&gt;ColdboxController&lt;/code&gt; object, which will allow you to access various useful bits of information from the application and request.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;We now know how to select and filter data from single Preside objects, and have seen how flexible and powerful the data filtering is.&lt;/p&gt;
&lt;p&gt;In the next part of this series I’ll be looking at joins, and how easy Preside makes it to access data from multiple, related objects.&lt;/p&gt;
</content>
	</entry>
	<entry>
		<title>Preside selectData(): the basics</title>
		<link href="https://sebduggan.uk/posts/2017/preside-selectdata-the-basics/" />
		<updated>2017-02-11T12:00:00Z</updated>
		<id>https://sebduggan.uk/posts/2017/preside-selectdata-the-basics/</id>
		<content type="html">&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://sebduggan.uk/img/ix6VkoWbdS-600.avif 600w, https://sebduggan.uk/img/ix6VkoWbdS-1000.avif 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://sebduggan.uk/img/ix6VkoWbdS-600.webp 600w, https://sebduggan.uk/img/ix6VkoWbdS-1000.webp 1000w&quot; sizes=&quot;auto&quot;&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://sebduggan.uk/img/ix6VkoWbdS-184.svg&quot; alt=&quot;Preside&quot; width=&quot;184&quot; height=&quot;68&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;A little background to start with: &lt;a href=&quot;https://www.preside.org&quot;&gt;Preside&lt;/a&gt; is an open-source web development platform, created at &lt;a href=&quot;http://www.pixl8.co.uk&quot;&gt;Pixl8 Interactive&lt;/a&gt;, which runs on the Lucee application server. While at first glance it may look like any other CMS (it was originally called Preside CMS), it does so much more, and can form the hub of some very complex integrations between other applications. The key to this is an incredibly flexible content storage model, and the ability to extend or override almost any aspect of the application to suit your own individual needs.&lt;/p&gt;
&lt;p&gt;I’ve only been using Preside for a few months, and started in my role as a Senior Developer at Pixl8 in December 2016. So I’m constantly learning new things about Preside, which puts me in an ideal position to write about it from the perspective of a newcomer. I expect to write plenty about Preside here in the future!&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;The foundation of Preside’s power is in its data layer implementation, which is based on &lt;strong&gt;Preside Data Objects&lt;/strong&gt;. I may write in the future about aspects of these, but the &lt;a href=&quot;https://docs.presidecms.com/devguides/presidedataobjects.html&quot;&gt;official guide&lt;/a&gt; covers their creation and configuration in a lot of detail. What I’m going to look at here (over the course of several posts) is retrieving data from Preside Objects, which is all done via the &lt;code&gt;selectData()&lt;/code&gt; method of the &lt;code&gt;PresideObjectService&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In order to demonstrate &lt;code&gt;selectData()&lt;/code&gt;, we’ll first need some data. A great source of sample data is the &lt;a href=&quot;https://bitbucket.org/jjannek/preside-ext-starwars&quot;&gt;Star Wars Preside Extension&lt;/a&gt;, which imports data from &lt;a href=&quot;http://swapi.co/&quot;&gt;The Star Wars API&lt;/a&gt; into Preside, and that’s what I’ll be using throughout these posts.&lt;/p&gt;
&lt;h2&gt;The simplest query&lt;/h2&gt;
&lt;p&gt;The following is as simple as it gets. The only required argument for &lt;code&gt;selectData()&lt;/code&gt; is &lt;code&gt;objectName&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;films&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	objectName &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will return every column of every record from the specified object. One thing to note is that – unlike ORMs and ORM-like approaches – &lt;code&gt;selectData()&lt;/code&gt; returns its data as a query resultset. This gives several benefits, not least of which is the ability to construct some very complex data requests to suit any requirement.&lt;/p&gt;
&lt;p&gt;For all these examples, I have injected the &lt;code&gt;PresideObjectService&lt;/code&gt; as a property:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; inject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can, if you want, use an “Auto Service Object”, which is the given object decorated with the service API CRUD methods. This can be done either within your method:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filmObject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getObject&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or via injection:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;filmObject&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; inject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;presidecms:object:starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your simplest query would then look like this:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;films&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; filmObject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Refining your query&lt;/h2&gt;
&lt;p&gt;That’s all very well, but it’s best usually only to retrieve the columns you require. This is done using the &lt;code&gt;selectFields&lt;/code&gt; argument, an array of the columns you want:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;films&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;director&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And &lt;code&gt;orderBy&lt;/code&gt; will let you sort your results:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;films&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;director&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;orderBy&lt;/code&gt; is a simple SQL &lt;code&gt;order by&lt;/code&gt; statement, so can be as complex as you like:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;vehicles&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_vehicle&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;model&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;vehicle_class&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;crew&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;passengers&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;crew desc, passengers desc, name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Aliases and SQL functions&lt;/h2&gt;
&lt;p&gt;If you wish, you can rename your columns using simple SQL aliases:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;films&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id as episode&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;director&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And you can insert SQL logic into your field definition:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;films&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;		  &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;concat( &#39;Episode &#39;, episode_id, &#39;: &#39;, title ) as full_title&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; While Preside’s default database is MySQL/MariaDB, there is also beta support for MSSQL and PostgreSQL. When you’re writing your own applications – where you know what database you will be using – you can use SQL syntax specific to that database. But if you plan on releasing, for example, a Preside extension, you should ensure either that you are using standard SQL syntax, or you provide logic that will provide alternate syntax depending on the DBMS in use.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Paging your results&lt;/h2&gt;
&lt;p&gt;You will often want to limit the number of rows returned, and if you’re creating a paged interface, you’ll also want to specify which row to start from. This is achieved using &lt;code&gt;maxRows&lt;/code&gt; and &lt;code&gt;startRow&lt;/code&gt; respectively:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pagedFilms&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;director&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; orderBy      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;episode_id&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; maxRows      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; startRow     &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; 4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;New in Preside 10.8.0&lt;/h2&gt;
&lt;p&gt;There are a few arguments for &lt;code&gt;selectData()&lt;/code&gt; which have been introduced in the forthcoming 10.8.0 release of Preside.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;distinct&lt;/code&gt; does exactly what you would expect: so the following query would return a distinct list of all the different hair colours of Star Wars characters, if that’s the sort of thing you’re interested in…&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;hairColours&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName   &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; selectFields &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;hair_color&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; distinct     &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If all you want from your query is to get a count of matching records, use &lt;code&gt;recordCountOnly&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filmCount&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName      &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_film&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; recordCountOnly &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Finally, there are occasions when you may want simply to return the SQL generated by the method, rather than actually executing it. This might be useful for unit tests, or – as we will discover in a later part of this series – when constructing complex joins.&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; presideObjectService&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;selectData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	  objectName          &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;starwars_character&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;	,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; getSqlAndParamsOnly &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will return a struct with two items: &lt;code&gt;sql&lt;/code&gt;, which contains the SQL statement, and &lt;code&gt;params&lt;/code&gt;, an array of all the SQL parameters for that query (more of this when we get to filters in a later post).&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;In this post we’ve looked at the basics of retrieving data in Preside with &lt;code&gt;selectData()&lt;/code&gt; with some very trivial examples.&lt;/p&gt;
&lt;p&gt;Real-world applications are, of course, more complicated, and in future parts I’ll be talking about &lt;strong&gt;&lt;a href=&quot;https://sebduggan.uk/posts/preside-selectdata-filtering-data/&quot;&gt;filtering records&lt;/a&gt;&lt;/strong&gt;, &lt;strong&gt;joins&lt;/strong&gt;, &lt;strong&gt;subqueries&lt;/strong&gt; and &lt;strong&gt;aggregate functions&lt;/strong&gt;.&lt;/p&gt;
</content>
	</entry>
	<entry>
		<title>Let’s Encrypt SSL with Apache reverse proxy</title>
		<link href="https://sebduggan.uk/posts/2017/lets-encrypt-and-apache-reverse-proxy/" />
		<updated>2017-02-07T12:00:00Z</updated>
		<id>https://sebduggan.uk/posts/2017/lets-encrypt-and-apache-reverse-proxy/</id>
		<content type="html">&lt;p&gt;After years of avoiding SSL like the plague, unless the website absolutely, positively demanded it – due to certificates being both expensive and a nightmare to install/renew – I’ve just discovered &lt;a href=&quot;https://letsencrypt.org/&quot;&gt;Let’s Encrypt&lt;/a&gt;, thanks to the one-click simplicity of adding SSL to this site via the &lt;a href=&quot;https://www.netlify.com&quot;&gt;Netlify&lt;/a&gt; dashboard…&lt;/p&gt;
&lt;p&gt;Within 20 minutes of first having the idea, I had all the (more than 20) sites on my CentOS webserver running over HTTPS – &lt;em&gt;at no cost&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I won’t go into the details of setting it all up here, as it’s all covered perfectly well over at &lt;a href=&quot;https://certbot.eff.org/&quot;&gt;Certbot&lt;/a&gt;. But I will share the one issue I did have (which added an extra 15 minutes to the setup process).&lt;/p&gt;
&lt;p&gt;My sites are powered by &lt;a href=&quot;http://lucee.org/&quot;&gt;Lucee&lt;/a&gt; running on Tomcat, served via a reverse proxy (mod_proxy) on an Apache web server. The problem was that the Lucee sites were unaware that they were being served over SSL, and so sites which were set up to redirect to HTTPS – if not already – were going into an endless redirect loop.&lt;/p&gt;
&lt;p&gt;The solution is simple. There is an HTTP header, &lt;code&gt;X-Forwarded-Proto&lt;/code&gt;, which is a de-facto standard for identifying the originating protocol of an HTTP request when routed through a reverse proxy. If you set it in your vhost definitions on SSL sites, most applications should know that they are being served over HTTPS.&lt;/p&gt;
&lt;p&gt;The easiest way (if you’ve used &lt;code&gt;certbot --apache&lt;/code&gt; to register and install your certificates) is to edit the file &lt;code&gt;/etc/letsencrypt/options-ssl-apache.conf&lt;/code&gt; (location may differ in different flavours of Linux). Simply add the following:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;# ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;# Intermediate configuration, tweak to your needs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;RequestHeader&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; set X-Forwarded-Proto &quot;https&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;# ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;…and restart Apache, and all traffic passing through the proxy will be identified as originating from an HTTPS request.&lt;/p&gt;
</content>
	</entry>
	<entry>
		<title>Working with FoxyCart data feeds in CFML</title>
		<link href="https://sebduggan.uk/posts/2016/working-with-foxycart-data-feeds-in-cfml/" />
		<updated>2016-05-03T12:00:00Z</updated>
		<id>https://sebduggan.uk/posts/2016/working-with-foxycart-data-feeds-in-cfml/</id>
		<content type="html">&lt;p&gt;On a couple of the sites I manage, I have employed &lt;a href=&quot;http://www.foxycart.com/&quot;&gt;FoxyCart&lt;/a&gt; to handle the shopping cart and e-commerce. It provides a simple integration into an existing site with very little fuss, and makes it easy to offload the business of running a webshop.&lt;/p&gt;
&lt;p&gt;One of the features offered is to post back an &lt;a href=&quot;https://wiki.foxycart.com/v/2.0/transaction_xml_datafeed&quot;&gt;XML data feed&lt;/a&gt; of each completed transaction, in real time, to your server. You may want this to maintain your own database of orders placed; in my case, it is used to handle MailChimp subscriptions if they ticked the appropriate box during checkout.&lt;/p&gt;
&lt;p&gt;However, the encoding/encrypting of the data feed is somewhat arcane, and has taken me a couple of days, on and off, to get up and running in CFML. In fact, due to time constraints, I initially had to spin up a &lt;a href=&quot;https://m.do.co/c/37a2233a2f63&quot;&gt;DigitalOcean&lt;/a&gt; droplet running PHP in order to handle the process until I could get it working in CFML. (There was a tried and tested PHP solution which I could get running in no time.)&lt;/p&gt;
&lt;p&gt;This guide is to help any other poor souls in the future who have to wrestle with this…&lt;/p&gt;
&lt;p&gt;The way it works is this: FoxyCart does an RC4 encryption of the XML feed using your own API key (they’ll generate one for you, or you can set it yourself), and it then URL-encodes the rseult and POSTs it to your server (you’ve previously told them what script on your server to fire it at).&lt;/p&gt;
&lt;p&gt;Easy, I thought. &lt;code&gt;urlDecode()&lt;/code&gt; and then &lt;code&gt;decrypt()&lt;/code&gt; using the RC4 algorithm.&lt;/p&gt;
&lt;p&gt;Nope.&lt;/p&gt;
&lt;p&gt;After much trial and error (mostly error), and hacking the PHP so I could compare exactly what the data was at each stage of the process, I finally solved it. There are two things you need to bear in mind:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When doing the &lt;code&gt;urlDecode()&lt;/code&gt;, you need to specify the encoding as &lt;strong&gt;ISO-8859-1&lt;/strong&gt; (Latin-1). If you use any other encoding, you’ll get a bunch of gibberish with loads of high-ASCII values.&lt;/li&gt;
&lt;li&gt;Do not use the CFML &lt;code&gt;decrypt()&lt;/code&gt; function - it doesn’t seem to work as expected. I found a number of RC4 libraries in various languages, each doing pretty much the same thing, and there was a &lt;a href=&quot;http://cfrc4.riaforge.org/&quot;&gt;CFML version written by Steve Hicks&lt;/a&gt;. It needed a slight modification, though, as Steve’s version was expecting the encrypted text to be in Hex format - which it isn’t.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Having done that, you should have a nice XML string which you can parse as normal and then do whatever you will with the data.&lt;/p&gt;
&lt;p&gt;These are the two files you’ll need to implement the data feed processing - &lt;code&gt;foxychimp.cfm&lt;/code&gt;, which is the file you should point at in the FoxyCart admin, and &lt;code&gt;RC4.cfc&lt;/code&gt;, which is my modified version of Steve Hicks’ original library.&lt;/p&gt;
&lt;div class=&quot;codetitle&quot;&gt;&lt;strong&gt;Filename &lt;/strong&gt;foxychimp.cfm&lt;/div&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; fcApiKey&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;Insert_your_FoxyCart_API_key_here&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;&amp;#x3C;!---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	Decode the URL-encoded response, using the ISO-8859-1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	(Latin-1) encoding&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; encryptedFeed&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; urlDecode(form[&lt;/span&gt;&lt;span style=&quot;color:#CC241D;--shiki-dark:#CC241D&quot;&gt;&quot;FoxyData&quot;],&lt;/span&gt;&lt;span style=&quot;color:#CC241D;--shiki-dark:#CC241D&quot;&gt; &quot;ISO-8859-1&quot;)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;&amp;#x3C;!---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	Initialise the RC4 component and call its decrypt method.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	Note the 3rd argument, specifying that the data we are&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	passing in is not in Hex format&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; RC4&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; createObject(&lt;/span&gt;&lt;span style=&quot;color:#CC241D;--shiki-dark:#CC241D&quot;&gt;&quot;component&quot;,&quot;RC4&quot;)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; feedDataXml&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; RC4.rc4decrypt(src&lt;/span&gt;&lt;span style=&quot;color:#CC241D;--shiki-dark:#CC241D&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;encryptedFeed,&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; key&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;fcApiKey,&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; inputHex&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;&amp;#x3C;!---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	Now you have an XML string which you can parse&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; feedData&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; xmlParse(feedDataXml)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;&amp;#x3C;!---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	...and do what you like with the feed data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; array&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;#feedData.foxyData.transactions.transaction#&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;transaction&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;		Do whatever you like with each transaction data in here&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;&amp;#x3C;!---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	FoxyCart expects a simple text response of &quot;foxy&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	to signify that everything has worked.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	You can put error handling in which can return any other string,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	which will then show up in your FoxyCart error logs.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfcontent&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; reset&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;foxy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;codetitle&quot;&gt;&lt;strong&gt;Filename &lt;/strong&gt;RC4.cfc&lt;/div&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;&amp;#x3C;!---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;ColdFusion RC4 Component&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;Written by Steve Hicks (steve@aquafusionmedia.com)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;http://www.aquafusionmedia.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;Version 1.0 - Released: April 24, 2012&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;Version 1.1 - Modified by Seb Duggan (seb@sebduggan.com)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;			  Added arguments to allow input and output not to be Hex values&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;			  Released: May 3, 2016&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfcomponent&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!--- Encrypt a String (src) using the Key (key) ---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;RC4encrypt&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; access&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; returntype&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;outputHex&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mtxt&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; strToChars(arguments.src)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mkey&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; strToChars(arguments.key)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; RC4calculate(mtxt,mkey)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfif&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; arguments.outputHex&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; charsToHex(result)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfelse&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; charsToStr(result)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfif&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!--- Decrypt a String (src) using the Key (key) ---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;RC4decrypt&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; access&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; returntype&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;inputHex&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfif&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; arguments.inputHex&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mtxt&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; hexToChars(arguments.src)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfelse&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mtxt&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; strToChars(arguments.src)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfif&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mkey&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; strToChars(arguments.key)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; RC4calculate(mtxt,mkey)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; charsToStr(result)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!--- Set Up the Component Ready for Encryption ---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;RC4initialize&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; access&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; returntype&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;any&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;pwd&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; arraynew(1)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mykey&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; arraynew(1)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; b&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; intLength&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; arraylen(arguments.pwd)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;255&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mykey[a&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; arguments.pwd[(a&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mod&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; intLength)&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox[a&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; a&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;255&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; b&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; b&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox[a&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mykey[a+1]&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; )&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mod&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 256&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; tempswap&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; sbox[a&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox[a&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; sbox[b&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox[b&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; tempswap&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!--- Calculate the Cipher ---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;RC4calculate&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; access&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; returntype&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;any&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;plaintext&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;psw&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; RC4initialize(arguments.psw)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; j&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; cipher&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; arraynew(1)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;#arraylen(plaintext)#&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; (i&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1)&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mod&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 256&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; j&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; (j&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox[i&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1])&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mod&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 256&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; temp&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; sbox[i&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox[i&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; sbox[j&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox[j&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; temp&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; k&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; sbox[((sbox[i&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; sbox[j&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1])&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; mod&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 256)&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1]&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; cipherby&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; BitXor(arguments.plaintext[a],k)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; arrayappend(cipher,cipherby)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; cipher&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!--- Convert an Array of Chars into a Hex String ---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;charsToHex&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; access&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; returntype&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;chars&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &#39;&#39;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;#arraylen(arguments.chars)#&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; fbn&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; formatBaseN(chars[i],16)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfif&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; len(fbn)&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; eq&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;				&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; fbn&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &#39;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;0#fbn#&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfif&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; &amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; fbn&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!--- Convert a Hex String into an Array of Characters ---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;hexToChars&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; access&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; returntype&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;hex&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; chars&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; arraynew(1)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;#len(arguments.hex)#&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; step&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; arrayappend(chars,inputBaseN(mid(arguments.hex,i,2),16))&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; chars&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!--- Convert an Array of Characters into a String ---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;charsToStr&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; access&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; returntype&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;chars&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &#39;&#39;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;#arraylen(arguments.chars)#&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; &amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; chr(chars[i])&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#928374;font-style:italic;--shiki-dark:#928374;--shiki-dark-font-style:italic&quot;&gt;	&amp;#x3C;!--- Convert a String into an Array of Characters ---&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;strToChars&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; access&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; output&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; returntype&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfargument&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;str&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;yes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; codes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; arraynew(1)&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;#len(arguments.str)#&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; index&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfset&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; codes[i]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt; asc(mid(arguments.str,i,1))&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfloop&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfreturn&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; codes&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cffunction&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#CC241D;font-weight:bold;--shiki-dark:#CC241D;--shiki-dark-font-weight:bold&quot;&gt;cfcomponent&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	<entry>
		<title>SES URLs in Mura FW/1 plugins</title>
		<link href="https://sebduggan.uk/posts/2016/ses-urls-in-mura-fw1-plugins/" />
		<updated>2016-03-21T12:00:00Z</updated>
		<id>https://sebduggan.uk/posts/2016/ses-urls-in-mura-fw1-plugins/</id>
		<content type="html">&lt;p&gt;The &lt;a href=&quot;https://github.com/stevewithington/MuraFW1&quot;&gt;FW/1 plugin architecture&lt;/a&gt; for Mura CMS is a very powerful way of embedding complex applications and business logic within your Mura-based website.&lt;/p&gt;
&lt;p&gt;However, this comes at the cost of your SES URLs. While Mura itself generates human- and search engine-friendly URLs, your embedded FW/1 app will only have this for the top level of any display object. As you drill down into the app, you will start getting URLs that look like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://example.com/statistics/?MyPluginaction=statistics:main.player&amp;amp;amp;playername=seb-duggan&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In this example, the FW/1 app is placed in Mura on the page &lt;code&gt;/statistics/&lt;/code&gt; as a plugin display object. In an ideal world (and how it would probably be if it were a standalone FW/1 site) your URL would be more like:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://example.com/statistics/player/seb-duggan/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So, how can we achieve this?&lt;/p&gt;
&lt;p&gt;One way would be by setting up a bunch of &lt;code&gt;.htaccess&lt;/code&gt; rules, and this would be a perfectly workable solution. But what happens when you decide to rename &lt;code&gt;statistics&lt;/code&gt; to &lt;code&gt;stats&lt;/code&gt;? Wouldn’t it be nice if the URLs were completely controlled by the plugin with no other dependencies, and if the plugin were smart enough to know how to route the URLs wherever it has been placed within the Mura site structure?&lt;/p&gt;
&lt;p&gt;After a whole lot of trial-and-error, and whole lot more refactoring, I believe I’ve come up with a pretty robust (and reasonably elegant) solution…&lt;/p&gt;
&lt;h2&gt;The starting point&lt;/h2&gt;
&lt;p&gt;All my examples are loosely based on a site I’ve just built for my local cricket club (&lt;a href=&quot;http://www.hambledoncricketclub.co.uk&quot;&gt;go and take a look&lt;/a&gt; if you like – and see if you can spot where the FW/1 app integrates!).&lt;/p&gt;
&lt;p&gt;The normal way to set up an FW/1 plugin would be something like this:&lt;/p&gt;
&lt;div class=&quot;codetitle&quot;&gt;&lt;strong&gt;Filename &lt;/strong&gt;config.xml.cfm&lt;/div&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;displayobjects&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; location&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;displayobject&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;		name&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;Statistics&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;		component&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;includes.displayObjects&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;		displaymethod&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;dspStatistics&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;		persist&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;displayobjects&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;codetitle&quot;&gt;&lt;strong&gt;Filename &lt;/strong&gt;displayObjects.cfc&lt;/div&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; any&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; dspStatistics&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	return&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; getApplication&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;doAction&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;statistics:main.default&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This sets up a display object called “Statistics” which can be included into your Mura page. When rendered, it runs the &lt;code&gt;dspStatistics()&lt;/code&gt; method, which in turn renders the FW/1 page &lt;code&gt;main.default&lt;/code&gt; in the &lt;code&gt;statistics&lt;/code&gt; subsystem.&lt;/p&gt;
&lt;p&gt;So far, so easy, and if you’ve created an FW/1 plugin before, it should all be very familiar.&lt;/p&gt;
&lt;h2&gt;Adding the SES&lt;/h2&gt;
&lt;p&gt;The key to the new system is adding some route definitions to your displayObject configuration file:&lt;/p&gt;
&lt;div class=&quot;codetitle&quot;&gt;&lt;strong&gt;Filename &lt;/strong&gt;config.xml.cfm&lt;/div&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;displayobjects&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; location&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;displayobject&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;		name&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;Statistics&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;		component&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;includes.displayObjects&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;		displaymethod&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;dspStatistics&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;		persist&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;route&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;batting&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			action&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;statistics:main.batting&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;route&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;batting/{&#39;[0-9]{4}&#39;}&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			action&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;statistics:main.batting&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;route&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;player&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			action&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;statistics:main.playerredirect&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;route&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;player/{member.filename}&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			action&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;statistics:main.player&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;route&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;player/{member.filename}/detail&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt;			action&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;statistics:main.playerdetail&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;displayobject&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;displayobjects&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This doesn’t affect the basic functionality of the definition, but it adds in more data that we can extract and use.&lt;/p&gt;
&lt;p&gt;You’ll see several types of route in the example above. The route’s pattern is what gets matched against that part of the URL that comes after the plugin integration point. For example, if you have your plugin object included in the page &lt;code&gt;/statistics/&lt;/code&gt;, the first route would match the URL &lt;code&gt;/statistics/batting/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Parts of the URL that can vary are contained in curly braces. If the content of the curly braces is itself wrapped in single or double quotes, as in the second route, then this is a regular expression. So the second route would match &lt;code&gt;/batting/2016/&lt;/code&gt; (the regex matches a pattern of 4 digits).&lt;/p&gt;
&lt;p&gt;If the pattern within the braces is not wrapped in quotes, then this is a value to validate against a bean. So, the fourth route would match against &lt;code&gt;/statistics/player/seb-duggan/&lt;/code&gt; - and would additionally validate that there is a member bean with a filename value of seb-duggan.&lt;/p&gt;
&lt;p&gt;Each route has a fully-qualified FW/1 action, the page which should be rendered if the route is matched.&lt;/p&gt;
&lt;p&gt;Writing it out like this, it seems quite complicated, but it’s really very simple!&lt;/p&gt;
&lt;h2&gt;The heavy lifting&lt;/h2&gt;
&lt;p&gt;There are a bunch of methods which need to be added to your plugin’s &lt;code&gt;eventHandler.cfc&lt;/code&gt; to make all this work. I choose to keep them all in a separate file and include them into the eventHandler, but that’s up to you…&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; getSesRoutes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; objectsLen&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; displayObject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {}&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; route&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {}&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; routes&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; []&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; pluginXML&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; variables&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pluginConfig&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getPluginManager&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getPluginXML&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pluginConfig&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getModuleId&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;());&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; ( structKeyExists&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pluginXML&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayobjects&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;displayobject&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) ) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		objectsLen&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; arrayLen&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pluginXML&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayobjects&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayobject&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;		if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;objectsLen&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;			for&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;&amp;#x3C;=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;objectsLen&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;				displayObject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; pluginXML&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayobjects&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayobject&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;				if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (structKeyExists&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayObject&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;route&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;					routes&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; []&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;					for&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; r&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; r&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;&amp;#x3C;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;arraylen&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayObject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;route&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; r&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;						route&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {}&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;						route&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; displayObject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;route&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;xmlAttributes&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;						route&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; displayObject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;route&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;xmlAttributes&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;						arrayAppend&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;routes&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;route&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;					}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;					result&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayObject&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;xmlAttributes&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displaymethod&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; routes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;				}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;			}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	return&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; result&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; getSesUrlMatches&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; event&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; qs&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; getQueryService&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; sql&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; dbtype&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; application&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;configBean&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getDBType&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; lengthFunction&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;dbtype&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;mssql&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		lengthFunction&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;datalength&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	} &lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (listfindnocase&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;mysql,oracle&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;dbtype&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		lengthFunction&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	} &lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;dbtype&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;postgresql&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		lengthFunction&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;char_length&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	} &lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;dbtype&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;nuodb&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		lengthFunction&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;character_length&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	sql&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tcontent.filename,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tplugindisplayobjects.displaymethod&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		FROM&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tplugindisplayobjects&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		INNER JOIN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tcontentobjects&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		ON&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tplugindisplayobjects.objectid = tcontentobjects.objectid&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		INNER JOIN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tcontent&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		ON&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tcontentobjects.contenthistid = tcontent.contenthistid&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		AND&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tcontent.active = 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		WHERE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tplugindisplayobjects.moduleid = :moduleid&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		AND&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tplugindisplayobjects.displaymethod IN (:displaymethods)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		AND&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			tcontent.siteid = :siteid&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		AND&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			left(:fullurl, #lengthfunction#(tcontent.filename)) = tcontent.filename&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;		ORDER BY&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;			#lengthfunction#(tcontent.filename) DESC&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	qs&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;addParam&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;moduleid&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pluginConfig&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getModuleId&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; cfsqltype&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;cf_sql_varchar&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	qs&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;addParam&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;siteid&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;siteid&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; cfsqltype&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;cf_sql_varchar&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	qs&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;addParam&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;displaymethods&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;structkeylist&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pluginConfig&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getApplication&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;sesRoutes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; list&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; cfsqltype&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;cf_sql_varchar&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	qs&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;addParam&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;fullurl&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;currentfilenameadjusted&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; cfsqltype&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;cf_sql_varchar&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	return&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; qs&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;execute&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;sql&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sql&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getResult&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; validateSesUrlParams&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; $&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; event&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; displayMethod&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; routes&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; variables&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pluginConfig&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getApplication&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;sesRoutes&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; sesUrlParams&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; []&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;not&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; structkeyexists&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;routes&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayMethod&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;		return&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	for&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; route&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; in&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; routes&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displayMethod&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;]) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;		var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; routeParts&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; listToArray&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;route&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;		if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (arrayLen&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;routeParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; arrayLen&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;			continue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;		var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; match&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;		for&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;&amp;#x3C;=&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;arrayLen&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;routeParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;			if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (reFind&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;^{[&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;&#39;&#39;].+[&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;&#39;&#39;]}$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;routeParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;])) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;				match&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; validateSesUrlPartRegex&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; routeParts&lt;/span&gt;&lt;span style=&quot;color:#504945;--shiki-dark:#D5C4A1&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#504945;--shiki-dark:#D5C4A1&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#504945;--shiki-dark:#D5C4A1&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#504945;--shiki-dark:#D5C4A1&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;				arrayAppend&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sesUrlParams&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;])&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;			} &lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (reFind&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;^{.+}$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;routeParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;])) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;				match&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; validateSesUrlPartBean&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; routeParts&lt;/span&gt;&lt;span style=&quot;color:#504945;--shiki-dark:#D5C4A1&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#504945;--shiki-dark:#D5C4A1&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#504945;--shiki-dark:#D5C4A1&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#504945;--shiki-dark:#D5C4A1&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;				arrayAppend&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sesUrlParams&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;])&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;			} &lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;routeParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;]) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;				match&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;				break&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;			}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;		if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;			continue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;setValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;sesUrlParams&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; sesUrlParams&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;		arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;setValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;sesAction&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; route&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;		return&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	return&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt; false&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; validateSesUrlPartRegex&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; $&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; pattern&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; urlPart&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; reReplace&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;^{[&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;&#39;&#39;](.+)[&lt;/span&gt;&lt;span style=&quot;color:#8F3F71;--shiki-dark:#D3869B&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;&#39;&#39;]}$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;&#92;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	return&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; refindNoCase&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; &amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; &amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;urlPart&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; validateSesUrlPartBean&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; $&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; pattern&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; urlPart&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;	arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; reReplace&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;^{(.+)}$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;&#92;1&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; entity&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; listFirst&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; column&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; listLast&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; checkBean&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getBean&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;entity&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;loadBy&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;#column#&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;urlPart&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	return&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; !&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;checkBean&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getIsNew&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first method, &lt;code&gt;getSesRoutes()&lt;/code&gt;, should be called from the eventHandler’s &lt;code&gt;onApplicationLoad()&lt;/code&gt; method:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;variables.pluginConfig.getApplication().setValue( &amp;quot;sesRoutes&amp;quot;, getSesRoutes() );&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This examines the displayObject config file and extracts all the routes for each displayObject, and we cache that in the plugin’s application scope.&lt;/p&gt;
&lt;p&gt;We then need to handle the SES URLs by setting up a 404 handler in the eventHandler. By default, Mura will not recognise the URLs we’re trying to catch, and so &lt;code&gt;onSite404()&lt;/code&gt; will be invoked:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; any&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; onSite404&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; $&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt; required&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; event&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; qMatches&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; getSesUrlMatches&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;qMatches&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;recordcount&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;		var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; listtoarray&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;replace&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;currentfilenameadjusted&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;qMatches&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filename&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;), &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;		if&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;validateSesUrlParams&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; event&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; qMatches&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;displaymethod&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; sesUrlParts&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			local&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;contentBean&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; application&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;contentManager&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getActiveContentByFilename&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;qMatches&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;filename&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; event&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;&#39;siteid&#39;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;			event&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;setValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;&#39;contentBean&#39;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; local&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;contentBean&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;	}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is where all the clever stuff happens. First, &lt;code&gt;getSesUrlMatches()&lt;/code&gt; looks to see if some part at the beginning of the URL matches any of the Mura pages that include one of the displayObjects with routes defined on them.&lt;/p&gt;
&lt;p&gt;If a match is found then we pass the remainder of the URL through and try to match it against the defined routes. We check each section of the URL in turn; if the URL part is a &lt;code&gt;{variable}&lt;/code&gt;, then it’s either matched as a regular expression, or the value is checked against the specified bean. Each variable value is appended to an array for use later by the controller methods.&lt;/p&gt;
&lt;p&gt;If a route is successfully matched, then the array of variables (&lt;code&gt;sesUrlParams&lt;/code&gt;) and the FW/1 action defined on the route (&lt;code&gt;sesAction&lt;/code&gt;) are added to the Mura event object for use later by the FW/1 app; and finally, we load in the content for the Mura page we identified earlier and add that to the event object too.&lt;/p&gt;
&lt;p&gt;If no match is found, then we simply fall through to the main Mura 404 page, so you don’t need to maintain a separate 404 page in your FW/1 app. And becasue of the way we validate the value of the bean value variable, we already know before going into the FW/1 app if the value passed is a valid one.&lt;/p&gt;
&lt;p&gt;The last thing that needs to be modified is the displayObjects method:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; any&lt;/span&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B57614;--shiki-dark:#FABD2F&quot;&gt; dspStatistics&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;	var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; action&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; $&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getEvent&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;sesAction&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;statistics:main.default&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9D0006;--shiki-dark:#FB4934&quot;&gt;	return&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; getApplication&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;doAction&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here, we are getting the controller action from the event object which will have been set if a route has matched; and if that doesn’t exist, we default to the original action we had at the start.&lt;/p&gt;
&lt;p&gt;Finally, you need to configure your FW/1 controller methods to accept the values we’ve extracted from the URLs. Simply add the following to any method that is expecting one or more variables from an SES URL:&lt;/p&gt;
&lt;pre class=&quot;shiki shiki-themes gruvbox-light-soft gruvbox-dark-soft&quot; style=&quot;background-color:#f2e5bc;--shiki-dark-bg:#32302f;color:#3c3836;--shiki-dark:#ebdbb2&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AF3A03;--shiki-dark:#FE8019&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; urlParams&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt; rc&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#076678;--shiki-dark:#83A598&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getEvent&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#427B58;--shiki-dark:#8EC07C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt;getValue&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79740E;--shiki-dark:#B8BB26&quot;&gt;sesUrlParams&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#3C3836;--shiki-dark:#EBDBB2&quot;&gt; [] &lt;/span&gt;&lt;span style=&quot;color:#7C6F64;--shiki-dark:#A89984&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;…and you have your array of each of the values matched in the URL. So, in my example, if I requested the page:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://example.com/statistics/player/seb-duggan/detail/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;…I would get the content rendered by the controller action &lt;code&gt;statistics:main.playerdetail&lt;/code&gt;, and urlParams would contain one value, &lt;code&gt;seb-duggan&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;To wrap up&lt;/h2&gt;
&lt;p&gt;It may seem complicated, but most of it is code that you can add and forget about. The configuration is contained within &lt;code&gt;config.xml.cfm&lt;/code&gt; and &lt;code&gt;displayObjects.cfc&lt;/code&gt;, just as it was previously, and your FW/1 controller methods will get any variables they need from the event object.&lt;/p&gt;
&lt;h2&gt;Caveats&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;I’ve written and tested this on Lucee. The only reason it wouldn’t work on Adobe CF is if I’ve used some Lucee-specific syntax. But I don’t think I have.&lt;/li&gt;
&lt;li&gt;I really don’t know what would happen if you had two plugins on the same Mura page, both of which were expecting to match an SES route. If for some reason you have this requirement, please let me know how you get on!&lt;/li&gt;
&lt;li&gt;My plugin was written using Mura ORM, and so my validation works against Mura ORM beans. This could be easily modified to check against a table and column, or you could just use regular expressions and do all the data validation within the FW/1 app - but then you would lose the ability to fall through to Mura’s 404 page.&lt;/li&gt;
&lt;/ol&gt;
</content>
	</entry>
	<entry>
		<title>RTFM carefully when applying CF hotfixes!</title>
		<link href="https://sebduggan.uk/posts/2012/rtfm-carefully-when-applying-cf-hotfixes/" />
		<updated>2012-03-14T12:00:00Z</updated>
		<id>https://sebduggan.uk/posts/2012/rtfm-carefully-when-applying-cf-hotfixes/</id>
		<content type="html">&lt;p&gt;Here’s a quick tip for anyone who may be seeing some odd behaviour after applying a ColdFusion hotfix (as well as a reminder to myself to be more careful next time…).&lt;/p&gt;
&lt;p&gt;I’ve just applied the &lt;a href=&quot;http://helpx.adobe.com/coldfusion/kb/coldfusion-security-hotfix.html&quot;&gt;latest security hotfix&lt;/a&gt; to my web server, and everything seemed to have worked fine - except that I suddenly started receiving a bunch of ColdFusion error notifications from a couple of my websites.&lt;/p&gt;
&lt;p&gt;The error was being reported as &lt;code&gt;coldfusion.runtime.Cast._double(J)D&lt;/code&gt;, and a little Googling directed me to &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/mxunit/wMfp3aYsFLs&quot;&gt;this thread on the MXUnit mailing list&lt;/a&gt;, with a solution right at the end. As it’s not exclusively an MXUnit issue (it seemed to come about when getting the difference between two &lt;code&gt;getTickCount()&lt;/code&gt; values) I thought I’d share the solution here.&lt;/p&gt;
&lt;p&gt;What it boils down to is this. When the installation instructions say:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If hf901-00001.jar, hf901-00002.jar or hf901-00003.jar exist, delete them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;…make sure you look at the filenames very carefully, and &lt;strong&gt;do not delete chf9010002.jar&lt;/strong&gt; - which is the updater for Cumulative HotFix 2.&lt;/p&gt;
&lt;p&gt;Once I’d restored the file I’d deleted in error, everything worked again as it should. Roll on ColdFusion 10 with its automated update process…&lt;/p&gt;
</content>
	</entry>
</feed>