<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://truxwiki.com/index.php?action=history&amp;feed=atom&amp;title=Truxton_relation_get_source_id</id>
	<title>Truxton relation get source id - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://truxwiki.com/index.php?action=history&amp;feed=atom&amp;title=Truxton_relation_get_source_id"/>
	<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_relation_get_source_id&amp;action=history"/>
	<updated>2026-09-09T20:08:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://truxwiki.com/index.php?title=Truxton_relation_get_source_id&amp;diff=3950&amp;oldid=prev</id>
		<title>Sam: /* Sample */</title>
		<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_relation_get_source_id&amp;diff=3950&amp;oldid=prev"/>
		<updated>2021-02-06T11:15:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Sample&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 11:15, 6 February 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot; &gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The &amp;lt;code&amp;gt;PRIu64&amp;lt;/code&amp;gt; in the sample code above is a standard way of [https://en.wikipedia.org/wiki/C_data_types#Printf_and_scanf_format_specifiers formatting] a 64-bit unsigned integer in C.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Over the years, different compilers on different operating systems used different format specifiers for things, these &amp;lt;code&amp;gt;PRI&amp;lt;/code&amp;gt; macros, along with some tricky string concatenation the compilers perform for you, allow you to maintain a single code base without a bunch of macro magic.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sam</name></author>
		
	</entry>
	<entry>
		<id>https://truxwiki.com/index.php?title=Truxton_relation_get_source_id&amp;diff=3269&amp;oldid=prev</id>
		<title>Sam: Created page with &quot;This retrieves the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the source object of the relation. This corresponds to the &lt;code&gt;[SourceID]&lt;/code&gt; col...&quot;</title>
		<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_relation_get_source_id&amp;diff=3269&amp;oldid=prev"/>
		<updated>2021-01-17T12:02:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This retrieves the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the source object of the relation. This corresponds to the &amp;lt;code&amp;gt;[SourceID]&amp;lt;/code&amp;gt; col...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This retrieves the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the source object of the relation.&lt;br /&gt;
This corresponds to the &amp;lt;code&amp;gt;[SourceID]&amp;lt;/code&amp;gt; column of the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[Relation Table|Relation]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
void truxton_relation_get_source_id( uint64_t relation_handle, char * destination_string, size_t max_size );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Parameters=&lt;br /&gt;
==&amp;lt;code&amp;gt;relation_handle&amp;lt;/code&amp;gt;==&lt;br /&gt;
This handle comes from calling &amp;lt;code&amp;gt;[[truxton_relation_create]]()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;code&amp;gt;destination_string&amp;lt;/code&amp;gt;==&lt;br /&gt;
The string to be written to. &lt;br /&gt;
&lt;br /&gt;
==&amp;lt;code&amp;gt;max_size&amp;lt;/code&amp;gt;==&lt;br /&gt;
The maximum number of characters that can be written to &amp;lt;code&amp;gt;destination_string&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Sample=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot; highlight=&amp;quot;18&amp;quot;&amp;gt;&lt;br /&gt;
void dump_relation(uint64_t relation_handle)&lt;br /&gt;
{&lt;br /&gt;
   uint64_t value = 0;&lt;br /&gt;
   char guid_string[ 65 ];&lt;br /&gt;
&lt;br /&gt;
   value = truxton_relation_get_a_type( relation_handle );&lt;br /&gt;
   truxton_relation_get_a_id( relation_handle, guid_string, sizeof( guid_string ) );&lt;br /&gt;
   printf( &amp;quot;A (%&amp;quot; PRIu64 &amp;quot;) %s is a &amp;quot;, value, guid_string );&lt;br /&gt;
&lt;br /&gt;
   value = truxton_relation_get_relation( relation_handle );&lt;br /&gt;
   printf( &amp;quot;%&amp;quot; PRIu64 &amp;quot; of &amp;quot;, value );&lt;br /&gt;
&lt;br /&gt;
   value = truxton_relation_get_b_type( relation_handle );&lt;br /&gt;
   truxton_relation_get_b_id( relation_handle, guid_string, sizeof( guid_string ) );&lt;br /&gt;
   printf( &amp;quot;B (%&amp;quot; PRIu64 &amp;quot;) %s is a &amp;quot;, value, guid_string );&lt;br /&gt;
&lt;br /&gt;
   value = truxton_relation_get_source_type( relation_handle );&lt;br /&gt;
   truxton_relation_get_source_id( relation_handle, guid_string, sizeof( guid_string ) );&lt;br /&gt;
&lt;br /&gt;
   printf( &amp;quot;Source (%&amp;quot; PRIu64 &amp;quot;) is %s\n&amp;quot;, value, guid_string );   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sam</name></author>
		
	</entry>
</feed>