예제 #1
0
 void Start()
 {
     //initial the callback
     mycallback = new sqlcallback();
     //initial the script
     myscript = new sqlBehavior(mycallback);
     //connect to database and refresh the script
     myscript = myscript.databaseConnection("/test.db");
     if (myscript == null)
     {
         Debug.Log("null");
     }
     //create table
     if (!myscript.TableExists("test"))
     {
         myscript.CreateTable("test", new string[] { "id", "value", "time" }, new string[] { "text", "text", "text" });
     }
 }
예제 #2
0
 /// <summary>
 /// sql behavior initial
 /// </summary>
 public sqlBehavior(mySQLCallback callback)
 {
     mycallback = callback;
 }