From a8f5e9d54887227714da2869fcc6c920e97a283d Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 7 Feb 2022 21:44:53 +0100 Subject: [PATCH] Gitignore --- .gitignore | 1 + src/database.rb | 9 +++++---- src/db/main.db | Bin 0 -> 24576 bytes 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..23fd3be --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +src/db/ diff --git a/src/database.rb b/src/database.rb index 527ed0c..177e702 100644 --- a/src/database.rb +++ b/src/database.rb @@ -5,7 +5,8 @@ require_relative "db_models.rb" class Table attr_reader :name attr_accessor :db - def initialize(db, name) + + def initialize(db, name, sql_file) @db = db @name = name end @@ -13,12 +14,12 @@ end class Database # Database class attr_reader :name, :path - def initialize(name, table_structure, db_path=DEFAULT_DB_PATH) + attr_accessor :tables + def initialize(name, tables_names=[], db_path=DEFAULT_DB_PATH) @name = name @path = db_path - # generate table_structure if it doesn't exist - @tables = {} + @tables = [] # generate table objects end diff --git a/src/db/main.db b/src/db/main.db index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c2661eae25f6c4ad539373e56e7aec9df5a838fe 100644 GIT binary patch literal 24576 zcmeI(O>fgM7{KvleHpD(x=Yool}lS~+6y~!p+G=|EZa&V=qYlk$0FLKYf`og7bLz4 z-+<4-*WrlWQC>QxajyQB?ApoWNAb_T_|R9UUYsj&md++J7l+oCW!u&xAuP)(=vvlw zSR;*~b(eww0tg_000IagfB*srAn-o| zC#7<8d)pr5ayVAm#aQ3qqD)=PRq}RqSboxXyMZf$?qkmtE3xfFPSlQ`+4+>&o6SbU z{@h#S3^O$|b>pwuj(OyWcD3TfBd5~y1NXVx7yfY|{Lu46==V-TcSpaTUPk9KJ9jF9 z`$oUK88DP%sXx}K=&$pB2RwD3bwe)@`zFaSPNQ61<=0uv6E%_X`1YjogUsbDn$K>; zEc3SZu4A&jkvfy}alSiE-nC3>Be9zK*Q_vkpQM+`B5ia;-x!i8!^!hgX5mBO^;kZ=u|tcV!8RSVOw!BQdd9sM$YqeF^-IObZFXAt8i!F z0~1(mZQL1nU;@ou{+>B%HPdXFhJpYB2q1s}0tg_000IagfB*vPDo`~G