This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
dmspine64backup/test.cpp

27 lines
552 B
C++
Raw Normal View History

2015-09-14 15:04:54 -05:00
#include <iostream>
2015-09-14 16:46:49 -05:00
#include "db_engine.h"
2015-09-14 15:04:54 -05:00
2015-09-14 18:31:05 -05:00
using namespace std;
2015-09-14 17:03:23 -05:00
int main() {
2015-09-14 16:46:49 -05:00
db_engine engine;
2015-09-15 10:21:16 -05:00
2015-09-14 18:31:05 -05:00
vector<string> attributes;
vector<string> pkeys;
2015-09-15 10:21:16 -05:00
//we need a better way to do this
//going for function right now
2015-09-14 18:31:05 -05:00
attributes.push_back("username VARCHAR(20)");
attributes.push_back("password VARCHAR(20)");
pkeys.push_back("password");
2015-09-15 10:21:16 -05:00
2015-09-14 18:31:05 -05:00
engine.createCmd("users", attributes, pkeys);
2015-09-15 10:21:16 -05:00
vector<string> tuple;
tuple.push_back("csce315");
tuple.push_back("12345");
engine.insertQuery("users", tuple);
engine.saveCmd();
}