Пример #1
0
        //Создание таблицы с записями
        public void CreateRecordsTable()
        {
            string sqlQuery = @"CREATE TABLE IF NOT EXISTS records(
                id INTEGER PRIMARY KEY,
                record TEXT NOT NULL,
                date TEXT NOT NULL,
                status INTEGER NOT NULL DEFAULT 0
            );";

            db.ExecuteQueryNoReturn(sqlQuery);
        }
        public void TestCheckID()
        {
            db.ExecuteQueryNoReturn(@"CREATE TABLE IF NOT EXISTS records(
                id INTEGER PRIMARY KEY,
                record TEXT NOT NULL,
                date TEXT NOT NULL
            );");
            db.ExecuteQueryNoReturn(@"INSERT INTO records (record, date)
                        VALUES('adc', '111');");
            var result = db.CheckId("1");

            db.ExecuteQueryNoReturn("DROP TABLE records;");

            Assert.True(result);
        }