Beispiel #1
0
        public static void CreateTable(string tableName, DatabaseClient parentDB)
        {
            if (parentDB.ExistDB("$" + tableName) == DatabaseClient.DBResponse.Exists) return;
                parentDB.CreateDB("$" + tableName);

            DatabaseClient dbc = parentDB.Clone();
            dbc.SelectDB("$" + tableName);
            dbc.SetValue(".rowsAdded", "0");
        }
Beispiel #2
0
        public static void CreateTable(string tableName, DatabaseClient parentDB)
        {
            if (parentDB.ExistDB("$" + tableName) == DatabaseClient.DBResponse.Exists)
            {
                return;
            }
            parentDB.CreateDB("$" + tableName);

            DatabaseClient dbc = parentDB.Clone();

            dbc.SelectDB("$" + tableName);
            dbc.SetValue(".rowsAdded", "0");
        }
Beispiel #3
0
        public void AddRow(string[][] keyValues)
        {
            int rowsAdded = int.Parse(dbc.GetValue(".rowsAdded"));

            dbc.ReturnToRoot();
            dbc.CreateDB(rowsAdded.ToString());
            dbc.SelectDB(rowsAdded.ToString());
            wDBTableRow row = new wDBTableRow(dbc);

            for (int i = 0; i < keyValues.Length; i++)
            {
                row[keyValues[i][0]] = keyValues[i][1];
            }

            dbc.ReturnToRoot();
            dbc.SetValue(".rowsAdded", rowsAdded + 1);
        }