You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="shortcomment cmt">Gets a mandatory property of a vertex</p><divclass="fullcomment"><divclass="comment cmt"><p>Gets a mandatory property of a vertex</p><p> Returns a property if it exists or not. This method can be used to retrieve properties baked in the schema, so
353
+
it must be present. The result is not wrapped in an <code>Option[T]</code>, so if the property does not exist on the database
354
+
result will be null.</p><h4>Example</h4><pre>existing.dsl.mandatoryProperty[<spanclass="std">String</span>](<spanclass="lit">"name"</span>) <spanclass="cmt">// String</span></pre></div><dlclass="paramcmts block"><dtclass="tparam">T</dt><ddclass="cmt"><p>Property type</p></dd><dtclass="param">name</dt><ddclass="cmt"><p>The filed name of the property</p></dd></dl></div>
<pclass="shortcomment cmt">Gets a property of a vertex</p><divclass="fullcomment"><divclass="comment cmt"><p>Gets a property of a vertex</p><h4>Example</h4><pre>existing.dsl.property[<spanclass="std">String</span>](<spanclass="lit">"name"</span>) <spanclass="cmt">// Option[String]</span></pre></div><dlclass="paramcmts block"><dtclass="tparam">T</dt><ddclass="cmt"><p>Property type</p></dd><dtclass="param">name</dt><ddclass="cmt"><p>The filed name of the property</p></dd></dl></div>
<pclass="shortcomment cmt">Adds a property to existing vertex</p><divclass="fullcomment"><divclass="comment cmt"><p>Adds a property to existing vertex</p><h4>Example</h4><pre>existing.dsl withProperty <spanclass="lit">"name"</span> -> <spanclass="lit">"ACME Software Solutions"</span> and <spanclass="lit">"year"</span> -> <spanclass="num">2017</span></pre></div><dlclass="paramcmts block"><dtclass="param">prop</dt><ddclass="cmt"><p>The property to set</p></dd></dl></div>
559
+
<pclass="shortcomment cmt">Adds a property to existing vertex</p><divclass="fullcomment"><divclass="comment cmt"><p>Adds a property to existing vertex</p><h4>Example</h4><pre>existing.dsl withProperty <spanclass="lit">"name"</span> -> <spanclass="lit">"ACME Software Solutions"</span> and <spanclass="lit">"year"</span> -> <spanclass="num">2017</span>
560
+
existing.dsl withProperty <spanclass="lit">"name"</span> -> <spanclass="std">Some</span>(<spanclass="lit">"foo"</span>) <spanclass="cmt">// will be persisted</span>
561
+
existing.dsl withProperty <spanclass="lit">"name"</span> -> <spanclass="std">None</span><spanclass="cmt">// nothing will happen</span>
562
+
existing.dsl withProperty <spanclass="lit">"name"</span> -> <spanclass="kw">null</span><spanclass="cmt">// nothing will happen</span></pre></div><dlclass="paramcmts block"><dtclass="param">prop</dt><ddclass="cmt"><p>The property to set</p></dd></dl></div>
0 commit comments