Deploy code docs to GitHub Pages for workflow run 116

Commit: eca7313cf1
This commit is contained in:
tgstation-server
2020-08-01 18:23:09 +00:00
parent 950a16fd2c
commit cf56e750bd
6688 changed files with 487749 additions and 0 deletions
@@ -0,0 +1,133 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tgstation-server: src/Tgstation.Server.Host/Database/PostgresSqlDatabaseContext.cs Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="tgs.ico"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">tgstation-server
&#160;<span id="projectnumber">4.4.2</span>
</div>
<div id="projectbrief">The /tg/station 13 server suite</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_34761767c1c3cd212f9d2f80ea0828a8.html">Tgstation.Server.Host</a></li><li class="navelem"><a class="el" href="dir_3a3ab2f663730d5bed7026cf41734e8a.html">Database</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">PostgresSqlDatabaseContext.cs</div> </div>
</div><!--header-->
<div class="contents">
<a href="_postgres_sql_database_context_8cs.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="keyword">using</span> Microsoft.EntityFrameworkCore;</div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="keyword">using</span> System;</div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="keyword">using</span> <a class="code" href="namespace_tgstation.html">Tgstation</a>.<a class="code" href="namespace_tgstation_1_1_server.html">Server</a>.<a class="code" href="namespace_tgstation_1_1_server_1_1_host.html">Host</a>.<a class="code" href="namespace_tgstation_1_1_server_1_1_host_1_1_configuration.html">Configuration</a>;</div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_tgstation_1_1_server_1_1_host_1_1_database.html">Tgstation.Server.Host.Database</a></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;{</div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html"> 10</a></span>&#160; sealed <span class="keyword">class </span><a class="code" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html">PostgresSqlDatabaseContext</a> : <a class="code" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_database_context.html">DatabaseContext</a></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160; {</div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#af2e5a946215845b0fcecffeb2270b1c3"> 13</a></span>&#160; <span class="keyword">protected</span> <span class="keyword">override</span> DeleteBehavior <a class="code" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#af2e5a946215845b0fcecffeb2270b1c3">RevInfoCompileJobDeleteBehavior</a> =&gt; DeleteBehavior.Cascade;</div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#a095ca8d3b284f60a8d0ded862559d5e9"> 19</a></span>&#160; <span class="keyword">public</span> <a class="code" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#a095ca8d3b284f60a8d0ded862559d5e9">PostgresSqlDatabaseContext</a>(</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; DbContextOptions&lt;PostgresSqlDatabaseContext&gt; dbContextOptions)</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; : base(dbContextOptions)</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; { }</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#a3d07b96c19d7b70b69c4e8d946b7cced"> 29</a></span>&#160; <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#a3d07b96c19d7b70b69c4e8d946b7cced">ConfigureWith</a>(DbContextOptionsBuilder options, <a class="code" href="class_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration.html">DatabaseConfiguration</a> databaseConfiguration)</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; {</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keywordflow">if</span> (options == <span class="keyword">null</span>)</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(options));</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <span class="keywordflow">if</span> (databaseConfiguration == <span class="keyword">null</span>)</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(databaseConfiguration));</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keywordflow">if</span> (databaseConfiguration.<a class="code" href="class_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration.html#adab83eaad53afabdb2f7b43c23ece38a">DatabaseType</a> != <a class="code" href="namespace_tgstation_1_1_server_1_1_host_1_1_configuration.html#acda8f6ee23a9ee8ac298f7b4a7d5617c">DatabaseType</a>.PostgresSql)</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordflow">throw</span> <span class="keyword">new</span> InvalidOperationException($<span class="stringliteral">&quot;Invalid DatabaseType for {nameof(PostgresSqlDatabaseContext)}!&quot;</span>);</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; options.UseNpgsql(databaseConfiguration.<a class="code" href="class_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration.html#a53a14b4a89de73b8ea223804c4aea365">ConnectionString</a>, options =&gt;</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; {</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; options.EnableRetryOnFailure();</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; if (!String.IsNullOrEmpty(databaseConfiguration.ServerVersion))</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; options.SetPostgresVersion(</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; Version.Parse(databaseConfiguration.ServerVersion));</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; });</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; }</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; }</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespace_tgstation_html"><div class="ttname"><a href="namespace_tgstation.html">Tgstation</a></div><div class="ttdef"><b>Definition:</b> <a href="_api_headers_8cs_source.html#l00012">ApiHeaders.cs:13</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context_html_a3d07b96c19d7b70b69c4e8d946b7cced"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#a3d07b96c19d7b70b69c4e8d946b7cced">Tgstation.Server.Host.Database.PostgresSqlDatabaseContext.ConfigureWith</a></div><div class="ttdeci">static void ConfigureWith(DbContextOptionsBuilder options, DatabaseConfiguration databaseConfiguration)</div><div class="ttdoc">Configure the PostgresSqlDatabaseContext.</div><div class="ttdef"><b>Definition:</b> <a href="_postgres_sql_database_context_8cs_source.html#l00029">PostgresSqlDatabaseContext.cs:29</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_database_1_1_database_context_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_database_context.html">Tgstation.Server.Host.Database.DatabaseContext</a></div><div class="ttdoc">Backend abstract implementation of IDatabaseContext</div><div class="ttdef"><b>Definition:</b> <a href="_database_context_8cs_source.html#l00022">DatabaseContext.cs:23</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context_html_a095ca8d3b284f60a8d0ded862559d5e9"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#a095ca8d3b284f60a8d0ded862559d5e9">Tgstation.Server.Host.Database.PostgresSqlDatabaseContext.PostgresSqlDatabaseContext</a></div><div class="ttdeci">PostgresSqlDatabaseContext(DbContextOptions&lt; PostgresSqlDatabaseContext &gt; dbContextOptions)</div><div class="ttdoc">Construct a SqlServerDatabaseContext</div><div class="ttdef"><b>Definition:</b> <a href="_postgres_sql_database_context_8cs_source.html#l00019">PostgresSqlDatabaseContext.cs:19</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host.html">Tgstation.Server.Host</a></div><div class="ttdef"><b>Definition:</b> <a href="_byond_executable_lock_8cs_source.html#l00008">ByondExecutableLock.cs:9</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html">Tgstation.Server.Host.Database.PostgresSqlDatabaseContext</a></div><div class="ttdoc">DatabaseContext for PostgresSQL.</div><div class="ttdef"><b>Definition:</b> <a href="_postgres_sql_database_context_8cs_source.html#l00010">PostgresSqlDatabaseContext.cs:11</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_configuration_html_acda8f6ee23a9ee8ac298f7b4a7d5617c"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_configuration.html#acda8f6ee23a9ee8ac298f7b4a7d5617c">Tgstation.Server.Host.Configuration.DatabaseType</a></div><div class="ttdeci">DatabaseType</div><div class="ttdoc">Type of database to user</div><div class="ttdef"><b>Definition:</b> <a href="_database_type_8cs_source.html#l00006">DatabaseType.cs:7</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context_html_af2e5a946215845b0fcecffeb2270b1c3"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_database_1_1_postgres_sql_database_context.html#af2e5a946215845b0fcecffeb2270b1c3">Tgstation.Server.Host.Database.PostgresSqlDatabaseContext.RevInfoCompileJobDeleteBehavior</a></div><div class="ttdeci">override DeleteBehavior RevInfoCompileJobDeleteBehavior</div><div class="ttdef"><b>Definition:</b> <a href="_postgres_sql_database_context_8cs_source.html#l00013">PostgresSqlDatabaseContext.cs:13</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration_html_adab83eaad53afabdb2f7b43c23ece38a"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration.html#adab83eaad53afabdb2f7b43c23ece38a">Tgstation.Server.Host.Configuration.DatabaseConfiguration.DatabaseType</a></div><div class="ttdeci">DatabaseType DatabaseType</div><div class="ttdoc">The Configuration.DatabaseType to create</div><div class="ttdef"><b>Definition:</b> <a href="_database_configuration_8cs_source.html#l00020">DatabaseConfiguration.cs:20</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration.html">Tgstation.Server.Host.Configuration.DatabaseConfiguration</a></div><div class="ttdoc">Configuration options for the Database.DatabaseContext</div><div class="ttdef"><b>Definition:</b> <a href="_database_configuration_8cs_source.html#l00009">DatabaseConfiguration.cs:10</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_database_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_database.html">Tgstation.Server.Host.Database</a></div><div class="ttdef"><b>Definition:</b> <a href="_database_collection_8cs_source.html#l00009">DatabaseCollection.cs:10</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_configuration_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_configuration.html">Tgstation.Server.Host.Configuration</a></div><div class="ttdef"><b>Definition:</b> <a href="_control_panel_configuration_8cs_source.html#l00003">ControlPanelConfiguration.cs:4</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration_html_a53a14b4a89de73b8ea223804c4aea365"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_configuration_1_1_database_configuration.html#a53a14b4a89de73b8ea223804c4aea365">Tgstation.Server.Host.Configuration.DatabaseConfiguration.ConnectionString</a></div><div class="ttdeci">string ConnectionString</div><div class="ttdoc">The connection string for the database</div><div class="ttdef"><b>Definition:</b> <a href="_database_configuration_8cs_source.html#l00030">DatabaseConfiguration.cs:30</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_html"><div class="ttname"><a href="namespace_tgstation_1_1_server.html">Tgstation.Server</a></div><div class="ttdef"><b>Definition:</b> <a href="_api_headers_8cs_source.html#l00012">ApiHeaders.cs:13</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>