コード例 #1
0
        public void SelectTable_SelectWholeTable()
        {
            SQLite3Query sqlite = new SQLite3Query();

            Assert.IsTrue(sqlite.TestConnection(connectionString, true, false));
            Assert.IsNotNull(sqlite.SelectTable("SELECT * FROM TestTable;"));
            Assert.IsNullOrEmpty(sqlite.LastOperationErrorMessage);
        }
コード例 #2
0
        public void SelectTable_SelectTableUsingArguments()
        {
            SQLite3Query sqlite = new SQLite3Query();

            Assert.IsTrue(sqlite.TestConnection(connectionString, true, false));
            Assert.AreEqual("text1", sqlite.SelectTable("SELECT f1 FROM TestTable WHERE f1=@param;", new SQLiteParameter("@param", "text1")).Rows[0].ItemArray[0]);
            Assert.IsNullOrEmpty(sqlite.LastOperationErrorMessage);
        }
コード例 #3
0
        public void ChangeData_CreateTable()
        {
            SQLite3Query sqlite = new SQLite3Query();

            Assert.IsTrue(sqlite.TestConnection(connectionString, true, false));
            if (sqlite.SelectTable("SELECT * FROM test;") != null)
            {
                sqlite.ChangeData(sqlDropTestTable);
            }
            Assert.GreaterOrEqual(0, sqlite.ChangeData(sqlTestTableStatement));
            Assert.IsNullOrEmpty(sqlite.LastOperationErrorMessage);
        }