Esempio n. 1
0
        private void EnsureLanguageExistsInDb(PlainLiteral node)
        {
            int          hash = node.GetLanguage().GetHashCode();
            MySqlCommand cmd  = new MySqlCommand("INSERT IGNORE INTO Languages (hash, value) VALUES (" +
                                                 hash + ", '" + node.GetLanguage() + "')", itsConn);

            cmd.ExecuteNonQuery();
        }
Esempio n. 2
0
 public void languageDefaultsToNull() {
   PlainLiteral node = new PlainLiteral("whizz");
   
   Assert.AreEqual(null, node.GetLanguage());
 }      
Esempio n. 3
0
 public void languageSpecifiedInConstructor() {
   PlainLiteral node = new PlainLiteral("whizz", "fr");
   
   Assert.AreEqual("fr", node.GetLanguage());
 }