Merge branch 'master' into pieces
This commit is contained in:
commit
b2b769da8f
@ -1,6 +0,0 @@
|
|||||||
NODE_PORT=3000
|
|
||||||
NODE_ENV=dev
|
|
||||||
DB_HOST=localhost
|
|
||||||
DB_NAME=briques_db
|
|
||||||
DB_USER=briques_llm
|
|
||||||
DB_PASSWORD=briques_password_2025
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
dev-db/
|
dev-db/
|
||||||
database/
|
database/
|
||||||
**/.env
|
**/.env
|
||||||
|
*.data
|
||||||
|
15
Makefile
Normal file
15
Makefile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
DIR_SQL = PostgreSQL
|
||||||
|
DIR_BACK = back-end
|
||||||
|
|
||||||
|
BIN = prepare_dev
|
||||||
|
|
||||||
|
all: $(BIN)
|
||||||
|
|
||||||
|
prepare_dev:
|
||||||
|
cp $(DIR_BACK)/.env.example $(DIR_BACK)/.env
|
||||||
|
cd $(DIR_SQL) && make
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(DIR_BACK)/.env
|
||||||
|
cd $(DIR_SQL) && make clean
|
||||||
|
|
663
PostgreSQL/.csv/brands.csv
Normal file
663
PostgreSQL/.csv/brands.csv
Normal file
@ -0,0 +1,663 @@
|
|||||||
|
brand
|
||||||
|
Klein LLC
|
||||||
|
DuBuque and Sons
|
||||||
|
Wisozk-Heidenreich
|
||||||
|
Fadel-Torp
|
||||||
|
Predovic-Aufderhar
|
||||||
|
Simonis Inc
|
||||||
|
Gleason and Sons
|
||||||
|
Hilll-Douglas
|
||||||
|
Leannon Inc
|
||||||
|
Hane Inc
|
||||||
|
Bechtelar-Mosciski
|
||||||
|
Hane-Kirlin
|
||||||
|
Oberbrunner-Sauer
|
||||||
|
Lakin Inc
|
||||||
|
|
||||||
|
Daniel-Kris
|
||||||
|
Price-Gerhold
|
||||||
|
|
||||||
|
Schultz Inc
|
||||||
|
Erdman and Sons
|
||||||
|
Blick-Howell
|
||||||
|
Leannon Group
|
||||||
|
Prosacco LLC
|
||||||
|
Corwin-Schimmel
|
||||||
|
Morar-Harber
|
||||||
|
|
||||||
|
Kemmer and Sons
|
||||||
|
|
||||||
|
Boehm-Balistreri
|
||||||
|
Schumm LLC
|
||||||
|
Olson-Schmitt
|
||||||
|
McCullough-Stoltenberg
|
||||||
|
Ferry LLC
|
||||||
|
Cruickshank and Sons
|
||||||
|
Goodwin-Mayert
|
||||||
|
Feest Inc
|
||||||
|
Koss-Flatley
|
||||||
|
Stark Inc
|
||||||
|
Ratke-Bode
|
||||||
|
Walker-Pacocha
|
||||||
|
Schumm-Jacobs
|
||||||
|
Botsford Inc
|
||||||
|
Baumbach LLC
|
||||||
|
Turcotte Group
|
||||||
|
Boyle-Brown
|
||||||
|
Kuvalis and Sons
|
||||||
|
Cartwright Inc
|
||||||
|
|
||||||
|
Russel-Heller
|
||||||
|
Gleichner-Barton
|
||||||
|
Kreiger-Walsh
|
||||||
|
Murphy-Von
|
||||||
|
Morissette-Zulauf
|
||||||
|
Jacobs-Schaefer
|
||||||
|
Fay and Sons
|
||||||
|
|
||||||
|
Reichel LLC
|
||||||
|
|
||||||
|
Gutkowski LLC
|
||||||
|
Littel Inc
|
||||||
|
Towne-Harvey
|
||||||
|
Lang-Kirlin
|
||||||
|
VonRueden and Sons
|
||||||
|
Bogan-Tremblay
|
||||||
|
Bradtke-Monahan
|
||||||
|
Stiedemann-Kling
|
||||||
|
Champlin-Jacobs
|
||||||
|
Walsh-Blick
|
||||||
|
Hagenes-Paucek
|
||||||
|
Volkman and Sons
|
||||||
|
Abshire Inc
|
||||||
|
Senger-Johnston
|
||||||
|
Hand Group
|
||||||
|
Rolfson-Mayert
|
||||||
|
Volkman-Ondricka
|
||||||
|
Runolfsdottir-Walter
|
||||||
|
Schulist-Wolf
|
||||||
|
Reichel-Franecki
|
||||||
|
Effertz and Sons
|
||||||
|
Howe LLC
|
||||||
|
Rohan-Bartoletti
|
||||||
|
Pacocha-Emmerich
|
||||||
|
Nolan-Quitzon
|
||||||
|
Stiedemann Inc
|
||||||
|
Connelly-Leuschke
|
||||||
|
Cummings-Gibson
|
||||||
|
Weimann-Kub
|
||||||
|
Nitzsche-McDermott
|
||||||
|
Von Group
|
||||||
|
Dietrich LLC
|
||||||
|
Schamberger and Sons
|
||||||
|
Jones-Bogisich
|
||||||
|
Corwin Inc
|
||||||
|
Ziemann-Kohler
|
||||||
|
Ratke-Langosh
|
||||||
|
Price-Bosco
|
||||||
|
Schmeler-Dibbert
|
||||||
|
Monahan Inc
|
||||||
|
Kuvalis LLC
|
||||||
|
|
||||||
|
Schamberger-Kautzer
|
||||||
|
Dickinson-Grady
|
||||||
|
|
||||||
|
Parisian-Runte
|
||||||
|
Hirthe Inc
|
||||||
|
Tromp-Renner
|
||||||
|
Pfeffer LLC
|
||||||
|
Jaskolski and Sons
|
||||||
|
Koepp and Sons
|
||||||
|
|
||||||
|
Maggio-Hickle
|
||||||
|
Casper-Carter
|
||||||
|
Herzog-Jaskolski
|
||||||
|
Lakin-Borer
|
||||||
|
Sanford-Maggio
|
||||||
|
Shields-Kihn
|
||||||
|
Wilderman-Wisozk
|
||||||
|
Nienow-Sanford
|
||||||
|
Stiedemann LLC
|
||||||
|
Fay-Weber
|
||||||
|
Cartwright-Wiegand
|
||||||
|
Veum Inc
|
||||||
|
Greenholt Group
|
||||||
|
Bergnaum and Sons
|
||||||
|
Steuber-Breitenberg
|
||||||
|
Rempel-Lynch
|
||||||
|
Baumbach Inc
|
||||||
|
Jast-Schiller
|
||||||
|
Streich LLC
|
||||||
|
Marquardt-Parisian
|
||||||
|
Labadie and Sons
|
||||||
|
Gulgowski LLC
|
||||||
|
Balistreri Group
|
||||||
|
Kiehn-Hirthe
|
||||||
|
Effertz-Gorczany
|
||||||
|
Goldner-Breitenberg
|
||||||
|
Upton-Beier
|
||||||
|
White LLC
|
||||||
|
Rowe Group
|
||||||
|
Wolf-Roberts
|
||||||
|
Hudson-Pacocha
|
||||||
|
|
||||||
|
Mohr-Pacocha
|
||||||
|
Doyle LLC
|
||||||
|
Kihn-Kirlin
|
||||||
|
Dooley LLC
|
||||||
|
Vandervort-Feest
|
||||||
|
|
||||||
|
Thiel-Gorczany
|
||||||
|
Reichel-Mertz
|
||||||
|
Medhurst Group
|
||||||
|
Feil and Sons
|
||||||
|
Runolfsdottir Group
|
||||||
|
Fritsch-Gerhold
|
||||||
|
Lang Group
|
||||||
|
|
||||||
|
Ullrich LLC
|
||||||
|
Oberbrunner-Hirthe
|
||||||
|
Bosco-Lehner
|
||||||
|
Orn Group
|
||||||
|
Blick-Bruen
|
||||||
|
Green and Sons
|
||||||
|
|
||||||
|
Sporer Group
|
||||||
|
Prohaska-Hauck
|
||||||
|
Reynolds Group
|
||||||
|
Block-Parisian
|
||||||
|
Schumm-Ortiz
|
||||||
|
Leffler-Murazik
|
||||||
|
Crist LLC
|
||||||
|
Marquardt Group
|
||||||
|
Gislason Inc
|
||||||
|
|
||||||
|
Ondricka-Hintz
|
||||||
|
Walsh LLC
|
||||||
|
Koepp-Schamberger
|
||||||
|
Rath-Runolfsdottir
|
||||||
|
Bayer-Green
|
||||||
|
Reichert Group
|
||||||
|
Haag LLC
|
||||||
|
Haley-Donnelly
|
||||||
|
Russel Inc
|
||||||
|
Zulauf Inc
|
||||||
|
Hermiston and Sons
|
||||||
|
|
||||||
|
Runolfsdottir Inc
|
||||||
|
Smitham-Ryan
|
||||||
|
Goyette LLC
|
||||||
|
|
||||||
|
Cummerata Inc
|
||||||
|
Marks-Nikolaus
|
||||||
|
Turcotte Group
|
||||||
|
Walsh Group
|
||||||
|
Erdman LLC
|
||||||
|
Willms-Ortiz
|
||||||
|
Miller and Sons
|
||||||
|
Moore and Sons
|
||||||
|
Leffler-Dicki
|
||||||
|
Kautzer-Funk
|
||||||
|
Murazik-Sipes
|
||||||
|
Pollich Group
|
||||||
|
Volkman-Koepp
|
||||||
|
Prosacco LLC
|
||||||
|
|
||||||
|
Trantow LLC
|
||||||
|
McClure-Stanton
|
||||||
|
Corwin-Prohaska
|
||||||
|
Carroll and Sons
|
||||||
|
|
||||||
|
West-Hane
|
||||||
|
Ernser and Sons
|
||||||
|
Jacobson-Kohler
|
||||||
|
Orn-Lemke
|
||||||
|
Moen-Lemke
|
||||||
|
Hackett-Mosciski
|
||||||
|
Hane LLC
|
||||||
|
Wisoky-Jenkins
|
||||||
|
Grady Inc
|
||||||
|
Hagenes Group
|
||||||
|
Donnelly-Waelchi
|
||||||
|
Hermann LLC
|
||||||
|
Weber and Sons
|
||||||
|
Stamm LLC
|
||||||
|
Fay-Satterfield
|
||||||
|
Ondricka-Waelchi
|
||||||
|
Jacobson and Sons
|
||||||
|
Smitham LLC
|
||||||
|
Heidenreich-Robel
|
||||||
|
Langworth-Beier
|
||||||
|
Spinka-Emard
|
||||||
|
Funk LLC
|
||||||
|
|
||||||
|
Mayer and Sons
|
||||||
|
McGlynn-Beer
|
||||||
|
Rippin-Steuber
|
||||||
|
Moen-Yundt
|
||||||
|
Vandervort-Breitenberg
|
||||||
|
Tromp and Sons
|
||||||
|
Pagac-Gislason
|
||||||
|
|
||||||
|
Kulas-Stehr
|
||||||
|
Ryan LLC
|
||||||
|
Bogisich-Baumbach
|
||||||
|
Steuber Inc
|
||||||
|
Boyle-Ondricka
|
||||||
|
Thompson LLC
|
||||||
|
Wilkinson-Flatley
|
||||||
|
Powlowski-Hane
|
||||||
|
Schumm and Sons
|
||||||
|
Thiel and Sons
|
||||||
|
Nolan-Witting
|
||||||
|
Zboncak-Pagac
|
||||||
|
Harris-Thompson
|
||||||
|
|
||||||
|
Hickle-Schaefer
|
||||||
|
Miller LLC
|
||||||
|
Lindgren Group
|
||||||
|
Reilly-Kautzer
|
||||||
|
Barton and Sons
|
||||||
|
Sawayn Inc
|
||||||
|
Schmitt-Runolfsson
|
||||||
|
Gibson-Donnelly
|
||||||
|
Marks LLC
|
||||||
|
Yost LLC
|
||||||
|
Paucek and Sons
|
||||||
|
|
||||||
|
Rice-Krajcik
|
||||||
|
Pfannerstill LLC
|
||||||
|
Willms-Runolfsdottir
|
||||||
|
Grady Inc
|
||||||
|
Reichert-Schroeder
|
||||||
|
Kilback-Johnston
|
||||||
|
|
||||||
|
Bauch-Brown
|
||||||
|
Aufderhar LLC
|
||||||
|
Emmerich-Schumm
|
||||||
|
|
||||||
|
|
||||||
|
Bednar-Luettgen
|
||||||
|
Conroy-Wilkinson
|
||||||
|
Langosh-Howe
|
||||||
|
Breitenberg-Gerhold
|
||||||
|
Considine-Miller
|
||||||
|
Langworth and Sons
|
||||||
|
Balistreri LLC
|
||||||
|
Parisian-Pollich
|
||||||
|
Jacobson Inc
|
||||||
|
|
||||||
|
Ferry-Torphy
|
||||||
|
Effertz LLC
|
||||||
|
Trantow-Marvin
|
||||||
|
Borer and Sons
|
||||||
|
Pfeffer-Klein
|
||||||
|
Leannon-Grady
|
||||||
|
Smitham-Mohr
|
||||||
|
Mante-Padberg
|
||||||
|
Hills Inc
|
||||||
|
Zemlak Group
|
||||||
|
Kessler-Green
|
||||||
|
Terry-Reichert
|
||||||
|
Macejkovic and Sons
|
||||||
|
|
||||||
|
Rice-Bayer
|
||||||
|
Romaguera-Wuckert
|
||||||
|
Dickinson-Greenfelder
|
||||||
|
VonRueden Group
|
||||||
|
|
||||||
|
Krajcik and Sons
|
||||||
|
Romaguera-Pfannerstill
|
||||||
|
Heller-Hammes
|
||||||
|
Wisozk LLC
|
||||||
|
Auer-Beatty
|
||||||
|
Heller-Marks
|
||||||
|
Kertzmann and Sons
|
||||||
|
Schuppe LLC
|
||||||
|
Hammes-Schimmel
|
||||||
|
Raynor Inc
|
||||||
|
Balistreri Group
|
||||||
|
McKenzie and Sons
|
||||||
|
Ebert Group
|
||||||
|
Stanton and Sons
|
||||||
|
Kiehn-Rohan
|
||||||
|
Collier and Sons
|
||||||
|
Johns-Howe
|
||||||
|
Hilll-Emard
|
||||||
|
Douglas-Dietrich
|
||||||
|
Quitzon Inc
|
||||||
|
Olson-Schumm
|
||||||
|
Larkin-Ruecker
|
||||||
|
Feeney Group
|
||||||
|
|
||||||
|
Gislason LLC
|
||||||
|
Lemke and Sons
|
||||||
|
Hackett Group
|
||||||
|
Moen Inc
|
||||||
|
Murphy-Gottlieb
|
||||||
|
Barrows and Sons
|
||||||
|
Dicki LLC
|
||||||
|
Pollich-Weimann
|
||||||
|
Stiedemann and Sons
|
||||||
|
Ledner-Stanton
|
||||||
|
Koepp-Carter
|
||||||
|
Rice Group
|
||||||
|
|
||||||
|
White and Sons
|
||||||
|
Jakubowski Inc
|
||||||
|
|
||||||
|
Morissette-Hickle
|
||||||
|
Kutch-Senger
|
||||||
|
Beier-Hand
|
||||||
|
Waters Inc
|
||||||
|
Lang-Sporer
|
||||||
|
Parisian Group
|
||||||
|
Kuhn-Christiansen
|
||||||
|
Krajcik Inc
|
||||||
|
Leuschke-Pacocha
|
||||||
|
Jacobson Inc
|
||||||
|
Shields Group
|
||||||
|
Hauck Group
|
||||||
|
Hilpert-Grimes
|
||||||
|
Pacocha-Harvey
|
||||||
|
Walsh-Krajcik
|
||||||
|
Quigley-Miller
|
||||||
|
Swaniawski LLC
|
||||||
|
Miller-Cole
|
||||||
|
Gleason Group
|
||||||
|
Dooley-Witting
|
||||||
|
Conroy LLC
|
||||||
|
Parker Group
|
||||||
|
Spinka Group
|
||||||
|
Kunde-Wunsch
|
||||||
|
|
||||||
|
Corkery-Farrell
|
||||||
|
Von-Metz
|
||||||
|
Ondricka LLC
|
||||||
|
Stamm-Renner
|
||||||
|
Lubowitz-Lehner
|
||||||
|
Kshlerin-Larson
|
||||||
|
Streich-Reichert
|
||||||
|
Hackett-Medhurst
|
||||||
|
Kozey-Stroman
|
||||||
|
McDermott-Kuhic
|
||||||
|
Willms-Farrell
|
||||||
|
Konopelski-Romaguera
|
||||||
|
Collier LLC
|
||||||
|
Carroll-Flatley
|
||||||
|
Gerhold Group
|
||||||
|
Stracke Group
|
||||||
|
|
||||||
|
Reynolds-Johns
|
||||||
|
Gottlieb-Haag
|
||||||
|
Cruickshank-Gusikowski
|
||||||
|
Baumbach and Sons
|
||||||
|
Dickinson-Ankunding
|
||||||
|
Schumm and Sons
|
||||||
|
Kulas-Simonis
|
||||||
|
Ziemann-Haag
|
||||||
|
Wunsch-Hilll
|
||||||
|
Klocko-Kassulke
|
||||||
|
Satterfield-DuBuque
|
||||||
|
Collier Inc
|
||||||
|
Herzog-Denesik
|
||||||
|
Gibson and Sons
|
||||||
|
Miller LLC
|
||||||
|
Hyatt LLC
|
||||||
|
|
||||||
|
Walter Group
|
||||||
|
DuBuque Inc
|
||||||
|
Reichert Group
|
||||||
|
Hoppe Group
|
||||||
|
Beier-Zieme
|
||||||
|
Hammes Group
|
||||||
|
Abshire-Bradtke
|
||||||
|
Hegmann and Sons
|
||||||
|
Schneider LLC
|
||||||
|
MacGyver LLC
|
||||||
|
Larkin LLC
|
||||||
|
Gislason-Cummings
|
||||||
|
Hickle-Simonis
|
||||||
|
Stokes-Bahringer
|
||||||
|
Greenholt Inc
|
||||||
|
Kozey Inc
|
||||||
|
Berge-Shields
|
||||||
|
Sauer-Hilpert
|
||||||
|
Rau Inc
|
||||||
|
Christiansen-Ortiz
|
||||||
|
Windler-Schneider
|
||||||
|
Waters Inc
|
||||||
|
Bayer LLC
|
||||||
|
Stokes Inc
|
||||||
|
|
||||||
|
Ward-Yost
|
||||||
|
Buckridge-Schowalter
|
||||||
|
|
||||||
|
Frami and Sons
|
||||||
|
Ruecker Group
|
||||||
|
Bosco-Walter
|
||||||
|
Hoeger-Reynolds
|
||||||
|
Reilly-Stiedemann
|
||||||
|
Krajcik LLC
|
||||||
|
Terry-Hermann
|
||||||
|
Kuhn-Baumbach
|
||||||
|
Lebsack LLC
|
||||||
|
Hagenes-Gottlieb
|
||||||
|
Kirlin Group
|
||||||
|
|
||||||
|
Klocko LLC
|
||||||
|
Harvey-Daugherty
|
||||||
|
Torp-Rowe
|
||||||
|
Franecki LLC
|
||||||
|
Padberg-Bechtelar
|
||||||
|
Kling Inc
|
||||||
|
Buckridge-Stamm
|
||||||
|
Kuphal and Sons
|
||||||
|
|
||||||
|
Stamm-Reichert
|
||||||
|
Windler Group
|
||||||
|
Turner LLC
|
||||||
|
Lehner and Sons
|
||||||
|
Nader-Sipes
|
||||||
|
|
||||||
|
Schuppe-Hettinger
|
||||||
|
Nicolas LLC
|
||||||
|
Metz and Sons
|
||||||
|
Trantow-Hahn
|
||||||
|
Predovic-Johnston
|
||||||
|
|
||||||
|
Farrell and Sons
|
||||||
|
Heaney Inc
|
||||||
|
Moen-Kassulke
|
||||||
|
Keebler Inc
|
||||||
|
Blanda-Herman
|
||||||
|
Hand LLC
|
||||||
|
White LLC
|
||||||
|
Wintheiser Group
|
||||||
|
Hahn-Treutel
|
||||||
|
Donnelly and Sons
|
||||||
|
Homenick-Torp
|
||||||
|
Beahan-Toy
|
||||||
|
Moore-McDermott
|
||||||
|
Stark Group
|
||||||
|
|
||||||
|
Muller Group
|
||||||
|
Prosacco-Bogisich
|
||||||
|
Connelly-Howell
|
||||||
|
Dietrich-Toy
|
||||||
|
Wolf and Sons
|
||||||
|
Conroy LLC
|
||||||
|
Toy Inc
|
||||||
|
Rippin Inc
|
||||||
|
Hickle Group
|
||||||
|
Anderson LLC
|
||||||
|
Ullrich Group
|
||||||
|
Kutch Group
|
||||||
|
Hudson Group
|
||||||
|
Sauer Group
|
||||||
|
Cruickshank-Harris
|
||||||
|
Schulist-Feest
|
||||||
|
Marquardt Group
|
||||||
|
Senger and Sons
|
||||||
|
Bogisich-Kessler
|
||||||
|
Jenkins-Zulauf
|
||||||
|
Gleichner-McCullough
|
||||||
|
Schamberger-Pfannerstill
|
||||||
|
Reichert-McClure
|
||||||
|
Kub-McCullough
|
||||||
|
Cummerata-Hoeger
|
||||||
|
Thiel Group
|
||||||
|
Little Inc
|
||||||
|
Ondricka-Jast
|
||||||
|
Dibbert LLC
|
||||||
|
Auer and Sons
|
||||||
|
Murray-Kutch
|
||||||
|
Dare-Streich
|
||||||
|
Schroeder Group
|
||||||
|
Gorczany Inc
|
||||||
|
Kuhic-Von
|
||||||
|
Wyman-Bins
|
||||||
|
Weber and Sons
|
||||||
|
VonRueden and Sons
|
||||||
|
Padberg-Gislason
|
||||||
|
Donnelly-Heaney
|
||||||
|
Hayes-Weissnat
|
||||||
|
Veum-Ankunding
|
||||||
|
|
||||||
|
|
||||||
|
Walsh Inc
|
||||||
|
Predovic-Reichert
|
||||||
|
Spencer Inc
|
||||||
|
Trantow-Murazik
|
||||||
|
|
||||||
|
Vandervort Inc
|
||||||
|
|
||||||
|
Brown LLC
|
||||||
|
Wiegand-Renner
|
||||||
|
Boehm-Durgan
|
||||||
|
Mayert Group
|
||||||
|
Cummerata and Sons
|
||||||
|
Nolan-Boyer
|
||||||
|
Pfannerstill Group
|
||||||
|
Rutherford Inc
|
||||||
|
Oberbrunner-Schumm
|
||||||
|
Oberbrunner LLC
|
||||||
|
|
||||||
|
|
||||||
|
Balistreri-Quitzon
|
||||||
|
Mante-Bednar
|
||||||
|
Friesen-Rempel
|
||||||
|
Schumm Inc
|
||||||
|
Pouros Inc
|
||||||
|
Zboncak-Purdy
|
||||||
|
Olson Inc
|
||||||
|
Emmerich and Sons
|
||||||
|
Schneider and Sons
|
||||||
|
Runte-Schoen
|
||||||
|
Streich-Douglas
|
||||||
|
Homenick-Simonis
|
||||||
|
Schiller and Sons
|
||||||
|
Spinka LLC
|
||||||
|
Senger Inc
|
||||||
|
Heller-Kling
|
||||||
|
Ebert-Haley
|
||||||
|
Weber and Sons
|
||||||
|
Block and Sons
|
||||||
|
Welch LLC
|
||||||
|
VonRueden-Sanford
|
||||||
|
Wyman and Sons
|
||||||
|
|
||||||
|
Hayes-Roob
|
||||||
|
Crist LLC
|
||||||
|
Kerluke and Sons
|
||||||
|
Jakubowski Group
|
||||||
|
Sawayn-Bergnaum
|
||||||
|
Stanton Inc
|
||||||
|
Lindgren-Rau
|
||||||
|
Morissette-Haley
|
||||||
|
Daniel and Sons
|
||||||
|
Zboncak-Emard
|
||||||
|
Predovic-Mann
|
||||||
|
Kling Inc
|
||||||
|
|
||||||
|
McClure LLC
|
||||||
|
Osinski-Bailey
|
||||||
|
Mueller Inc
|
||||||
|
McClure-Waters
|
||||||
|
Hahn-Schulist
|
||||||
|
Spencer and Sons
|
||||||
|
Williamson-Goodwin
|
||||||
|
Zemlak Inc
|
||||||
|
Watsica-Schamberger
|
||||||
|
Koelpin-Marquardt
|
||||||
|
Connelly and Sons
|
||||||
|
Bradtke Inc
|
||||||
|
Cronin Group
|
||||||
|
Donnelly Group
|
||||||
|
Schmitt Group
|
||||||
|
Hermann-King
|
||||||
|
Stamm-Littel
|
||||||
|
Shields Group
|
||||||
|
Rippin-Wiegand
|
||||||
|
Cremin Group
|
||||||
|
Balistreri-McCullough
|
||||||
|
Howe-Runolfsdottir
|
||||||
|
|
||||||
|
Zemlak Group
|
||||||
|
Hudson-Thiel
|
||||||
|
Klein-Larson
|
||||||
|
Harvey Inc
|
||||||
|
Auer Group
|
||||||
|
Keebler-Hyatt
|
||||||
|
Schmitt-Ratke
|
||||||
|
|
||||||
|
Price-Bins
|
||||||
|
Vandervort Group
|
||||||
|
Emard-Powlowski
|
||||||
|
Harvey Inc
|
||||||
|
Tillman Inc
|
||||||
|
Kris LLC
|
||||||
|
Fisher and Sons
|
||||||
|
Morissette LLC
|
||||||
|
Willms LLC
|
||||||
|
Strosin-Howe
|
||||||
|
Thompson Inc
|
||||||
|
Kihn Group
|
||||||
|
Donnelly and Sons
|
||||||
|
Labadie Group
|
||||||
|
Gerhold and Sons
|
||||||
|
Murray Inc
|
||||||
|
Kirlin-Lemke
|
||||||
|
Torphy-Lockman
|
||||||
|
Reinger Inc
|
||||||
|
Schuster-Jaskolski
|
||||||
|
Huels-Tromp
|
||||||
|
Wehner-Harber
|
||||||
|
Leuschke Inc
|
||||||
|
|
||||||
|
|
||||||
|
Volkman-Kertzmann
|
||||||
|
Gerlach-Toy
|
||||||
|
Casper-Ondricka
|
||||||
|
|
||||||
|
Wolf Inc
|
||||||
|
Wisozk Group
|
||||||
|
Wuckert Inc
|
||||||
|
Effertz Group
|
||||||
|
Schuppe and Sons
|
||||||
|
|
||||||
|
Rodriguez LLC
|
||||||
|
Goldner-Purdy
|
||||||
|
Welch Inc
|
||||||
|
Mann-Kling
|
||||||
|
|
||||||
|
Heidenreich and Sons
|
||||||
|
Williamson-Barton
|
||||||
|
McDermott-Dickinson
|
||||||
|
Torp-Vandervort
|
||||||
|
Wisozk Group
|
||||||
|
Reichert and Sons
|
||||||
|
Kirlin-Greenholt
|
||||||
|
Volkman Inc
|
||||||
|
Braun-Greenholt
|
||||||
|
Schmeler-Beatty
|
|
20
PostgreSQL/.csv/colors.csv
Normal file
20
PostgreSQL/.csv/colors.csv
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
Aquamarine
|
||||||
|
Blue
|
||||||
|
Crimson
|
||||||
|
Fuscia
|
||||||
|
Goldenrod
|
||||||
|
Green
|
||||||
|
Indigo
|
||||||
|
Khaki
|
||||||
|
Maroon
|
||||||
|
Mauv
|
||||||
|
Orange
|
||||||
|
Pink
|
||||||
|
Puce
|
||||||
|
Purple
|
||||||
|
Red
|
||||||
|
Teal
|
||||||
|
Turquoise
|
||||||
|
Violet
|
||||||
|
Yellow
|
|
944
PostgreSQL/.csv/dates.csv
Normal file
944
PostgreSQL/.csv/dates.csv
Normal file
@ -0,0 +1,944 @@
|
|||||||
|
date
|
||||||
|
01-15-2011
|
||||||
|
01-02-1973
|
||||||
|
06-02-2004
|
||||||
|
08-01-2022
|
||||||
|
01-11-2008
|
||||||
|
01-10-1983
|
||||||
|
09-06-2016
|
||||||
|
09-01-2012
|
||||||
|
01-15-1970
|
||||||
|
09-14-1979
|
||||||
|
12-15-1991
|
||||||
|
05-20-1971
|
||||||
|
08-10-1986
|
||||||
|
12-07-2007
|
||||||
|
05-09-2020
|
||||||
|
05-12-2012
|
||||||
|
10-03-2000
|
||||||
|
04-14-1986
|
||||||
|
09-04-1997
|
||||||
|
10-17-1985
|
||||||
|
07-31-1971
|
||||||
|
09-09-1976
|
||||||
|
06-17-1971
|
||||||
|
06-01-1976
|
||||||
|
08-31-2018
|
||||||
|
12-26-1972
|
||||||
|
08-14-1983
|
||||||
|
04-11-1970
|
||||||
|
07-12-2016
|
||||||
|
06-02-2023
|
||||||
|
03-27-2020
|
||||||
|
05-16-1997
|
||||||
|
11-18-1976
|
||||||
|
03-03-1976
|
||||||
|
03-03-1975
|
||||||
|
12-20-1996
|
||||||
|
03-05-1980
|
||||||
|
11-14-2018
|
||||||
|
12-03-2006
|
||||||
|
05-08-2018
|
||||||
|
12-15-2009
|
||||||
|
06-21-1975
|
||||||
|
03-15-1996
|
||||||
|
08-22-2023
|
||||||
|
12-29-1997
|
||||||
|
11-18-1975
|
||||||
|
06-01-2012
|
||||||
|
05-09-2020
|
||||||
|
06-21-1987
|
||||||
|
08-18-1985
|
||||||
|
06-11-2014
|
||||||
|
05-29-1991
|
||||||
|
03-17-2002
|
||||||
|
11-10-2021
|
||||||
|
04-21-1976
|
||||||
|
06-28-1975
|
||||||
|
06-11-1984
|
||||||
|
03-22-2016
|
||||||
|
04-30-2016
|
||||||
|
05-06-2001
|
||||||
|
10-08-1970
|
||||||
|
06-21-1970
|
||||||
|
09-12-1999
|
||||||
|
06-24-2011
|
||||||
|
04-07-1974
|
||||||
|
08-22-1982
|
||||||
|
04-17-1975
|
||||||
|
10-16-2010
|
||||||
|
02-11-1988
|
||||||
|
05-12-2006
|
||||||
|
09-11-2006
|
||||||
|
04-01-1983
|
||||||
|
03-19-2018
|
||||||
|
06-13-1986
|
||||||
|
10-25-2020
|
||||||
|
12-17-2012
|
||||||
|
06-10-2004
|
||||||
|
04-18-2018
|
||||||
|
01-29-2006
|
||||||
|
07-10-1980
|
||||||
|
02-27-1985
|
||||||
|
08-06-1992
|
||||||
|
12-12-1993
|
||||||
|
06-06-1977
|
||||||
|
06-07-1979
|
||||||
|
08-29-2018
|
||||||
|
01-15-2021
|
||||||
|
06-07-2008
|
||||||
|
03-12-2013
|
||||||
|
04-22-1992
|
||||||
|
08-13-2009
|
||||||
|
11-11-1969
|
||||||
|
03-04-1978
|
||||||
|
03-06-2023
|
||||||
|
06-01-2014
|
||||||
|
03-02-1998
|
||||||
|
11-26-1975
|
||||||
|
05-14-1972
|
||||||
|
02-29-1996
|
||||||
|
04-06-2006
|
||||||
|
09-27-1979
|
||||||
|
09-22-2022
|
||||||
|
06-15-1985
|
||||||
|
09-14-1987
|
||||||
|
01-19-2024
|
||||||
|
08-12-1986
|
||||||
|
06-01-1983
|
||||||
|
03-06-2018
|
||||||
|
06-09-2015
|
||||||
|
02-14-2007
|
||||||
|
04-30-2024
|
||||||
|
03-03-1987
|
||||||
|
12-02-1976
|
||||||
|
02-28-1990
|
||||||
|
10-16-1983
|
||||||
|
10-17-1988
|
||||||
|
07-29-2019
|
||||||
|
10-21-1990
|
||||||
|
06-29-1999
|
||||||
|
12-11-1995
|
||||||
|
07-31-2015
|
||||||
|
10-18-2023
|
||||||
|
01-21-1974
|
||||||
|
09-04-1973
|
||||||
|
12-27-2017
|
||||||
|
09-21-1985
|
||||||
|
07-16-1990
|
||||||
|
03-09-1971
|
||||||
|
02-19-1978
|
||||||
|
11-19-1974
|
||||||
|
09-27-1976
|
||||||
|
12-13-1996
|
||||||
|
06-16-1998
|
||||||
|
12-24-1993
|
||||||
|
04-02-1984
|
||||||
|
01-25-1970
|
||||||
|
06-07-2013
|
||||||
|
07-05-2015
|
||||||
|
04-02-2014
|
||||||
|
09-20-1999
|
||||||
|
12-23-1972
|
||||||
|
04-11-1982
|
||||||
|
06-29-1979
|
||||||
|
04-03-1976
|
||||||
|
10-18-1988
|
||||||
|
01-31-2021
|
||||||
|
04-04-1997
|
||||||
|
01-15-2001
|
||||||
|
02-25-1987
|
||||||
|
06-05-2005
|
||||||
|
06-17-1983
|
||||||
|
01-31-1987
|
||||||
|
08-03-1981
|
||||||
|
12-08-2013
|
||||||
|
11-23-2002
|
||||||
|
03-23-1999
|
||||||
|
02-08-1971
|
||||||
|
12-29-1998
|
||||||
|
10-15-1983
|
||||||
|
04-06-2006
|
||||||
|
02-28-1984
|
||||||
|
06-06-2000
|
||||||
|
05-18-2007
|
||||||
|
09-05-2023
|
||||||
|
03-18-2016
|
||||||
|
03-02-1999
|
||||||
|
04-26-1984
|
||||||
|
10-09-1995
|
||||||
|
08-16-2004
|
||||||
|
08-08-2020
|
||||||
|
10-19-2001
|
||||||
|
04-13-1987
|
||||||
|
01-19-2012
|
||||||
|
09-29-2019
|
||||||
|
08-10-2000
|
||||||
|
04-06-2011
|
||||||
|
05-22-2010
|
||||||
|
11-04-1988
|
||||||
|
04-02-2015
|
||||||
|
04-05-2010
|
||||||
|
10-05-1982
|
||||||
|
12-30-1976
|
||||||
|
05-27-1980
|
||||||
|
08-15-1976
|
||||||
|
01-05-1975
|
||||||
|
01-02-1994
|
||||||
|
09-23-2024
|
||||||
|
11-12-2020
|
||||||
|
11-22-2020
|
||||||
|
08-27-1979
|
||||||
|
12-29-1991
|
||||||
|
08-20-2004
|
||||||
|
03-04-1988
|
||||||
|
02-25-2023
|
||||||
|
10-31-1984
|
||||||
|
05-05-2017
|
||||||
|
12-22-2022
|
||||||
|
07-31-1983
|
||||||
|
11-30-1991
|
||||||
|
04-08-1979
|
||||||
|
02-14-2008
|
||||||
|
07-27-2018
|
||||||
|
07-22-1989
|
||||||
|
06-17-1998
|
||||||
|
09-28-1983
|
||||||
|
02-01-2023
|
||||||
|
06-11-1972
|
||||||
|
02-28-1977
|
||||||
|
05-07-2013
|
||||||
|
06-25-1990
|
||||||
|
11-13-1994
|
||||||
|
12-28-1978
|
||||||
|
11-13-1992
|
||||||
|
03-23-2006
|
||||||
|
10-12-1984
|
||||||
|
09-09-1986
|
||||||
|
12-14-2009
|
||||||
|
11-09-2024
|
||||||
|
04-30-1973
|
||||||
|
06-14-1997
|
||||||
|
03-14-2011
|
||||||
|
09-13-2016
|
||||||
|
10-27-1999
|
||||||
|
10-20-1991
|
||||||
|
10-09-1978
|
||||||
|
07-30-1992
|
||||||
|
08-28-1992
|
||||||
|
03-07-2017
|
||||||
|
05-14-2008
|
||||||
|
02-21-1974
|
||||||
|
03-15-2007
|
||||||
|
12-13-2019
|
||||||
|
11-09-1997
|
||||||
|
12-11-1992
|
||||||
|
08-16-1993
|
||||||
|
11-20-1982
|
||||||
|
01-20-2016
|
||||||
|
04-29-2003
|
||||||
|
07-14-1974
|
||||||
|
04-01-1986
|
||||||
|
03-12-1992
|
||||||
|
06-14-2017
|
||||||
|
04-22-2007
|
||||||
|
01-28-2011
|
||||||
|
08-19-1977
|
||||||
|
04-23-2020
|
||||||
|
05-31-1973
|
||||||
|
08-17-1978
|
||||||
|
04-26-1972
|
||||||
|
12-02-2000
|
||||||
|
11-29-1974
|
||||||
|
01-30-1972
|
||||||
|
02-11-2006
|
||||||
|
11-05-2006
|
||||||
|
10-02-2016
|
||||||
|
05-04-1998
|
||||||
|
12-20-2023
|
||||||
|
05-09-2024
|
||||||
|
06-12-1986
|
||||||
|
03-17-1988
|
||||||
|
02-02-2021
|
||||||
|
01-25-1977
|
||||||
|
09-11-1970
|
||||||
|
09-25-1998
|
||||||
|
09-19-1986
|
||||||
|
11-01-1980
|
||||||
|
03-25-1988
|
||||||
|
08-01-1974
|
||||||
|
10-10-1991
|
||||||
|
07-09-1978
|
||||||
|
04-01-1970
|
||||||
|
07-07-1987
|
||||||
|
03-23-1983
|
||||||
|
07-04-2001
|
||||||
|
09-08-1985
|
||||||
|
02-22-1994
|
||||||
|
01-25-2016
|
||||||
|
01-09-2005
|
||||||
|
09-13-2015
|
||||||
|
01-30-2009
|
||||||
|
08-17-1995
|
||||||
|
02-14-1987
|
||||||
|
04-19-2010
|
||||||
|
09-11-1972
|
||||||
|
12-13-1986
|
||||||
|
02-28-2001
|
||||||
|
01-02-2001
|
||||||
|
06-25-1976
|
||||||
|
03-09-1998
|
||||||
|
10-08-2008
|
||||||
|
03-28-1981
|
||||||
|
07-21-1991
|
||||||
|
02-03-2022
|
||||||
|
01-25-1995
|
||||||
|
11-02-2007
|
||||||
|
02-20-1987
|
||||||
|
08-05-1992
|
||||||
|
10-22-2014
|
||||||
|
02-23-1996
|
||||||
|
11-07-2020
|
||||||
|
12-28-1976
|
||||||
|
04-11-2003
|
||||||
|
12-07-1984
|
||||||
|
01-11-1976
|
||||||
|
04-23-1991
|
||||||
|
04-19-1989
|
||||||
|
09-16-1998
|
||||||
|
09-11-1998
|
||||||
|
06-04-1982
|
||||||
|
09-09-1989
|
||||||
|
01-09-1983
|
||||||
|
03-25-1981
|
||||||
|
11-03-2005
|
||||||
|
02-06-1970
|
||||||
|
10-13-2011
|
||||||
|
11-04-1975
|
||||||
|
03-12-2004
|
||||||
|
03-09-1996
|
||||||
|
05-10-1998
|
||||||
|
08-16-1991
|
||||||
|
07-27-1991
|
||||||
|
05-09-1984
|
||||||
|
11-20-1989
|
||||||
|
12-23-1981
|
||||||
|
07-20-1984
|
||||||
|
11-24-1976
|
||||||
|
08-18-2010
|
||||||
|
02-03-1991
|
||||||
|
06-13-1991
|
||||||
|
11-27-1978
|
||||||
|
10-23-2023
|
||||||
|
06-06-1991
|
||||||
|
11-25-2012
|
||||||
|
02-28-1992
|
||||||
|
02-02-1979
|
||||||
|
07-27-1974
|
||||||
|
05-10-1990
|
||||||
|
05-14-2000
|
||||||
|
07-15-1988
|
||||||
|
12-25-1982
|
||||||
|
06-28-2000
|
||||||
|
09-11-1983
|
||||||
|
07-28-1978
|
||||||
|
04-23-2016
|
||||||
|
11-27-2018
|
||||||
|
06-22-2002
|
||||||
|
08-27-2004
|
||||||
|
02-06-1985
|
||||||
|
07-23-2012
|
||||||
|
10-25-1970
|
||||||
|
10-16-2016
|
||||||
|
06-15-1992
|
||||||
|
04-27-2024
|
||||||
|
11-28-1972
|
||||||
|
08-27-1970
|
||||||
|
03-19-2013
|
||||||
|
08-31-1988
|
||||||
|
08-07-1997
|
||||||
|
03-24-1984
|
||||||
|
11-10-1969
|
||||||
|
03-04-1989
|
||||||
|
04-23-2009
|
||||||
|
02-16-2020
|
||||||
|
12-18-1984
|
||||||
|
08-25-1988
|
||||||
|
02-08-1993
|
||||||
|
08-19-1989
|
||||||
|
09-02-1996
|
||||||
|
01-21-2020
|
||||||
|
01-27-1975
|
||||||
|
12-08-1973
|
||||||
|
02-22-1977
|
||||||
|
04-28-2006
|
||||||
|
11-24-2008
|
||||||
|
03-23-1971
|
||||||
|
09-26-2014
|
||||||
|
07-17-2019
|
||||||
|
05-09-2000
|
||||||
|
07-10-2008
|
||||||
|
08-27-1983
|
||||||
|
09-20-1972
|
||||||
|
12-09-1993
|
||||||
|
03-26-2004
|
||||||
|
06-13-1979
|
||||||
|
06-02-1977
|
||||||
|
03-20-2024
|
||||||
|
06-29-2000
|
||||||
|
09-19-1995
|
||||||
|
10-06-2020
|
||||||
|
04-18-1997
|
||||||
|
11-16-1997
|
||||||
|
10-28-1999
|
||||||
|
07-20-2006
|
||||||
|
01-20-2017
|
||||||
|
12-27-2016
|
||||||
|
07-05-2004
|
||||||
|
05-19-2013
|
||||||
|
12-03-1976
|
||||||
|
06-21-2012
|
||||||
|
06-23-2019
|
||||||
|
01-14-2019
|
||||||
|
09-21-2002
|
||||||
|
03-13-2004
|
||||||
|
07-28-1970
|
||||||
|
06-24-1989
|
||||||
|
11-21-2018
|
||||||
|
11-06-2023
|
||||||
|
04-21-1994
|
||||||
|
10-12-2001
|
||||||
|
07-24-2005
|
||||||
|
10-01-1984
|
||||||
|
10-17-1969
|
||||||
|
04-02-1994
|
||||||
|
10-19-2013
|
||||||
|
02-12-2003
|
||||||
|
01-16-2015
|
||||||
|
10-03-2000
|
||||||
|
06-15-1990
|
||||||
|
02-01-2013
|
||||||
|
09-15-1974
|
||||||
|
02-27-2015
|
||||||
|
08-11-2021
|
||||||
|
01-17-1987
|
||||||
|
09-02-2004
|
||||||
|
02-15-1988
|
||||||
|
01-24-1991
|
||||||
|
10-17-2022
|
||||||
|
12-19-2012
|
||||||
|
09-01-2006
|
||||||
|
06-04-1979
|
||||||
|
01-21-1989
|
||||||
|
11-14-1991
|
||||||
|
09-03-2008
|
||||||
|
07-13-2020
|
||||||
|
07-22-2018
|
||||||
|
05-06-1970
|
||||||
|
03-21-1976
|
||||||
|
04-25-1992
|
||||||
|
06-15-2003
|
||||||
|
08-31-2015
|
||||||
|
07-19-1977
|
||||||
|
10-30-2003
|
||||||
|
06-10-2013
|
||||||
|
10-05-2015
|
||||||
|
09-23-2000
|
||||||
|
12-27-1992
|
||||||
|
11-18-1981
|
||||||
|
07-10-1989
|
||||||
|
09-19-2015
|
||||||
|
12-31-1978
|
||||||
|
07-20-2001
|
||||||
|
10-16-1992
|
||||||
|
02-23-1988
|
||||||
|
03-10-2016
|
||||||
|
11-15-1969
|
||||||
|
07-16-2013
|
||||||
|
09-12-1989
|
||||||
|
09-06-1983
|
||||||
|
05-13-1979
|
||||||
|
11-14-1993
|
||||||
|
04-15-1991
|
||||||
|
02-22-1992
|
||||||
|
09-19-2013
|
||||||
|
09-15-1994
|
||||||
|
08-18-1993
|
||||||
|
09-11-1998
|
||||||
|
03-02-2016
|
||||||
|
07-18-2012
|
||||||
|
01-25-2005
|
||||||
|
06-14-1983
|
||||||
|
11-03-1992
|
||||||
|
11-27-1978
|
||||||
|
08-13-1999
|
||||||
|
03-21-1987
|
||||||
|
06-12-2014
|
||||||
|
07-19-1987
|
||||||
|
03-15-2021
|
||||||
|
10-27-1992
|
||||||
|
12-11-1990
|
||||||
|
12-04-2017
|
||||||
|
07-29-1979
|
||||||
|
10-24-1979
|
||||||
|
09-05-1984
|
||||||
|
03-08-2000
|
||||||
|
11-01-1993
|
||||||
|
05-22-2002
|
||||||
|
11-19-1985
|
||||||
|
01-29-2004
|
||||||
|
05-02-2008
|
||||||
|
03-20-1980
|
||||||
|
05-10-1990
|
||||||
|
10-26-1995
|
||||||
|
01-21-2011
|
||||||
|
03-07-1975
|
||||||
|
07-13-2000
|
||||||
|
12-05-1986
|
||||||
|
06-12-1982
|
||||||
|
09-21-1980
|
||||||
|
08-06-2010
|
||||||
|
07-30-1974
|
||||||
|
12-14-1980
|
||||||
|
03-22-1995
|
||||||
|
04-15-1972
|
||||||
|
05-09-1988
|
||||||
|
08-25-2007
|
||||||
|
01-18-1990
|
||||||
|
11-14-1999
|
||||||
|
01-17-1980
|
||||||
|
07-24-1976
|
||||||
|
07-08-1982
|
||||||
|
05-14-1985
|
||||||
|
10-10-2018
|
||||||
|
03-03-1984
|
||||||
|
12-08-1989
|
||||||
|
09-19-2020
|
||||||
|
07-06-1982
|
||||||
|
06-25-2015
|
||||||
|
01-25-2001
|
||||||
|
03-07-1988
|
||||||
|
11-17-1987
|
||||||
|
10-29-1991
|
||||||
|
03-31-2020
|
||||||
|
11-08-2001
|
||||||
|
04-25-2002
|
||||||
|
12-26-1992
|
||||||
|
01-28-2019
|
||||||
|
07-03-1972
|
||||||
|
01-04-2024
|
||||||
|
02-07-2009
|
||||||
|
09-28-2010
|
||||||
|
08-04-2015
|
||||||
|
06-18-2016
|
||||||
|
11-23-2018
|
||||||
|
05-26-2004
|
||||||
|
10-14-2001
|
||||||
|
08-10-1997
|
||||||
|
01-16-1970
|
||||||
|
10-19-2007
|
||||||
|
10-14-2005
|
||||||
|
05-14-2009
|
||||||
|
09-22-2010
|
||||||
|
05-11-1985
|
||||||
|
11-21-1995
|
||||||
|
09-21-2020
|
||||||
|
07-03-1991
|
||||||
|
01-11-1985
|
||||||
|
02-06-1993
|
||||||
|
09-03-2007
|
||||||
|
05-19-1973
|
||||||
|
04-02-1973
|
||||||
|
07-18-2021
|
||||||
|
05-06-1970
|
||||||
|
06-30-1980
|
||||||
|
12-26-1991
|
||||||
|
05-20-1995
|
||||||
|
05-12-1998
|
||||||
|
03-02-1970
|
||||||
|
09-03-2002
|
||||||
|
08-19-1987
|
||||||
|
01-03-2004
|
||||||
|
09-30-2005
|
||||||
|
12-30-1985
|
||||||
|
12-20-1992
|
||||||
|
04-04-2008
|
||||||
|
01-08-1986
|
||||||
|
01-28-2011
|
||||||
|
10-10-2010
|
||||||
|
12-21-2003
|
||||||
|
04-02-2004
|
||||||
|
07-07-1994
|
||||||
|
07-05-1984
|
||||||
|
10-08-1995
|
||||||
|
11-27-1979
|
||||||
|
10-31-2020
|
||||||
|
03-01-2004
|
||||||
|
06-27-1972
|
||||||
|
08-15-1975
|
||||||
|
01-10-1996
|
||||||
|
12-08-2012
|
||||||
|
01-14-2018
|
||||||
|
10-09-1982
|
||||||
|
03-19-1996
|
||||||
|
01-20-1994
|
||||||
|
09-17-1990
|
||||||
|
12-16-1971
|
||||||
|
08-25-1984
|
||||||
|
08-18-2020
|
||||||
|
02-04-1987
|
||||||
|
05-11-1975
|
||||||
|
05-14-1970
|
||||||
|
12-02-1994
|
||||||
|
10-11-1999
|
||||||
|
04-29-2013
|
||||||
|
08-09-2006
|
||||||
|
12-06-2023
|
||||||
|
07-20-2007
|
||||||
|
06-21-1987
|
||||||
|
10-22-1985
|
||||||
|
05-27-1980
|
||||||
|
01-15-2000
|
||||||
|
08-04-2010
|
||||||
|
03-08-2008
|
||||||
|
11-14-1974
|
||||||
|
04-06-1995
|
||||||
|
09-30-2006
|
||||||
|
12-10-1974
|
||||||
|
10-21-2008
|
||||||
|
01-24-1981
|
||||||
|
09-17-1975
|
||||||
|
10-15-2009
|
||||||
|
07-01-2019
|
||||||
|
01-11-1990
|
||||||
|
11-03-2005
|
||||||
|
06-27-2000
|
||||||
|
01-14-2015
|
||||||
|
09-11-2024
|
||||||
|
04-30-1997
|
||||||
|
10-07-2015
|
||||||
|
04-01-1976
|
||||||
|
12-08-1990
|
||||||
|
01-14-2019
|
||||||
|
12-27-1997
|
||||||
|
07-12-1981
|
||||||
|
05-25-2005
|
||||||
|
04-03-1985
|
||||||
|
09-30-1992
|
||||||
|
04-17-1983
|
||||||
|
01-17-2003
|
||||||
|
09-29-2017
|
||||||
|
06-02-1975
|
||||||
|
01-19-2006
|
||||||
|
07-07-1990
|
||||||
|
01-30-1972
|
||||||
|
11-07-1995
|
||||||
|
02-07-1994
|
||||||
|
09-28-2023
|
||||||
|
01-24-1980
|
||||||
|
03-19-1987
|
||||||
|
09-08-2013
|
||||||
|
11-05-2013
|
||||||
|
05-20-2014
|
||||||
|
01-16-2018
|
||||||
|
03-25-2012
|
||||||
|
08-27-1972
|
||||||
|
05-17-1976
|
||||||
|
05-20-2009
|
||||||
|
04-30-2014
|
||||||
|
08-25-2014
|
||||||
|
02-17-2024
|
||||||
|
07-30-1977
|
||||||
|
09-18-2022
|
||||||
|
07-24-1979
|
||||||
|
10-06-2020
|
||||||
|
11-15-1974
|
||||||
|
01-25-2019
|
||||||
|
05-19-1988
|
||||||
|
11-14-1978
|
||||||
|
04-06-2012
|
||||||
|
11-18-1981
|
||||||
|
01-06-1982
|
||||||
|
05-08-1995
|
||||||
|
07-12-2006
|
||||||
|
03-01-1970
|
||||||
|
12-05-1987
|
||||||
|
01-14-2005
|
||||||
|
09-25-1978
|
||||||
|
05-09-1997
|
||||||
|
09-11-1998
|
||||||
|
02-03-1990
|
||||||
|
05-28-1990
|
||||||
|
03-26-1999
|
||||||
|
02-17-2000
|
||||||
|
07-19-2007
|
||||||
|
02-29-1992
|
||||||
|
11-07-2004
|
||||||
|
04-24-2017
|
||||||
|
03-15-2010
|
||||||
|
11-21-2020
|
||||||
|
10-22-2003
|
||||||
|
02-03-1983
|
||||||
|
02-26-1971
|
||||||
|
09-19-1996
|
||||||
|
08-10-1974
|
||||||
|
10-25-2003
|
||||||
|
12-04-2019
|
||||||
|
07-12-2004
|
||||||
|
05-29-1997
|
||||||
|
12-18-1980
|
||||||
|
06-25-1999
|
||||||
|
10-13-1993
|
||||||
|
06-01-1977
|
||||||
|
09-14-1983
|
||||||
|
01-14-1979
|
||||||
|
07-20-2017
|
||||||
|
01-14-1993
|
||||||
|
09-29-2017
|
||||||
|
01-25-1980
|
||||||
|
09-01-1997
|
||||||
|
09-30-1989
|
||||||
|
01-20-1993
|
||||||
|
12-16-1997
|
||||||
|
11-14-1977
|
||||||
|
08-21-2005
|
||||||
|
11-18-2000
|
||||||
|
12-21-1987
|
||||||
|
04-23-1999
|
||||||
|
12-10-1986
|
||||||
|
08-01-1995
|
||||||
|
03-19-1988
|
||||||
|
08-25-1984
|
||||||
|
09-10-2008
|
||||||
|
09-15-1990
|
||||||
|
08-05-2002
|
||||||
|
02-17-2024
|
||||||
|
02-17-1972
|
||||||
|
01-09-1997
|
||||||
|
09-14-2004
|
||||||
|
10-13-2000
|
||||||
|
08-25-2019
|
||||||
|
06-13-1993
|
||||||
|
09-29-1987
|
||||||
|
06-07-2003
|
||||||
|
02-14-1986
|
||||||
|
10-01-1971
|
||||||
|
08-01-1975
|
||||||
|
03-17-2024
|
||||||
|
03-16-2009
|
||||||
|
07-28-1998
|
||||||
|
02-01-1995
|
||||||
|
02-25-2001
|
||||||
|
05-30-1998
|
||||||
|
11-10-1998
|
||||||
|
02-11-1983
|
||||||
|
04-08-1976
|
||||||
|
03-08-1970
|
||||||
|
02-10-2003
|
||||||
|
11-27-2020
|
||||||
|
03-25-2020
|
||||||
|
07-17-2015
|
||||||
|
05-31-1992
|
||||||
|
11-21-1969
|
||||||
|
05-31-2022
|
||||||
|
06-09-1984
|
||||||
|
06-15-2014
|
||||||
|
07-23-1994
|
||||||
|
01-29-1985
|
||||||
|
10-26-2015
|
||||||
|
04-21-2012
|
||||||
|
07-07-1972
|
||||||
|
02-12-2007
|
||||||
|
10-23-1996
|
||||||
|
05-20-1991
|
||||||
|
07-06-2003
|
||||||
|
12-06-1975
|
||||||
|
06-13-2009
|
||||||
|
09-17-2010
|
||||||
|
11-02-2022
|
||||||
|
03-07-1996
|
||||||
|
11-03-1995
|
||||||
|
02-15-1993
|
||||||
|
08-23-1995
|
||||||
|
11-14-1982
|
||||||
|
02-13-1973
|
||||||
|
12-29-1979
|
||||||
|
03-29-2005
|
||||||
|
09-30-1970
|
||||||
|
02-27-1982
|
||||||
|
09-14-2017
|
||||||
|
05-22-2020
|
||||||
|
09-09-1986
|
||||||
|
08-31-2008
|
||||||
|
04-07-1996
|
||||||
|
05-09-1971
|
||||||
|
01-07-1986
|
||||||
|
08-01-1979
|
||||||
|
01-04-2021
|
||||||
|
02-25-1975
|
||||||
|
01-27-1981
|
||||||
|
04-13-2015
|
||||||
|
12-10-1981
|
||||||
|
11-30-1989
|
||||||
|
10-13-2006
|
||||||
|
06-27-1990
|
||||||
|
06-01-1996
|
||||||
|
09-18-1991
|
||||||
|
07-16-2019
|
||||||
|
03-31-2013
|
||||||
|
04-02-1970
|
||||||
|
02-09-1998
|
||||||
|
07-26-1986
|
||||||
|
04-07-1976
|
||||||
|
08-13-1989
|
||||||
|
12-30-2015
|
||||||
|
04-04-2003
|
||||||
|
08-26-1991
|
||||||
|
03-06-1992
|
||||||
|
01-27-1987
|
||||||
|
02-04-1986
|
||||||
|
01-20-1999
|
||||||
|
04-13-1980
|
||||||
|
08-26-1992
|
||||||
|
06-05-2011
|
||||||
|
07-12-1990
|
||||||
|
03-29-1971
|
||||||
|
09-11-2016
|
||||||
|
05-16-1992
|
||||||
|
09-17-2022
|
||||||
|
09-05-2018
|
||||||
|
12-06-1986
|
||||||
|
11-10-1969
|
||||||
|
06-09-2018
|
||||||
|
12-04-1999
|
||||||
|
01-15-1997
|
||||||
|
03-17-2021
|
||||||
|
01-04-1990
|
||||||
|
12-04-1987
|
||||||
|
08-06-2019
|
||||||
|
03-17-2014
|
||||||
|
11-16-1980
|
||||||
|
01-26-2021
|
||||||
|
08-14-2000
|
||||||
|
05-13-1975
|
||||||
|
10-05-2011
|
||||||
|
11-17-2020
|
||||||
|
10-01-1971
|
||||||
|
10-05-1987
|
||||||
|
11-06-1973
|
||||||
|
04-23-1995
|
||||||
|
12-16-1996
|
||||||
|
12-20-1985
|
||||||
|
08-15-1980
|
||||||
|
07-21-1995
|
||||||
|
05-06-1998
|
||||||
|
06-25-1996
|
||||||
|
08-01-1988
|
||||||
|
10-22-1999
|
||||||
|
12-31-2023
|
||||||
|
03-06-1975
|
||||||
|
10-19-2000
|
||||||
|
11-07-1989
|
||||||
|
07-17-1980
|
||||||
|
02-25-2018
|
||||||
|
05-02-1993
|
||||||
|
03-12-2007
|
||||||
|
12-27-1972
|
||||||
|
06-29-2008
|
||||||
|
04-04-2016
|
||||||
|
06-18-2020
|
||||||
|
10-21-1975
|
||||||
|
11-05-2009
|
||||||
|
01-04-2010
|
||||||
|
12-19-1976
|
||||||
|
05-03-1992
|
||||||
|
08-11-1977
|
||||||
|
01-28-1984
|
||||||
|
06-01-2004
|
||||||
|
04-07-1990
|
||||||
|
04-23-1995
|
||||||
|
07-20-2011
|
||||||
|
01-26-2004
|
||||||
|
10-20-1997
|
||||||
|
04-04-1989
|
||||||
|
02-27-2015
|
||||||
|
02-26-2021
|
||||||
|
11-30-2000
|
||||||
|
06-23-2018
|
||||||
|
10-05-2007
|
||||||
|
10-19-1975
|
||||||
|
07-08-2013
|
||||||
|
09-30-2011
|
||||||
|
08-27-1991
|
||||||
|
03-04-1999
|
||||||
|
03-17-2001
|
||||||
|
09-18-1997
|
||||||
|
12-13-2014
|
||||||
|
04-15-2024
|
||||||
|
11-26-2009
|
||||||
|
10-22-2000
|
||||||
|
01-24-2014
|
||||||
|
10-30-1993
|
||||||
|
09-22-2016
|
||||||
|
11-06-1969
|
||||||
|
07-28-1995
|
||||||
|
12-26-1995
|
||||||
|
10-23-2005
|
||||||
|
02-20-1988
|
||||||
|
09-12-1983
|
||||||
|
08-01-2023
|
||||||
|
02-20-1988
|
||||||
|
09-19-2022
|
||||||
|
04-01-1998
|
||||||
|
04-10-1988
|
||||||
|
10-30-1989
|
||||||
|
12-06-1990
|
||||||
|
09-28-2022
|
||||||
|
06-28-1980
|
||||||
|
03-20-1987
|
||||||
|
05-21-1971
|
||||||
|
12-18-1986
|
||||||
|
06-15-1990
|
||||||
|
07-08-1972
|
||||||
|
12-26-1989
|
||||||
|
03-08-1978
|
||||||
|
06-29-1980
|
||||||
|
02-27-2011
|
||||||
|
08-15-2017
|
||||||
|
08-22-2007
|
||||||
|
08-19-1992
|
||||||
|
10-05-2016
|
||||||
|
09-18-2004
|
||||||
|
11-15-1971
|
||||||
|
02-13-2000
|
||||||
|
01-31-1989
|
||||||
|
03-22-1974
|
||||||
|
06-26-2021
|
||||||
|
07-19-1999
|
||||||
|
02-11-2003
|
||||||
|
08-12-2021
|
||||||
|
08-08-2011
|
||||||
|
12-15-2023
|
||||||
|
05-18-2014
|
||||||
|
10-28-2018
|
||||||
|
11-14-1996
|
||||||
|
12-03-2019
|
||||||
|
09-11-2001
|
||||||
|
08-28-2010
|
||||||
|
06-16-2014
|
||||||
|
01-13-2004
|
||||||
|
04-07-1981
|
||||||
|
02-14-2016
|
||||||
|
01-03-2022
|
||||||
|
06-06-2013
|
||||||
|
02-09-2023
|
||||||
|
04-11-1986
|
||||||
|
03-21-1979
|
||||||
|
12-25-1990
|
||||||
|
02-17-2020
|
||||||
|
09-18-2002
|
||||||
|
09-23-2010
|
||||||
|
11-21-1996
|
||||||
|
01-31-1980
|
||||||
|
01-27-2000
|
||||||
|
01-27-1988
|
|
1
PostgreSQL/.csv/link_tool
Normal file
1
PostgreSQL/.csv/link_tool
Normal file
@ -0,0 +1 @@
|
|||||||
|
https://mockaroo.com/
|
893
PostgreSQL/.csv/name_models.csv
Normal file
893
PostgreSQL/.csv/name_models.csv
Normal file
@ -0,0 +1,893 @@
|
|||||||
|
Ninjago: Book of Adventures
|
||||||
|
Gears
|
||||||
|
Town Mini-Figures
|
||||||
|
Castle 2 for 1 Bonus Offer
|
||||||
|
Space Mini-Figures
|
||||||
|
Space Mini-Figures
|
||||||
|
Space Mini-Figures
|
||||||
|
Space Mini-Figures
|
||||||
|
Castle Mini Figures
|
||||||
|
4.5V Samsonite Gears Motor Set
|
||||||
|
Legend of Chima: Corbeaux et Gorilles
|
||||||
|
Master Mechanic Set
|
||||||
|
Master Builder Set
|
||||||
|
Basic Building Set in Cardboard
|
||||||
|
Discovery Set
|
||||||
|
Special Offer
|
||||||
|
Basic Building Set in Cardboard
|
||||||
|
Pre-School Set
|
||||||
|
Basic Building Set
|
||||||
|
The Majestic Horse
|
||||||
|
Chain Links
|
||||||
|
Basic Building Set
|
||||||
|
Bulldozer Chain Links
|
||||||
|
Extra Large Tires & Hubs
|
||||||
|
Wheel Set
|
||||||
|
Digger Bucket Assembly
|
||||||
|
Basic Building Set
|
||||||
|
Doll Furniture
|
||||||
|
Ninjago: Build Your Own Adventure
|
||||||
|
Star Wars: Build Your Own Adventure: Galactic Missions
|
||||||
|
Nursery Furniture
|
||||||
|
Building Set
|
||||||
|
The Race to Build It Board Game
|
||||||
|
Doors and Fences
|
||||||
|
Living Room
|
||||||
|
Farm Animals
|
||||||
|
Basic Building Set
|
||||||
|
Propellers and Wheels
|
||||||
|
Pre-School Beginners Set
|
||||||
|
Playhouse
|
||||||
|
Jumbo Brick Pull Toy
|
||||||
|
Basic Building Set
|
||||||
|
Jumbo Bricks
|
||||||
|
Farm
|
||||||
|
Assorted Clear Bricks & Plates
|
||||||
|
Gates and Fences
|
||||||
|
Windows / Doors & Trees / Bushes
|
||||||
|
Lighting Device Pack
|
||||||
|
Hinges
|
||||||
|
Assorted Basic Bricks - Red
|
||||||
|
Assorted Basic Bricks - White
|
||||||
|
Assorted Basic Bricks - Blue
|
||||||
|
Assorted Basic Bricks - Yellow
|
||||||
|
Trees & Bushes
|
||||||
|
Basic Building Set
|
||||||
|
Large Wheels
|
||||||
|
Small Wheels
|
||||||
|
Assorted White Plates
|
||||||
|
Jumbo Brick School Set
|
||||||
|
Motor Wires
|
||||||
|
Five Large Base Plates - Green
|
||||||
|
Five Large Base Plates - White
|
||||||
|
Five Large Base Plates - Blue
|
||||||
|
Ducks
|
||||||
|
Two Garage Door Kits
|
||||||
|
Basic Building Set
|
||||||
|
Governor Set
|
||||||
|
Battery Box
|
||||||
|
Block Box
|
||||||
|
Pre-School Set
|
||||||
|
Pre-School Set
|
||||||
|
The Ultimate LEGO Book
|
||||||
|
Atlantis: Brickmaster
|
||||||
|
Pirates: Brickmaster
|
||||||
|
Ninjago: Brickmaster
|
||||||
|
Harry Potter: Characters of the Magical World
|
||||||
|
Pre-School Set
|
||||||
|
Roadway Base Plate
|
||||||
|
Basic Building Set with Train
|
||||||
|
Ambassador Set
|
||||||
|
Police Station
|
||||||
|
4.5V Replacement Motor
|
||||||
|
Legoville
|
||||||
|
Racer
|
||||||
|
Tub Boat
|
||||||
|
Star Wars Battle Bridge storage case
|
||||||
|
Super Set
|
||||||
|
Trees & Flowers
|
||||||
|
Guarded Inn
|
||||||
|
Jurassic World - PC DVD
|
||||||
|
Mosaic Set
|
||||||
|
Metroliner
|
||||||
|
Railroad Club Car
|
||||||
|
Harry Potter: Years 5-7 - PS Vita
|
||||||
|
1 x 2 Sand Red Bricks
|
||||||
|
Batman the Videogame - PSP
|
||||||
|
2 x 2 Sand Red Bricks
|
||||||
|
Marvel Super Heroes - PS4
|
||||||
|
2 x 4 Sand Red Bricks
|
||||||
|
Jurassic World - Xbox One
|
||||||
|
Jurassic World - PS Vita
|
||||||
|
Marvel Avengers - Xbox One
|
||||||
|
Marvel Avengers - PS4
|
||||||
|
Marvel Avengers - PS Vita
|
||||||
|
Marvel Super Heroes - Xbox One
|
||||||
|
Marvel Avengers - PC
|
||||||
|
Star Wars: The Force Awakens - 3DS
|
||||||
|
Star Wars: The Force Awakens - PS Vita
|
||||||
|
Star Wars: The Force Awakens Deluxe Edition - PS3
|
||||||
|
Star Wars: The Force Awakens - PS3
|
||||||
|
1 x 6 Sand Red Bricks
|
||||||
|
Harry Potter Collection - PS4
|
||||||
|
Marvel Super Heroes 2 - Xbox One
|
||||||
|
Marvel Super Heroes 2 - PS4
|
||||||
|
Marvel Super Heroes 2 - Nintendo Switch
|
||||||
|
The Incredibles - Nintendo Switch
|
||||||
|
The Incredibles - PS4
|
||||||
|
DC Super-Villains - Nintendo Switch
|
||||||
|
DC Super-Villains - PS4
|
||||||
|
The Incredibles - Xbox One
|
||||||
|
2 x 4 Sand Red Ridge Roof Tiles Steep Slope
|
||||||
|
Harry Potter Collection - Xbox One
|
||||||
|
Harry Potter Collection - Nintendo Switch
|
||||||
|
The LEGO Movie 2 Videogame - Nintendo Switch
|
||||||
|
The LEGO Movie 2 Videogame - PS4
|
||||||
|
The LEGO Movie 2 Videogame - Xbox One
|
||||||
|
Jurassic World - Nintendo Switch
|
||||||
|
2 x 4 Roof Tile Sand Red
|
||||||
|
Assorted Blue Bricks
|
||||||
|
Assorted Yellow Bricks
|
||||||
|
Assorted Blue Plates
|
||||||
|
Assorted Yellow Plates
|
||||||
|
Open Freight Wagon
|
||||||
|
Caboose
|
||||||
|
Passenger Wagon
|
||||||
|
Tanker
|
||||||
|
Hopper Wagon
|
||||||
|
Darth Maul
|
||||||
|
Rebel Blockade Runner
|
||||||
|
Santa Fe Super Chief
|
||||||
|
Santa Fe Super Chief - Limited Edition
|
||||||
|
U.S.S. Constellation
|
||||||
|
Master Builder Set
|
||||||
|
Red Baron
|
||||||
|
Naboo Starfighter
|
||||||
|
Train Engine Shed
|
||||||
|
Lunar Lander
|
||||||
|
Ninjago Lloyd Backpack
|
||||||
|
Nexo Knights Backpack
|
||||||
|
Imperial Star Destroyer
|
||||||
|
Friends Backpack
|
||||||
|
Ninjago Green Lloyd Junior Backpack
|
||||||
|
Ninjago Prime Empire Junior Backpack
|
||||||
|
Mermaid Junior Backpack
|
||||||
|
Nexo Knights Shoulder Bag
|
||||||
|
Friends Juice Bar Shoulder Bag
|
||||||
|
Friend Pencil Case
|
||||||
|
Ninjago Lloyd Gym Bag
|
||||||
|
Star Wars The Dark Side Darth Vader Gym Bag
|
||||||
|
Star Wars Stormtrooper Gym Bag
|
||||||
|
Friends Pink Gym Bag
|
||||||
|
Ninjago Dragon Master Gym Bag
|
||||||
|
Ninjago Green Lloyd Gym Bag
|
||||||
|
Purple Gym Bag
|
||||||
|
Navy Gym Bag
|
||||||
|
Ninjago Kai Backpack Trolley
|
||||||
|
Ninjago Lloyd Backpack Trolley
|
||||||
|
Nexo Knights Backpack Trolley
|
||||||
|
Friends Funpark Backpack Trolley
|
||||||
|
Pizza To Go
|
||||||
|
Breezeway Cafe
|
||||||
|
Black Seas Barracuda
|
||||||
|
Main Street
|
||||||
|
American Flag
|
||||||
|
2x2 Electrical Plate
|
||||||
|
Windows and Doors
|
||||||
|
Pillars and Beams
|
||||||
|
City Police Backpack Trolley
|
||||||
|
Ninjago Urban Backpack Trolley
|
||||||
|
Friends Girls Rock Backpack Trolley
|
||||||
|
Friends Hearts Backpack Trolley
|
||||||
|
Brown Tiles
|
||||||
|
Light Gray Arches
|
||||||
|
Small Wheels and Axles
|
||||||
|
Large Wheels and Axles
|
||||||
|
Gray Fences
|
||||||
|
Star Wars Stormtrooper Pencil Case
|
||||||
|
Ninjago Lloyd Energy Pencil Case
|
||||||
|
Ninjago Green Lloyd Pencil Case
|
||||||
|
Purple Pencil Case
|
||||||
|
Parrot Pencil Case
|
||||||
|
Violet Pencil Case
|
||||||
|
Navy Pencil Case
|
||||||
|
Transparent Bricks
|
||||||
|
Ninjago Spinjitzu Jay Pencil Case
|
||||||
|
Ninjago Green Lloyd Pencil Case
|
||||||
|
Purple Pencil Case
|
||||||
|
Navy Pencil Case
|
||||||
|
Black Slopes 33
|
||||||
|
Black Slopes 33 3 x 2 and 3 x 4
|
||||||
|
Black Slopes 33 3 x 1 and 3 x 3
|
||||||
|
White Plates 2 x n
|
||||||
|
Black Plates 2 x n
|
||||||
|
Red Plates 2 x n
|
||||||
|
Dark Green Plates 2 x n
|
||||||
|
Light Gray Plates 2 x n
|
||||||
|
Duplo Bib
|
||||||
|
Black Plates 1 x n
|
||||||
|
Red Plates 1 x n
|
||||||
|
Green Plates 1 x n
|
||||||
|
Light Gray Plates 1 x n
|
||||||
|
White Plates 1 x n
|
||||||
|
Castle Accessories
|
||||||
|
Mini-Fig Headgear
|
||||||
|
Santa Claus
|
||||||
|
Christmas Tree
|
||||||
|
Reindeer
|
||||||
|
Mr. Bunny
|
||||||
|
TECHNIC Beams
|
||||||
|
Ninjago Green Lloyd Backpack
|
||||||
|
Stars Backpack
|
||||||
|
Purple Backpack
|
||||||
|
Navy Backpack
|
||||||
|
Bushes
|
||||||
|
Cross Axles
|
||||||
|
Spider-Man Action Pack
|
||||||
|
TECHNIC Gear Wheels
|
||||||
|
TECHNIC Motor
|
||||||
|
Train Connection Wire
|
||||||
|
Snowman
|
||||||
|
Angel
|
||||||
|
Birthday Pack Heart
|
||||||
|
Ninjago Green Lloyd Backpack Trolley
|
||||||
|
Ninjago Golden Lloyd Backpack Trolley
|
||||||
|
Birthday Pack Daisy
|
||||||
|
Birthday Pack Star
|
||||||
|
90 Years of Play Metal Key Chain
|
||||||
|
Turkey
|
||||||
|
100 LEGO Stores North America
|
||||||
|
Universal Building Set
|
||||||
|
Ninjago Kai Lunch Bag
|
||||||
|
Ninjago Lloyd Lunch Bag
|
||||||
|
Ninjago Cole Lunch Bag
|
||||||
|
Ninjago Jay Lunch Bag
|
||||||
|
City Citizens Wallet
|
||||||
|
Ninjago Into the Unknown Wallet
|
||||||
|
Ninjago Kai Pencil Case
|
||||||
|
Ninjago Jay Pencil Case
|
||||||
|
Friends Hearts Pencil Case
|
||||||
|
Ninjago Into the Unknown Pencil Case
|
||||||
|
City Race Pencil Case
|
||||||
|
City Citizens Gym Bag
|
||||||
|
Snowflake
|
||||||
|
4.5V Battery Case
|
||||||
|
Number/Symbol Blocks
|
||||||
|
Foliferous Tree
|
||||||
|
Bush
|
||||||
|
Cypress Trees
|
||||||
|
2 x 2 Sand Red Roof Tiles
|
||||||
|
Jumper Bricks
|
||||||
|
Accessories Heart
|
||||||
|
Accessories Daisy
|
||||||
|
Accessories Star
|
||||||
|
Imagination Set 1
|
||||||
|
Mosaic Set
|
||||||
|
NBA Basketball Teams
|
||||||
|
Cloud City
|
||||||
|
Wright Flyer
|
||||||
|
NHL Action Set with Stickers
|
||||||
|
Train Level Crossing
|
||||||
|
Train Level Crossing
|
||||||
|
Rebel Snowspeeder
|
||||||
|
4.5V Battery Case
|
||||||
|
TIE Fighter Collection
|
||||||
|
Motorized Hogwarts Express
|
||||||
|
Burlington Northern Santa Fe Locomotive
|
||||||
|
Y-wing Attack Starfighter
|
||||||
|
Holiday Decoration Kit
|
||||||
|
Universal Joints
|
||||||
|
Mosaic Set - Domestic Animals
|
||||||
|
Death Star II
|
||||||
|
Sandcrawler
|
||||||
|
Assorted Light Gray Bricks
|
||||||
|
Assorted Dark Gray Bricks
|
||||||
|
Assorted Brown Bricks
|
||||||
|
Assorted Light Gray Plates
|
||||||
|
Assorted Dark Gray Plates
|
||||||
|
Assorted Brown Plates
|
||||||
|
Letters Large
|
||||||
|
Hot Rod
|
||||||
|
Maersk Sealand Container Ship 2004 Edition
|
||||||
|
Maersk Sealand Container Ship 2005 Edition
|
||||||
|
Maersk Line Container Ship 2006 Edition
|
||||||
|
Maersk Line Container Ship 2010 Edition
|
||||||
|
LEGO Truck
|
||||||
|
High Speed Train Locomotive
|
||||||
|
High Speed Train Car
|
||||||
|
City Airport
|
||||||
|
Black Ridge Roof Tiles
|
||||||
|
Letter Bricks for Wall Board
|
||||||
|
Black Roof Tiles
|
||||||
|
Red Ridge Tiles
|
||||||
|
Red Roof Tiles
|
||||||
|
Elf Boy
|
||||||
|
Elf Girl
|
||||||
|
Brickmaster Welcome Kit
|
||||||
|
Mrs. Bunny
|
||||||
|
Chicken & Chicks
|
||||||
|
TTX Intermodal Double-Stack Car
|
||||||
|
Letter Bricks for Wall Board
|
||||||
|
Holiday Train
|
||||||
|
Imperial AT-ST
|
||||||
|
Boeing 787 Dreamliner
|
||||||
|
Motorized Walking AT-AT
|
||||||
|
Millennium Falcon
|
||||||
|
Letters
|
||||||
|
Eiffel Tower 1:300
|
||||||
|
Cafe Corner
|
||||||
|
Hobby Train
|
||||||
|
Town Plan
|
||||||
|
Green Grocer
|
||||||
|
General Grievous
|
||||||
|
Volkswagen Beetle
|
||||||
|
Death Star
|
||||||
|
Taj Mahal
|
||||||
|
Market Street
|
||||||
|
Mosaic Set - Lion
|
||||||
|
Star Justice
|
||||||
|
Space Skulls
|
||||||
|
Medieval Market Village
|
||||||
|
Emerald Night
|
||||||
|
Republic Dropship with AT-OT
|
||||||
|
Grand Carousel
|
||||||
|
Fire Brigade
|
||||||
|
Tantive IV
|
||||||
|
Winter Toy Shop
|
||||||
|
Tree and Signs
|
||||||
|
Custom Car Garage
|
||||||
|
Basic Bricks
|
||||||
|
Takutanuva
|
||||||
|
Ultimate Dume
|
||||||
|
Voporak
|
||||||
|
Vezon & Kardas
|
||||||
|
Locomotive
|
||||||
|
4.5V Motor Set
|
||||||
|
Imperial Flagship
|
||||||
|
Basic Vehicles
|
||||||
|
Grand Emporium
|
||||||
|
Imperial Shuttle
|
||||||
|
Shuttle Adventure
|
||||||
|
Supplemental Pack for Shuttle Adventure Set 10213
|
||||||
|
Tower Bridge
|
||||||
|
Winter Village Bakery
|
||||||
|
Diagon Alley
|
||||||
|
Pet Shop
|
||||||
|
Maersk Container Train
|
||||||
|
Imagination Basic Set 2
|
||||||
|
Volkswagen T1 Camper Van
|
||||||
|
Mini Basic Bricks
|
||||||
|
Super Star Destroyer
|
||||||
|
Winter Village Post Office
|
||||||
|
Kingdoms Joust
|
||||||
|
Town Hall
|
||||||
|
R2-D2
|
||||||
|
Sopwith Camel
|
||||||
|
B-wing Starfighter
|
||||||
|
Haunted House
|
||||||
|
Winter Village Cottage
|
||||||
|
Super Value Set
|
||||||
|
Mini Modulars
|
||||||
|
Red Baseplate
|
||||||
|
Shuttle Expedition
|
||||||
|
Palace Cinema
|
||||||
|
Horizon Express
|
||||||
|
Sydney Opera House
|
||||||
|
Winter Village Market
|
||||||
|
Ewok Village
|
||||||
|
The Tower of Orthanc
|
||||||
|
Red Five X-Wing Starfighter
|
||||||
|
Animals
|
||||||
|
Maersk Line Triple-E
|
||||||
|
MINI Cooper
|
||||||
|
Parisian Restaurant
|
||||||
|
Fairground Mixer
|
||||||
|
Adventurers Value Pack
|
||||||
|
Ferris Wheel
|
||||||
|
Ferrari F40
|
||||||
|
Winter Toy Shop
|
||||||
|
Year Of The Snake
|
||||||
|
Figures and Furniture
|
||||||
|
Brick Bank
|
||||||
|
Volkswagen Beetle
|
||||||
|
Big Ben
|
||||||
|
Winter Holiday Train
|
||||||
|
Assembly Square
|
||||||
|
Taj Mahal
|
||||||
|
Carousel
|
||||||
|
London Bus
|
||||||
|
Winter Village Station
|
||||||
|
Downtown Diner
|
||||||
|
Playhouse Boxes
|
||||||
|
Roller Coaster
|
||||||
|
James Bond Aston Martin DB5
|
||||||
|
Winter Village Fire Station
|
||||||
|
Corner Garage
|
||||||
|
Ford Mustang
|
||||||
|
NASA Apollo 11 Lunar Lander
|
||||||
|
Gingerbread House
|
||||||
|
Vestas Wind Turbine
|
||||||
|
Harley-Davidson Fat Boy
|
||||||
|
Bookshop
|
||||||
|
Vehicles
|
||||||
|
Fiat 500
|
||||||
|
Old Trafford - Manchester United
|
||||||
|
Haunted House
|
||||||
|
ECTO-1
|
||||||
|
Elf Club House
|
||||||
|
Colosseum
|
||||||
|
Crocodile Locomotive
|
||||||
|
Police Station
|
||||||
|
Volkswagen T2 Camper Van
|
||||||
|
Flower Bouquet
|
||||||
|
6 x 12 Base Bricks
|
||||||
|
Bonsai
|
||||||
|
adidas Originals Superstar
|
||||||
|
NASA Space Shuttle Discovery
|
||||||
|
Camp Nou - FC Barcelona
|
||||||
|
Compass Sensor for Mindstorms NXT
|
||||||
|
Bird of Paradise
|
||||||
|
Pickup Truck
|
||||||
|
Milk Delivery Truck - Tine
|
||||||
|
Queer Eye: The Fab 5 Loft
|
||||||
|
Friends - The Apartments
|
||||||
|
Titanic
|
||||||
|
Porsche 911 Turbo & 911 Targa
|
||||||
|
Boutique Hotel
|
||||||
|
Vespa 125
|
||||||
|
Real Madrid – Santiago Bernabéu Stadium
|
||||||
|
Front-End Loader
|
||||||
|
Front-End Loader
|
||||||
|
Back to the Future Time Machine
|
||||||
|
TECHNIC I: Simple Machines Set
|
||||||
|
Optimus Prime
|
||||||
|
Loop Coaster
|
||||||
|
Chevrolet Camaro Z/28 1969
|
||||||
|
Atari 2600
|
||||||
|
Eiffel Tower
|
||||||
|
Holiday Main Street
|
||||||
|
Succulents
|
||||||
|
4.5V Motor Set with Rubber Tracks
|
||||||
|
Building Cards - 1030
|
||||||
|
Orchid
|
||||||
|
Jazz Club
|
||||||
|
Wildflower Bouquet
|
||||||
|
Dried Flower Centerpiece
|
||||||
|
Tranquil Garden
|
||||||
|
Lord of the Rings: Rivendell
|
||||||
|
Land Rover Classic Defender 90
|
||||||
|
Concorde
|
||||||
|
Imagination Set 3
|
||||||
|
Eldorado Fortress
|
||||||
|
TECHNIC II Set {4.5v}
|
||||||
|
Corvette
|
||||||
|
PAC-MAN Arcade
|
||||||
|
Alpine Lodge
|
||||||
|
Natural History Museum
|
||||||
|
Dune Atreides Royal Ornithopter
|
||||||
|
Bouquet of Roses
|
||||||
|
Tiny Plants
|
||||||
|
McLaren MP4/4 & Ayrton Senna
|
||||||
|
Building Cards - 1032
|
||||||
|
Kingfisher Bird
|
||||||
|
Medieval Town Square
|
||||||
|
The Lord of the Rings: Barad-dûr
|
||||||
|
Retro Radio
|
||||||
|
The Endurance
|
||||||
|
Lamborghini Countach 5000 Quattrovalvole
|
||||||
|
Bumblebee
|
||||||
|
Wreath
|
||||||
|
Teachers Resource Set
|
||||||
|
NASA Artemis Space Launch System
|
||||||
|
Pretty Pink Flower Bouquet
|
||||||
|
Mini Orchid
|
||||||
|
Lucky Bamboo
|
||||||
|
Flower Arrangement
|
||||||
|
Williams Racing FW14B & Nigel Mansell
|
||||||
|
Duplo Hooded Towel
|
||||||
|
Fountain Garden
|
||||||
|
Brick Tote Bag
|
||||||
|
Chrysanthemum
|
||||||
|
Plum Blossom
|
||||||
|
Poinsettia
|
||||||
|
ERBIE the Robo-Car
|
||||||
|
Manual Control Set 1
|
||||||
|
Over the Moon with Pharrell Williams
|
||||||
|
Rainbow Fun
|
||||||
|
Farm Set
|
||||||
|
Fun Future
|
||||||
|
Universal Building Set
|
||||||
|
World Fun
|
||||||
|
Mission to Mars
|
||||||
|
Replacement 4.5V Motor
|
||||||
|
Harbor
|
||||||
|
Learn About Chinese Culture
|
||||||
|
Universal Building Set
|
||||||
|
Animal Train
|
||||||
|
Daily Routines: Bath Time
|
||||||
|
Daily Routines: Eating & Bedtime
|
||||||
|
Big Feelings & Emotions
|
||||||
|
Caring for Animals at the Farm
|
||||||
|
Mack at the Race
|
||||||
|
Elsa & Bruni in the Enchanted Forest
|
||||||
|
Caring for Bees & Beehives
|
||||||
|
Imagination Set 4
|
||||||
|
Community People
|
||||||
|
Alphabet Truck
|
||||||
|
Universal Set for Boys and Girls from 1 1/2 Years
|
||||||
|
3in1 Space Shuttle Adventure
|
||||||
|
Buildable People with Big Emotions
|
||||||
|
Train Tunnel and Tracks Expansion Set
|
||||||
|
Train Bridge and Tracks Expansion Set
|
||||||
|
Interactive Adventure Train
|
||||||
|
Big Interactive Community Train
|
||||||
|
Peppa Pig Garden and Tree House
|
||||||
|
Peppa Pig Boat Trip
|
||||||
|
Peppa Pig Birthday House
|
||||||
|
Peppa Pig Supermarket
|
||||||
|
The LEGO Ninjago Movie Kai Backpack
|
||||||
|
Visit to the Vet Clinic
|
||||||
|
Cars and Trucks Brick Box
|
||||||
|
Community Vehicles
|
||||||
|
Industrial Elements
|
||||||
|
Educational LEGO Building Set
|
||||||
|
Train Set
|
||||||
|
Ninjago Foldable Backpack
|
||||||
|
Extra Track
|
||||||
|
Bridge and Crossing Tracks
|
||||||
|
Ships
|
||||||
|
Galaxy Explorer
|
||||||
|
Horse Stable
|
||||||
|
Basic Pack
|
||||||
|
Zoo Friends
|
||||||
|
Zoo Bus
|
||||||
|
Circus Show
|
||||||
|
My First Circus
|
||||||
|
Play House
|
||||||
|
Train Accessory Set
|
||||||
|
My First Train Set
|
||||||
|
Deluxe Train Set
|
||||||
|
Dusty and Chug
|
||||||
|
Canada Post Truck
|
||||||
|
Never Land Hideout
|
||||||
|
My First Garden
|
||||||
|
My First Construction Site
|
||||||
|
Garbage Truck
|
||||||
|
Building Set
|
||||||
|
Big Front Loader
|
||||||
|
Baby Calf
|
||||||
|
Farm Animals
|
||||||
|
Farm Tractor
|
||||||
|
Big Farm
|
||||||
|
Ambulance
|
||||||
|
School Bus
|
||||||
|
Truck
|
||||||
|
Imagination Set 5
|
||||||
|
Community Buildings
|
||||||
|
Mickey Mouse and Friends
|
||||||
|
My First Police Set
|
||||||
|
Z-Blob Plush
|
||||||
|
Fire and Rescue Team
|
||||||
|
Beach Racing
|
||||||
|
Stena Line Ferry
|
||||||
|
Superman Rescue
|
||||||
|
The Joker Challenge
|
||||||
|
Batcave Adventure
|
||||||
|
My First Shop
|
||||||
|
Circus Transport
|
||||||
|
Mini Basic Pack
|
||||||
|
Creative Cars
|
||||||
|
Toddler Build and Play Cubes
|
||||||
|
Toddler Build and Pull Along
|
||||||
|
Creative Bucket
|
||||||
|
Creative Chest
|
||||||
|
Giant Tower
|
||||||
|
Number Train
|
||||||
|
A Fairy Tale
|
||||||
|
Peekaboo Jungle
|
||||||
|
Toddler Starter Building Set
|
||||||
|
Creative Suitcase
|
||||||
|
Creative Picnic
|
||||||
|
Toddler Build and Boat Fun
|
||||||
|
Treasure Attack
|
||||||
|
All-in-One-Gift-Set
|
||||||
|
All-in-One-Pink-Box-of-Fun
|
||||||
|
All-in-One-Box-of-Fun
|
||||||
|
Creative Animals
|
||||||
|
Creative Ice Cream
|
||||||
|
Creative Building Cube
|
||||||
|
Zoo Care
|
||||||
|
Big Royal Castle
|
||||||
|
Clubhouse Café
|
||||||
|
Deluxe Box of Fun
|
||||||
|
Forest: Ducks
|
||||||
|
Forest: Animals
|
||||||
|
Forest: Fishing Trip
|
||||||
|
Forest: Park
|
||||||
|
Mom and Baby
|
||||||
|
Ice Cream Truck
|
||||||
|
Café
|
||||||
|
Rally Car
|
||||||
|
Airport
|
||||||
|
Fire Boat
|
||||||
|
Fire Truck
|
||||||
|
Fire Station
|
||||||
|
Disney Princess Collection
|
||||||
|
Birthday Parade
|
||||||
|
Batman Adventure
|
||||||
|
Classic Race
|
||||||
|
Road Plates and Signs
|
||||||
|
Delivery Vehicle
|
||||||
|
Camping
|
||||||
|
My First Bus
|
||||||
|
Treasure Island
|
||||||
|
Rosie the Ambulance
|
||||||
|
Backyard Clinic
|
||||||
|
Spider-Man Web-Bike Workshop
|
||||||
|
Spider-Man Spider Truck Adventure
|
||||||
|
UNICEF Van
|
||||||
|
Single Disk Pack
|
||||||
|
My First Tractor
|
||||||
|
My First Playhouse
|
||||||
|
My First Farm
|
||||||
|
Creative Building Box
|
||||||
|
Town Vehicles
|
||||||
|
Large Creative Box
|
||||||
|
Basic Bricks Large
|
||||||
|
Community Workers
|
||||||
|
Dacta Buildings
|
||||||
|
House Accessories - 182 elements
|
||||||
|
XL Creative Brick Box
|
||||||
|
Monster Trucks
|
||||||
|
My First LEGO Princess
|
||||||
|
My First LEGO Set
|
||||||
|
Blue Suitcase
|
||||||
|
Vehicle Suitcase
|
||||||
|
Pink Suitcase
|
||||||
|
36 Little People + Accessories
|
||||||
|
My First LEGO Fire Station
|
||||||
|
Creative Bucket
|
||||||
|
Creative Chest
|
||||||
|
Creative Tower
|
||||||
|
Spider-Man: Spider-Car Pursuit
|
||||||
|
Digger
|
||||||
|
Construction
|
||||||
|
Princess Play Castle
|
||||||
|
Turtle Lair
|
||||||
|
Community Vehicles
|
||||||
|
Fire Emergency
|
||||||
|
Batman: Defend the Batcave
|
||||||
|
Race Car Rally
|
||||||
|
Pony Farm
|
||||||
|
Police – The Big Escape
|
||||||
|
Beach Trip
|
||||||
|
Pirate Treasure Hunt
|
||||||
|
Garbage Truck
|
||||||
|
Air Patrol
|
||||||
|
Creative Building Cube
|
||||||
|
Creative Suitcase
|
||||||
|
Road Work Truck
|
||||||
|
Supermarket Suitcase
|
||||||
|
Fire Suitcase
|
||||||
|
Family House
|
||||||
|
Spider-Man Hideout
|
||||||
|
Speedboat
|
||||||
|
Creative Bricks
|
||||||
|
Creative Supplement
|
||||||
|
Creative Supplement Bright
|
||||||
|
Creative Building Box
|
||||||
|
Medium Creative Brick Box
|
||||||
|
XXXL Box
|
||||||
|
Large Creative Brick Box
|
||||||
|
Sand Baseplate
|
||||||
|
Green Baseplate
|
||||||
|
Stunt Flyer
|
||||||
|
Gray Baseplate
|
||||||
|
Creative Building Set
|
||||||
|
Creative Builder Box
|
||||||
|
Creative Box
|
||||||
|
Creative Building Basket
|
||||||
|
Blue Creative Box
|
||||||
|
Red Creative Box
|
||||||
|
Green Creative Box
|
||||||
|
Orange Creative Box
|
||||||
|
4.5V Motor Set
|
||||||
|
Bricks 2 x 2 and 2 x 4
|
||||||
|
Bricks and Gears
|
||||||
|
Creative Suitcase
|
||||||
|
Blue Baseplate
|
||||||
|
Bricks on a Roll
|
||||||
|
Bricks Bricks Bricks
|
||||||
|
Canada Post Mail Truck
|
||||||
|
Police Helicopter Chase
|
||||||
|
Iron Man vs. Loki
|
||||||
|
Snake Showdown
|
||||||
|
Batman & Superman vs. Lex Luthor
|
||||||
|
Lost Temple
|
||||||
|
4.5V Reversible Power Unit
|
||||||
|
Lightning McQueen Speed Launcher
|
||||||
|
Cruz Ramirez Race Simulator
|
||||||
|
Demolition Site
|
||||||
|
Police Truck Chase
|
||||||
|
Batman vs. Mr. Freeze
|
||||||
|
Shark Attack
|
||||||
|
Fire Patrol Suitcase
|
||||||
|
Thunder Hollow Crazy 8 Race
|
||||||
|
Florida 500 Race Final
|
||||||
|
Road Repair Truck
|
||||||
|
LEGO People Supplementary Set
|
||||||
|
Mountain Police Chase
|
||||||
|
The Joker Batcave Attack
|
||||||
|
Spider-Man vs. Scorpion Street Showdown
|
||||||
|
Bunchu Plush
|
||||||
|
Pteranodon Escape
|
||||||
|
Raptor Rescue Truck
|
||||||
|
T. Rex Breakout
|
||||||
|
Underminer Bank Heist
|
||||||
|
Advent Calendar 1999
|
||||||
|
The Great Home Escape
|
||||||
|
City Central Airport
|
||||||
|
Woody & RC
|
||||||
|
Toy Story 4 RV Vacation
|
||||||
|
Supplementary Set
|
||||||
|
Carnival Thrill Coaster
|
||||||
|
Mickey & Friends Fire Truck & Station
|
||||||
|
"Mickey
|
||||||
|
Mickey and Friends Castle Defenders
|
||||||
|
Animal Mosaic Puzzle
|
||||||
|
Hulk vs. Rhino Truck Showdown
|
||||||
|
Spider-Man Webquarters Hangout
|
||||||
|
Bakey with Cakey Fun
|
||||||
|
Animal Mosaic Puzzle
|
||||||
|
Drill Spinner Vehicle
|
||||||
|
Spidey vs. Green Goblin
|
||||||
|
Team Spidey Web Spinner Headquarters
|
||||||
|
Crafting with Baby Box
|
||||||
|
Baby Animals
|
||||||
|
Savanna
|
||||||
|
Arctic
|
||||||
|
Jungle
|
||||||
|
Around the World
|
||||||
|
Horses
|
||||||
|
Horse Trailer
|
||||||
|
Little Plane
|
||||||
|
Police Patrol
|
||||||
|
Battery Box
|
||||||
|
Push Train
|
||||||
|
Backhoe Loader
|
||||||
|
Truck & Tracked Excavator
|
||||||
|
Big Construction Site
|
||||||
|
Tow Truck
|
||||||
|
My First Rocket
|
||||||
|
My First Cars and Trucks
|
||||||
|
Creative Chest
|
||||||
|
My First Truck
|
||||||
|
My First Garden
|
||||||
|
Creative Building Basket
|
||||||
|
Batwing Adventure
|
||||||
|
Mickey & Friends Beach House
|
||||||
|
Supplementary Pack
|
||||||
|
My First Caterpillar
|
||||||
|
Birthday Picnic
|
||||||
|
Preschool
|
||||||
|
Pizzeria
|
||||||
|
Family House
|
||||||
|
Family Pets
|
||||||
|
Shooting Gallery
|
||||||
|
Big Fair
|
||||||
|
Fun Family Fair
|
||||||
|
Batcave Challenge
|
||||||
|
Mickey Racer
|
||||||
|
Minnie Mouse Bow-tique
|
||||||
|
My First Carousel
|
||||||
|
My First Number Train
|
||||||
|
My First Bricks
|
||||||
|
My First Plane
|
||||||
|
My First Cakes
|
||||||
|
My First Bus
|
||||||
|
My First Bird
|
||||||
|
Creative Builder Box
|
||||||
|
Creative Box
|
||||||
|
Piston Cup Race
|
||||||
|
My First Puzzle Pets
|
||||||
|
My First Ladybug
|
||||||
|
My First Race Car
|
||||||
|
Bulk Bucket
|
||||||
|
My First Emotions
|
||||||
|
My First Celebration
|
||||||
|
My First Animal Brick Box
|
||||||
|
Large Playground Brick Box
|
||||||
|
Fun Creations
|
||||||
|
Farm Pony Stable
|
||||||
|
Farm Adventures
|
||||||
|
Farm Animals
|
||||||
|
Airport
|
||||||
|
Train Bridge and Tracks
|
||||||
|
Steam Train
|
||||||
|
Cargo Train
|
||||||
|
Spider-Man & Hulk Adventures
|
||||||
|
Gentle Giants Petting Zoo
|
||||||
|
T. rex Tower
|
||||||
|
Road Burner
|
||||||
|
Train Tracks
|
||||||
|
My First Tow Truck
|
||||||
|
My First Balancing Animals
|
||||||
|
My First Fun Puzzle
|
||||||
|
My First Car Creations
|
||||||
|
Creative Fun
|
||||||
|
Basic Figures
|
||||||
|
Spider-Man vs. Electro
|
||||||
|
Toy Story Train
|
||||||
|
My First Minnie Build
|
||||||
|
My First Mickey Build
|
||||||
|
Frozen Ice Castle
|
||||||
|
Police Bike
|
||||||
|
TECHNIC Control I
|
||||||
|
Fire Truck
|
||||||
|
Police Station
|
||||||
|
Fire Station
|
||||||
|
Baby Animals
|
||||||
|
Tropical Island
|
||||||
|
World Animals
|
||||||
|
Plane
|
||||||
|
Heart Box
|
||||||
|
Submarine Adventure
|
||||||
|
Brick Box
|
||||||
|
Deluxe Brick Box
|
||||||
|
Alphabet Truck
|
||||||
|
Fire Truck
|
||||||
|
Tow Truck
|
||||||
|
Batcave
|
||||||
|
TECHNIC Control II
|
||||||
|
Super Heroes Lab
|
||||||
|
Playroom
|
||||||
|
Bedroom
|
||||||
|
Pizza Stand
|
||||||
|
Bakery
|
||||||
|
Modular Playhouse
|
||||||
|
Bulldozer
|
||||||
|
Truck & Tracked Excavator
|
||||||
|
Wrecking Ball Demolition
|
||||||
|
Tower Crane & Construction
|
||||||
|
Creative Animals
|
||||||
|
Alphabet Town
|
||||||
|
Batman: Arkham Asylum Breakout
|
||||||
|
Dinosaur Nursery
|
||||||
|
T. rex and Triceratops Dinosaur Breakout
|
||||||
|
Spider-Man Headquarters
|
||||||
|
Johnny Thunder
|
||||||
|
Mickey & Minnie Birthday Train
|
||||||
|
Happy Childhood Moments
|
||||||
|
Space Shuttle Mission
|
||||||
|
Garbage Truck and Recycling
|
||||||
|
Family Camping Van Adventure
|
||||||
|
Race Cars
|
||||||
|
Parking Garage and Car Wash
|
||||||
|
Farm Animal Care
|
||||||
|
Farm Tractor & Animal Care
|
||||||
|
Super Sub
|
||||||
|
Horse Stable and Pony Care
|
||||||
|
"Barn
|
||||||
|
Unicorn
|
||||||
|
Number Train - Learn To Count
|
||||||
|
Animal Train
|
||||||
|
Amusement Park
|
||||||
|
Fire Helicopter & Police Car
|
||||||
|
Creative Birthday Party
|
||||||
|
Police Station & Helicopter
|
||||||
|
Race Buggy
|
||||||
|
Airplane & Airport
|
||||||
|
Spider-Man & Friends: Funfair Adventure
|
||||||
|
Bath Time Fun: Floating Red Panda
|
||||||
|
Bath Time Fun: Floating Animal Train
|
||||||
|
Bath Time Fun: Floating Animal Island
|
||||||
|
Police Motorcycle
|
||||||
|
Doctor Visit
|
||||||
|
Fire Truck
|
||||||
|
Fire Station & Helicopter
|
||||||
|
Res-Q Runner
|
||||||
|
Wild Animals of Africa
|
||||||
|
Wild Animals of the Ocean
|
||||||
|
Wild Animals of South America
|
||||||
|
Wild Animals of Asia
|
||||||
|
Wild Animals of the World
|
Can't render this file because it contains an unexpected character in line 870 and column 1.
|
987
PostgreSQL/.csv/names.csv
Normal file
987
PostgreSQL/.csv/names.csv
Normal file
@ -0,0 +1,987 @@
|
|||||||
|
name
|
||||||
|
Tidcombe
|
||||||
|
MacKegg
|
||||||
|
Twelves
|
||||||
|
Fildes
|
||||||
|
Prin
|
||||||
|
Swinnard
|
||||||
|
Brithman
|
||||||
|
Matussow
|
||||||
|
|
||||||
|
Golborn
|
||||||
|
Crookston
|
||||||
|
Hegge
|
||||||
|
Milesop
|
||||||
|
Urpeth
|
||||||
|
Mixter
|
||||||
|
Forty
|
||||||
|
Bromilow
|
||||||
|
Upchurch
|
||||||
|
Heinsius
|
||||||
|
Bassham
|
||||||
|
Geindre
|
||||||
|
Yelding
|
||||||
|
Brownlea
|
||||||
|
Wimpress
|
||||||
|
Moodey
|
||||||
|
|
||||||
|
Clewlow
|
||||||
|
Tripp
|
||||||
|
Cromett
|
||||||
|
Lorait
|
||||||
|
Rohloff
|
||||||
|
|
||||||
|
Holdin
|
||||||
|
Lickess
|
||||||
|
|
||||||
|
Scohier
|
||||||
|
Letixier
|
||||||
|
Pegler
|
||||||
|
|
||||||
|
Perazzo
|
||||||
|
Odeson
|
||||||
|
Pakeman
|
||||||
|
Harbison
|
||||||
|
Belli
|
||||||
|
Bruna
|
||||||
|
Hembry
|
||||||
|
Prandi
|
||||||
|
Humbatch
|
||||||
|
Stilgoe
|
||||||
|
Puttock
|
||||||
|
Klima
|
||||||
|
Matousek
|
||||||
|
Najera
|
||||||
|
Inkin
|
||||||
|
Suttle
|
||||||
|
Imrie
|
||||||
|
Edmett
|
||||||
|
Enston
|
||||||
|
|
||||||
|
Redler
|
||||||
|
Aggs
|
||||||
|
Dugood
|
||||||
|
Aleksahkin
|
||||||
|
Fardo
|
||||||
|
|
||||||
|
Tolomio
|
||||||
|
Sancraft
|
||||||
|
Lapere
|
||||||
|
Hardan
|
||||||
|
Esposito
|
||||||
|
Stoggell
|
||||||
|
Bernardotte
|
||||||
|
Ucceli
|
||||||
|
Swadlin
|
||||||
|
Pawlyn
|
||||||
|
Langstone
|
||||||
|
Worley
|
||||||
|
Pearlman
|
||||||
|
McGrill
|
||||||
|
Kubicki
|
||||||
|
MacVicar
|
||||||
|
Cruickshank
|
||||||
|
Quigley
|
||||||
|
Bloschke
|
||||||
|
Rickards
|
||||||
|
Soreau
|
||||||
|
Bidwell
|
||||||
|
De Mitri
|
||||||
|
Yitzhak
|
||||||
|
Kettlestring
|
||||||
|
Drover
|
||||||
|
Tyrie
|
||||||
|
Taggart
|
||||||
|
Lane
|
||||||
|
Mithon
|
||||||
|
Kittoe
|
||||||
|
Reggiani
|
||||||
|
Bassam
|
||||||
|
Baake
|
||||||
|
Garrity
|
||||||
|
Blundon
|
||||||
|
Treneer
|
||||||
|
|
||||||
|
Antonoyev
|
||||||
|
Toor
|
||||||
|
Sockell
|
||||||
|
Cunningham
|
||||||
|
Bayldon
|
||||||
|
Worg
|
||||||
|
Inold
|
||||||
|
Briand
|
||||||
|
Jacobsohn
|
||||||
|
Ormes
|
||||||
|
Aitcheson
|
||||||
|
Meysham
|
||||||
|
Staton
|
||||||
|
Rosoni
|
||||||
|
Eliasen
|
||||||
|
Stubs
|
||||||
|
Outram
|
||||||
|
|
||||||
|
Scotchmore
|
||||||
|
Flatt
|
||||||
|
Amos
|
||||||
|
|
||||||
|
Elmes
|
||||||
|
Edeler
|
||||||
|
Kemster
|
||||||
|
Maskell
|
||||||
|
Braunthal
|
||||||
|
Penylton
|
||||||
|
Tidbold
|
||||||
|
Hooke
|
||||||
|
Domingues
|
||||||
|
Roget
|
||||||
|
Amdohr
|
||||||
|
Ivanishev
|
||||||
|
Mettetal
|
||||||
|
Spolton
|
||||||
|
Choak
|
||||||
|
Robbey
|
||||||
|
Grishankov
|
||||||
|
Braidwood
|
||||||
|
Sillis
|
||||||
|
|
||||||
|
Pozzi
|
||||||
|
Novotni
|
||||||
|
Habbijam
|
||||||
|
Tunney
|
||||||
|
Drable
|
||||||
|
Ladds
|
||||||
|
Wyldes
|
||||||
|
Chapple
|
||||||
|
Guille
|
||||||
|
Hanretty
|
||||||
|
Dare
|
||||||
|
McTrusty
|
||||||
|
Pilipets
|
||||||
|
|
||||||
|
Oakwell
|
||||||
|
Keyse
|
||||||
|
Benettini
|
||||||
|
Bresnahan
|
||||||
|
Eve
|
||||||
|
Opie
|
||||||
|
Somes
|
||||||
|
Gavaghan
|
||||||
|
Ollivier
|
||||||
|
Saterweyte
|
||||||
|
Benian
|
||||||
|
Cornils
|
||||||
|
Ager
|
||||||
|
Swatman
|
||||||
|
Grenfell
|
||||||
|
Hounson
|
||||||
|
Postlewhite
|
||||||
|
Esome
|
||||||
|
|
||||||
|
Castellino
|
||||||
|
Impleton
|
||||||
|
Bestall
|
||||||
|
Rudland
|
||||||
|
Wyke
|
||||||
|
Peppard
|
||||||
|
Cherm
|
||||||
|
Pullin
|
||||||
|
Girhard
|
||||||
|
Lago
|
||||||
|
Grossman
|
||||||
|
Janusz
|
||||||
|
Fetters
|
||||||
|
Hold
|
||||||
|
Hellens
|
||||||
|
McDill
|
||||||
|
Andreini
|
||||||
|
Anglin
|
||||||
|
Solleme
|
||||||
|
Mibourne
|
||||||
|
Abelov
|
||||||
|
Gwillyam
|
||||||
|
|
||||||
|
Scolli
|
||||||
|
Waslin
|
||||||
|
Heddon
|
||||||
|
Gross
|
||||||
|
McClory
|
||||||
|
Redwall
|
||||||
|
Lusted
|
||||||
|
Durrett
|
||||||
|
Warham
|
||||||
|
|
||||||
|
Raeside
|
||||||
|
Conaboy
|
||||||
|
Fraschini
|
||||||
|
Spracklin
|
||||||
|
Ingarfill
|
||||||
|
Asey
|
||||||
|
Plank
|
||||||
|
Kinahan
|
||||||
|
Allcoat
|
||||||
|
Lace
|
||||||
|
Hazelton
|
||||||
|
Sinton
|
||||||
|
Bretherick
|
||||||
|
Thornhill
|
||||||
|
Dearlove
|
||||||
|
Brain
|
||||||
|
Mollatt
|
||||||
|
Tann
|
||||||
|
Greydon
|
||||||
|
Abley
|
||||||
|
Keattch
|
||||||
|
Capps
|
||||||
|
Varsey
|
||||||
|
Plessing
|
||||||
|
Bowkett
|
||||||
|
Hanstock
|
||||||
|
Bachelar
|
||||||
|
Wayland
|
||||||
|
|
||||||
|
Raund
|
||||||
|
Howkins
|
||||||
|
Blampey
|
||||||
|
Hudleston
|
||||||
|
Barthelet
|
||||||
|
Lamont
|
||||||
|
Burley
|
||||||
|
Ackhurst
|
||||||
|
Stormes
|
||||||
|
Capelin
|
||||||
|
Mayhead
|
||||||
|
Gatty
|
||||||
|
Ryrie
|
||||||
|
Hollingshead
|
||||||
|
Phillippo
|
||||||
|
Giacometti
|
||||||
|
Jowsey
|
||||||
|
Cazereau
|
||||||
|
Seeman
|
||||||
|
Harnetty
|
||||||
|
Graysmark
|
||||||
|
Meere
|
||||||
|
Allerton
|
||||||
|
Bediss
|
||||||
|
Braunthal
|
||||||
|
Coot
|
||||||
|
Hulatt
|
||||||
|
Every
|
||||||
|
|
||||||
|
Foley
|
||||||
|
Balle
|
||||||
|
Winwood
|
||||||
|
Hookes
|
||||||
|
Poolman
|
||||||
|
Orman
|
||||||
|
Adlington
|
||||||
|
Dadson
|
||||||
|
Marcham
|
||||||
|
Vigurs
|
||||||
|
Gostling
|
||||||
|
Filyukov
|
||||||
|
Vasler
|
||||||
|
Wastall
|
||||||
|
Camilletti
|
||||||
|
Maylam
|
||||||
|
Jeanenet
|
||||||
|
Ashall
|
||||||
|
Gratrix
|
||||||
|
Chesshire
|
||||||
|
Bridson
|
||||||
|
|
||||||
|
Clines
|
||||||
|
|
||||||
|
Thebe
|
||||||
|
Burg
|
||||||
|
Cumbers
|
||||||
|
Snalham
|
||||||
|
Carnelley
|
||||||
|
Raffles
|
||||||
|
Viggars
|
||||||
|
Brok
|
||||||
|
Geistmann
|
||||||
|
Scutter
|
||||||
|
Kelsall
|
||||||
|
Degenhardt
|
||||||
|
McKmurrie
|
||||||
|
Swetland
|
||||||
|
Bastock
|
||||||
|
Baunton
|
||||||
|
Drakers
|
||||||
|
Vearncomb
|
||||||
|
Malyan
|
||||||
|
Blodgetts
|
||||||
|
Wingeat
|
||||||
|
Dovey
|
||||||
|
McGinlay
|
||||||
|
Assur
|
||||||
|
Schukraft
|
||||||
|
Shelper
|
||||||
|
Coldman
|
||||||
|
Huggard
|
||||||
|
Corney
|
||||||
|
Springtorpe
|
||||||
|
Gotfrey
|
||||||
|
Cottingham
|
||||||
|
Gudger
|
||||||
|
Bridgnell
|
||||||
|
McCallum
|
||||||
|
Witts
|
||||||
|
Terrazzo
|
||||||
|
Mangin
|
||||||
|
Konzelmann
|
||||||
|
Marsy
|
||||||
|
Gillingwater
|
||||||
|
Glandfield
|
||||||
|
Brumwell
|
||||||
|
Rice
|
||||||
|
|
||||||
|
Durram
|
||||||
|
Sandwith
|
||||||
|
Frankland
|
||||||
|
Carnson
|
||||||
|
Pacitti
|
||||||
|
Willoughway
|
||||||
|
Leonida
|
||||||
|
Fieller
|
||||||
|
Pallaske
|
||||||
|
Heeps
|
||||||
|
|
||||||
|
Itzcovichch
|
||||||
|
Hutchin
|
||||||
|
Konrad
|
||||||
|
Castelow
|
||||||
|
Narbett
|
||||||
|
Folca
|
||||||
|
Clynman
|
||||||
|
Battista
|
||||||
|
Bradnam
|
||||||
|
Clayton
|
||||||
|
Newstead
|
||||||
|
Wetherill
|
||||||
|
Wyd
|
||||||
|
Leachman
|
||||||
|
|
||||||
|
Clayal
|
||||||
|
Connah
|
||||||
|
Gretton
|
||||||
|
Ierland
|
||||||
|
Frogley
|
||||||
|
Lepard
|
||||||
|
Matyushonok
|
||||||
|
Kovelmann
|
||||||
|
Siely
|
||||||
|
Lefeaver
|
||||||
|
Rookledge
|
||||||
|
Wink
|
||||||
|
Derrell
|
||||||
|
Farbrother
|
||||||
|
Maddaford
|
||||||
|
Brayley
|
||||||
|
Stone Fewings
|
||||||
|
Hairon
|
||||||
|
Ree
|
||||||
|
Dohmer
|
||||||
|
Sandford
|
||||||
|
Darley
|
||||||
|
Kirkhouse
|
||||||
|
Srawley
|
||||||
|
Akhurst
|
||||||
|
De Coursey
|
||||||
|
Curnok
|
||||||
|
Grishagin
|
||||||
|
Pohlke
|
||||||
|
Coogan
|
||||||
|
|
||||||
|
Larkkem
|
||||||
|
|
||||||
|
Pargeter
|
||||||
|
Keaton
|
||||||
|
Brewerton
|
||||||
|
Outridge
|
||||||
|
|
||||||
|
Breckin
|
||||||
|
Cawse
|
||||||
|
Diffley
|
||||||
|
Caile
|
||||||
|
|
||||||
|
Ballston
|
||||||
|
Thatcher
|
||||||
|
Sydney
|
||||||
|
Jahn
|
||||||
|
Stokell
|
||||||
|
Calfe
|
||||||
|
Akker
|
||||||
|
Lethlay
|
||||||
|
|
||||||
|
Walewski
|
||||||
|
Basill
|
||||||
|
Morrid
|
||||||
|
Ansett
|
||||||
|
Gotfrey
|
||||||
|
Olivazzi
|
||||||
|
Skippon
|
||||||
|
Masarrat
|
||||||
|
Bavage
|
||||||
|
Josum
|
||||||
|
|
||||||
|
Eschalotte
|
||||||
|
Cawse
|
||||||
|
Larkby
|
||||||
|
Selland
|
||||||
|
Jagiello
|
||||||
|
Lintall
|
||||||
|
|
||||||
|
Pimblott
|
||||||
|
Winspeare
|
||||||
|
Airton
|
||||||
|
Mithun
|
||||||
|
Crich
|
||||||
|
Banbrook
|
||||||
|
Skellon
|
||||||
|
Shemelt
|
||||||
|
Stithe
|
||||||
|
Jorger
|
||||||
|
Cuss
|
||||||
|
Jovovic
|
||||||
|
Perrinchief
|
||||||
|
Borzoni
|
||||||
|
Brittian
|
||||||
|
Jamblin
|
||||||
|
Shepherd
|
||||||
|
Flintoffe
|
||||||
|
Gavin
|
||||||
|
Fockes
|
||||||
|
Lumsdon
|
||||||
|
McBean
|
||||||
|
Santorini
|
||||||
|
Bather
|
||||||
|
Crack
|
||||||
|
Sedgman
|
||||||
|
Cardenas
|
||||||
|
Fere
|
||||||
|
Horsey
|
||||||
|
Hingeley
|
||||||
|
Fieldhouse
|
||||||
|
Janiak
|
||||||
|
Swannell
|
||||||
|
Esgate
|
||||||
|
Hadcock
|
||||||
|
Geindre
|
||||||
|
Cleland
|
||||||
|
Blissett
|
||||||
|
Livock
|
||||||
|
Borland
|
||||||
|
Kleis
|
||||||
|
Koles
|
||||||
|
Currey
|
||||||
|
Thorneywork
|
||||||
|
Lonsdale
|
||||||
|
Slack
|
||||||
|
Nibley
|
||||||
|
Stainfield
|
||||||
|
Ram
|
||||||
|
Kollasch
|
||||||
|
Delve
|
||||||
|
Ismirnioglou
|
||||||
|
Casserley
|
||||||
|
Hallbird
|
||||||
|
Enos
|
||||||
|
Figurski
|
||||||
|
Caldicott
|
||||||
|
Barff
|
||||||
|
|
||||||
|
|
||||||
|
Kennea
|
||||||
|
Meeus
|
||||||
|
Iacovini
|
||||||
|
Hollow
|
||||||
|
Latham
|
||||||
|
Skoggings
|
||||||
|
Simmens
|
||||||
|
Durbyn
|
||||||
|
Hillyatt
|
||||||
|
Ashdown
|
||||||
|
Varty
|
||||||
|
Cleobury
|
||||||
|
Valentine
|
||||||
|
Wolverson
|
||||||
|
Abramchik
|
||||||
|
Mettetal
|
||||||
|
Baytrop
|
||||||
|
Gallatly
|
||||||
|
Christie
|
||||||
|
Rous
|
||||||
|
Henmarsh
|
||||||
|
Nother
|
||||||
|
Scammonden
|
||||||
|
Beaten
|
||||||
|
Scrinage
|
||||||
|
Josselson
|
||||||
|
Pavlitschek
|
||||||
|
Debill
|
||||||
|
Bennellick
|
||||||
|
Piburn
|
||||||
|
Monini
|
||||||
|
Sacchetti
|
||||||
|
Cicchillo
|
||||||
|
Allington
|
||||||
|
Ilsley
|
||||||
|
Python
|
||||||
|
Laguerre
|
||||||
|
Siveyer
|
||||||
|
Hailwood
|
||||||
|
Axelbey
|
||||||
|
Clout
|
||||||
|
Burfitt
|
||||||
|
Pinsent
|
||||||
|
Bischoff
|
||||||
|
Budleigh
|
||||||
|
Sessuns
|
||||||
|
Rutty
|
||||||
|
Corry
|
||||||
|
Bartusek
|
||||||
|
Verlinden
|
||||||
|
|
||||||
|
Lissett
|
||||||
|
Whimpenny
|
||||||
|
Kissock
|
||||||
|
Parlott
|
||||||
|
|
||||||
|
Venditti
|
||||||
|
Pavey
|
||||||
|
Dessaur
|
||||||
|
Fieldsend
|
||||||
|
Gerge
|
||||||
|
Melin
|
||||||
|
Boland
|
||||||
|
Gergus
|
||||||
|
Cossar
|
||||||
|
Tift
|
||||||
|
Carlucci
|
||||||
|
Cockings
|
||||||
|
|
||||||
|
Harty
|
||||||
|
Labbett
|
||||||
|
Deverick
|
||||||
|
Blurton
|
||||||
|
Strephan
|
||||||
|
Burles
|
||||||
|
Dwerryhouse
|
||||||
|
Weetch
|
||||||
|
Brierton
|
||||||
|
Colleton
|
||||||
|
Morsom
|
||||||
|
Jurries
|
||||||
|
Woakes
|
||||||
|
Ladbrook
|
||||||
|
|
||||||
|
Harrild
|
||||||
|
McBain
|
||||||
|
Fobidge
|
||||||
|
Pellington
|
||||||
|
Palin
|
||||||
|
Dumbleton
|
||||||
|
Messum
|
||||||
|
Yves
|
||||||
|
Alvar
|
||||||
|
Haywood
|
||||||
|
Sucre
|
||||||
|
Gomersal
|
||||||
|
Shilito
|
||||||
|
Voller
|
||||||
|
Dougill
|
||||||
|
Bevis
|
||||||
|
Kemmons
|
||||||
|
Limpricht
|
||||||
|
|
||||||
|
|
||||||
|
Kleisle
|
||||||
|
Filip
|
||||||
|
Moneti
|
||||||
|
Gooderridge
|
||||||
|
|
||||||
|
Culy
|
||||||
|
Vosper
|
||||||
|
Call
|
||||||
|
Freear
|
||||||
|
Kiebes
|
||||||
|
|
||||||
|
Polack
|
||||||
|
|
||||||
|
Marder
|
||||||
|
Lowin
|
||||||
|
Lewing
|
||||||
|
Daily
|
||||||
|
de Amaya
|
||||||
|
Matieu
|
||||||
|
Rowett
|
||||||
|
Manske
|
||||||
|
Ingleton
|
||||||
|
Oldknowe
|
||||||
|
Hartzenberg
|
||||||
|
Habron
|
||||||
|
Dodgshun
|
||||||
|
Roadknight
|
||||||
|
|
||||||
|
Eltune
|
||||||
|
Gallear
|
||||||
|
|
||||||
|
Stonestreet
|
||||||
|
Clewett
|
||||||
|
Confort
|
||||||
|
Agent
|
||||||
|
|
||||||
|
|
||||||
|
Gonnard
|
||||||
|
Malecky
|
||||||
|
Wyleman
|
||||||
|
McCarrison
|
||||||
|
Wasbrough
|
||||||
|
Shepland
|
||||||
|
Lieber
|
||||||
|
Stratten
|
||||||
|
Lantaph
|
||||||
|
Renfield
|
||||||
|
Vampouille
|
||||||
|
McSparran
|
||||||
|
Hargitt
|
||||||
|
Acland
|
||||||
|
Cunnell
|
||||||
|
Rosa
|
||||||
|
Cobbe
|
||||||
|
Yosselevitch
|
||||||
|
Dubble
|
||||||
|
Baudon
|
||||||
|
Vamplers
|
||||||
|
Milliken
|
||||||
|
Lundbeck
|
||||||
|
Kingcott
|
||||||
|
Issakov
|
||||||
|
Liebmann
|
||||||
|
Kattenhorn
|
||||||
|
Gaskins
|
||||||
|
Cornelius
|
||||||
|
|
||||||
|
Finnes
|
||||||
|
Meegin
|
||||||
|
Joincey
|
||||||
|
Gherardelli
|
||||||
|
Gowanson
|
||||||
|
Canty
|
||||||
|
|
||||||
|
Raywood
|
||||||
|
Heinsius
|
||||||
|
Wooles
|
||||||
|
Burde
|
||||||
|
Kisar
|
||||||
|
Allso
|
||||||
|
Sindall
|
||||||
|
Hurn
|
||||||
|
Doe
|
||||||
|
Ramsby
|
||||||
|
Gavriel
|
||||||
|
Clohissy
|
||||||
|
Vardey
|
||||||
|
Klimpt
|
||||||
|
Emberson
|
||||||
|
Isaacson
|
||||||
|
Lowther
|
||||||
|
Heyball
|
||||||
|
Woodruff
|
||||||
|
McDonell
|
||||||
|
Porcher
|
||||||
|
Silbermann
|
||||||
|
Cummins
|
||||||
|
|
||||||
|
Harrower
|
||||||
|
Roland
|
||||||
|
Wadwell
|
||||||
|
Baulch
|
||||||
|
McComb
|
||||||
|
Metcalf
|
||||||
|
Dmitrovic
|
||||||
|
Mylan
|
||||||
|
Jeannin
|
||||||
|
Mossdale
|
||||||
|
Odhams
|
||||||
|
|
||||||
|
Dignan
|
||||||
|
Heatly
|
||||||
|
Joye
|
||||||
|
Lorrimer
|
||||||
|
Damp
|
||||||
|
|
||||||
|
Faucett
|
||||||
|
Stilgo
|
||||||
|
Aberhart
|
||||||
|
Duffield
|
||||||
|
Maydwell
|
||||||
|
Du Plantier
|
||||||
|
Gare
|
||||||
|
Braker
|
||||||
|
Spread
|
||||||
|
Diffley
|
||||||
|
Eborall
|
||||||
|
Maddy
|
||||||
|
Nano
|
||||||
|
Salzen
|
||||||
|
Keerl
|
||||||
|
Bazoge
|
||||||
|
Deathridge
|
||||||
|
Geillier
|
||||||
|
Thiolier
|
||||||
|
Ausher
|
||||||
|
Laidel
|
||||||
|
Deeth
|
||||||
|
Willatt
|
||||||
|
Hinkensen
|
||||||
|
De Lacey
|
||||||
|
Cuddehay
|
||||||
|
Longland
|
||||||
|
Marde
|
||||||
|
Dungay
|
||||||
|
Buxcy
|
||||||
|
Lapides
|
||||||
|
Janaszkiewicz
|
||||||
|
Rizzelli
|
||||||
|
Christley
|
||||||
|
Luff
|
||||||
|
Lappin
|
||||||
|
Colnet
|
||||||
|
Flather
|
||||||
|
Treker
|
||||||
|
Forlong
|
||||||
|
Speddin
|
||||||
|
Melsome
|
||||||
|
Groome
|
||||||
|
Going
|
||||||
|
Enders
|
||||||
|
Rosone
|
||||||
|
Elegood
|
||||||
|
Isakowicz
|
||||||
|
|
||||||
|
Sieb
|
||||||
|
Sutch
|
||||||
|
Garvill
|
||||||
|
Rothera
|
||||||
|
Ceaplen
|
||||||
|
Hake
|
||||||
|
Babcock
|
||||||
|
Dautry
|
||||||
|
Beels
|
||||||
|
Bernardoux
|
||||||
|
Standen
|
||||||
|
Torricella
|
||||||
|
Gymblett
|
||||||
|
Storks
|
||||||
|
Dashkov
|
||||||
|
|
||||||
|
|
||||||
|
Hancell
|
||||||
|
Duhig
|
||||||
|
Scanlan
|
||||||
|
Hodjetts
|
||||||
|
Dunbar
|
||||||
|
Figger
|
||||||
|
Champion
|
||||||
|
Wikey
|
||||||
|
Priddie
|
||||||
|
Sausman
|
||||||
|
Durrand
|
||||||
|
Fridaye
|
||||||
|
Ellerby
|
||||||
|
Liebrecht
|
||||||
|
Kubu
|
||||||
|
|
||||||
|
Munden
|
||||||
|
Daggett
|
||||||
|
Colenutt
|
||||||
|
Trazzi
|
||||||
|
Coldbreath
|
||||||
|
Abson
|
||||||
|
Prosek
|
||||||
|
Gorelli
|
||||||
|
Lambeth
|
||||||
|
Pennell
|
||||||
|
Turnell
|
||||||
|
Crowch
|
||||||
|
Fossey
|
||||||
|
Helmke
|
||||||
|
Concannon
|
||||||
|
Fawcitt
|
||||||
|
Cumbridge
|
||||||
|
Scadden
|
||||||
|
Pate
|
||||||
|
Fike
|
||||||
|
Magauran
|
||||||
|
Ramsden
|
||||||
|
Hilley
|
||||||
|
Temple
|
||||||
|
Gumly
|
||||||
|
Brizland
|
||||||
|
Laverenz
|
||||||
|
Caney
|
||||||
|
Lahy
|
||||||
|
Tedahl
|
||||||
|
Geraldi
|
||||||
|
Columbine
|
||||||
|
Starbuck
|
||||||
|
Kennedy
|
||||||
|
Imlock
|
||||||
|
Adlem
|
||||||
|
Gotobed
|
||||||
|
Garken
|
||||||
|
|
||||||
|
Dawdary
|
||||||
|
Gregorace
|
||||||
|
Hogben
|
||||||
|
Paver
|
||||||
|
Branche
|
||||||
|
Hagan
|
||||||
|
McComish
|
||||||
|
Terlinden
|
||||||
|
Manson
|
||||||
|
|
||||||
|
Remmers
|
||||||
|
Greatex
|
||||||
|
Jackes
|
||||||
|
Mildmott
|
||||||
|
Biasotti
|
||||||
|
Newlands
|
||||||
|
Dewett
|
||||||
|
Bruinemann
|
||||||
|
Guiett
|
||||||
|
Boden
|
||||||
|
Wombwell
|
||||||
|
McGirl
|
||||||
|
Pabel
|
||||||
|
McKechnie
|
||||||
|
Greenough
|
||||||
|
Greenhalf
|
||||||
|
Bunyan
|
||||||
|
Zink
|
||||||
|
Blazic
|
||||||
|
Whitebrook
|
||||||
|
McRorie
|
||||||
|
Devine
|
||||||
|
|
||||||
|
Wolfenden
|
||||||
|
Dulwich
|
||||||
|
Calder
|
||||||
|
Bolley
|
||||||
|
Brouard
|
||||||
|
Hazeldine
|
||||||
|
Serjeant
|
||||||
|
Parman
|
||||||
|
Vela
|
||||||
|
Monteaux
|
||||||
|
Lune
|
||||||
|
Gaynes
|
||||||
|
Byneth
|
||||||
|
Fick
|
||||||
|
Shevlan
|
||||||
|
Herety
|
||||||
|
Vials
|
||||||
|
Featherbie
|
||||||
|
Whitwell
|
||||||
|
Petrik
|
||||||
|
Benditt
|
||||||
|
Willshaw
|
||||||
|
Brechin
|
||||||
|
Dwelley
|
||||||
|
Wicks
|
||||||
|
Anderl
|
||||||
|
Baldin
|
||||||
|
Webermann
|
||||||
|
Cheney
|
||||||
|
Kernar
|
||||||
|
Balazin
|
||||||
|
|
||||||
|
Sidry
|
||||||
|
Beecham
|
||||||
|
Sollas
|
||||||
|
Casotti
|
||||||
|
|
||||||
|
Pairpoint
|
||||||
|
Baggalley
|
||||||
|
Hastelow
|
||||||
|
Rebillard
|
||||||
|
Worsall
|
||||||
|
Falvey
|
||||||
|
Flanne
|
||||||
|
Storres
|
||||||
|
Jerrold
|
||||||
|
|
||||||
|
Money
|
||||||
|
Klehyn
|
||||||
|
|
||||||
|
Ridulfo
|
||||||
|
Fleay
|
||||||
|
Phuprate
|
||||||
|
Medlin
|
||||||
|
Outright
|
||||||
|
Bainbridge
|
||||||
|
Kitcat
|
||||||
|
Janek
|
||||||
|
Leech
|
||||||
|
Pavie
|
||||||
|
Hoolaghan
|
||||||
|
Matula
|
||||||
|
Haycock
|
||||||
|
Ungerechts
|
||||||
|
Omar
|
||||||
|
Davoren
|
||||||
|
Impey
|
||||||
|
Maffiotti
|
||||||
|
Pyrke
|
||||||
|
Beininck
|
||||||
|
Pizer
|
||||||
|
Melior
|
||||||
|
Yearnes
|
||||||
|
Rizzotto
|
||||||
|
Pincott
|
||||||
|
Shallcross
|
||||||
|
Marshal
|
||||||
|
|
||||||
|
Rubinowitsch
|
||||||
|
Pickance
|
||||||
|
Shearn
|
||||||
|
Edgerton
|
||||||
|
Crayker
|
||||||
|
Roebuck
|
||||||
|
Birchenhead
|
||||||
|
Shadrach
|
||||||
|
Sandercock
|
||||||
|
Rispin
|
||||||
|
Portch
|
||||||
|
Ebbens
|
||||||
|
Dransfield
|
||||||
|
Walster
|
||||||
|
|
||||||
|
Pilsbury
|
||||||
|
Lutzmann
|
||||||
|
Phillipson
|
||||||
|
Aldwick
|
||||||
|
Doyle
|
||||||
|
Starrs
|
||||||
|
Haugg
|
||||||
|
Lamplugh
|
||||||
|
Ketch
|
||||||
|
Arenson
|
||||||
|
Sasser
|
||||||
|
|
||||||
|
Severwright
|
||||||
|
Killner
|
||||||
|
Kubicka
|
||||||
|
Stanton
|
||||||
|
Jelley
|
||||||
|
Dorward
|
||||||
|
Jessel
|
||||||
|
Borel
|
||||||
|
Sutterfield
|
||||||
|
Treverton
|
||||||
|
|
||||||
|
Pero
|
||||||
|
Duffy
|
|
953
PostgreSQL/.csv/row_numbers.csv
Normal file
953
PostgreSQL/.csv/row_numbers.csv
Normal file
@ -0,0 +1,953 @@
|
|||||||
|
row_number
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
10
|
||||||
|
11
|
||||||
|
12
|
||||||
|
13
|
||||||
|
14
|
||||||
|
15
|
||||||
|
17
|
||||||
|
18
|
||||||
|
19
|
||||||
|
20
|
||||||
|
21
|
||||||
|
22
|
||||||
|
23
|
||||||
|
24
|
||||||
|
25
|
||||||
|
26
|
||||||
|
27
|
||||||
|
28
|
||||||
|
29
|
||||||
|
31
|
||||||
|
32
|
||||||
|
33
|
||||||
|
34
|
||||||
|
36
|
||||||
|
37
|
||||||
|
38
|
||||||
|
40
|
||||||
|
41
|
||||||
|
42
|
||||||
|
43
|
||||||
|
44
|
||||||
|
45
|
||||||
|
46
|
||||||
|
47
|
||||||
|
48
|
||||||
|
49
|
||||||
|
50
|
||||||
|
51
|
||||||
|
52
|
||||||
|
53
|
||||||
|
54
|
||||||
|
55
|
||||||
|
56
|
||||||
|
57
|
||||||
|
58
|
||||||
|
59
|
||||||
|
60
|
||||||
|
61
|
||||||
|
62
|
||||||
|
63
|
||||||
|
64
|
||||||
|
65
|
||||||
|
66
|
||||||
|
67
|
||||||
|
68
|
||||||
|
69
|
||||||
|
70
|
||||||
|
71
|
||||||
|
72
|
||||||
|
73
|
||||||
|
74
|
||||||
|
75
|
||||||
|
76
|
||||||
|
77
|
||||||
|
78
|
||||||
|
79
|
||||||
|
80
|
||||||
|
81
|
||||||
|
82
|
||||||
|
83
|
||||||
|
84
|
||||||
|
85
|
||||||
|
86
|
||||||
|
87
|
||||||
|
88
|
||||||
|
89
|
||||||
|
90
|
||||||
|
91
|
||||||
|
92
|
||||||
|
93
|
||||||
|
94
|
||||||
|
95
|
||||||
|
96
|
||||||
|
97
|
||||||
|
98
|
||||||
|
99
|
||||||
|
100
|
||||||
|
101
|
||||||
|
102
|
||||||
|
103
|
||||||
|
104
|
||||||
|
105
|
||||||
|
106
|
||||||
|
107
|
||||||
|
108
|
||||||
|
110
|
||||||
|
112
|
||||||
|
113
|
||||||
|
114
|
||||||
|
115
|
||||||
|
116
|
||||||
|
117
|
||||||
|
118
|
||||||
|
119
|
||||||
|
120
|
||||||
|
121
|
||||||
|
122
|
||||||
|
123
|
||||||
|
124
|
||||||
|
125
|
||||||
|
126
|
||||||
|
127
|
||||||
|
128
|
||||||
|
129
|
||||||
|
130
|
||||||
|
131
|
||||||
|
132
|
||||||
|
133
|
||||||
|
134
|
||||||
|
135
|
||||||
|
136
|
||||||
|
137
|
||||||
|
138
|
||||||
|
139
|
||||||
|
140
|
||||||
|
141
|
||||||
|
142
|
||||||
|
143
|
||||||
|
144
|
||||||
|
145
|
||||||
|
146
|
||||||
|
147
|
||||||
|
148
|
||||||
|
149
|
||||||
|
150
|
||||||
|
151
|
||||||
|
152
|
||||||
|
153
|
||||||
|
154
|
||||||
|
155
|
||||||
|
156
|
||||||
|
157
|
||||||
|
158
|
||||||
|
159
|
||||||
|
160
|
||||||
|
161
|
||||||
|
162
|
||||||
|
163
|
||||||
|
164
|
||||||
|
165
|
||||||
|
166
|
||||||
|
167
|
||||||
|
168
|
||||||
|
169
|
||||||
|
170
|
||||||
|
171
|
||||||
|
172
|
||||||
|
173
|
||||||
|
174
|
||||||
|
175
|
||||||
|
176
|
||||||
|
177
|
||||||
|
178
|
||||||
|
179
|
||||||
|
180
|
||||||
|
181
|
||||||
|
183
|
||||||
|
184
|
||||||
|
185
|
||||||
|
186
|
||||||
|
187
|
||||||
|
188
|
||||||
|
190
|
||||||
|
191
|
||||||
|
192
|
||||||
|
193
|
||||||
|
194
|
||||||
|
195
|
||||||
|
196
|
||||||
|
197
|
||||||
|
198
|
||||||
|
199
|
||||||
|
200
|
||||||
|
201
|
||||||
|
202
|
||||||
|
203
|
||||||
|
204
|
||||||
|
205
|
||||||
|
206
|
||||||
|
207
|
||||||
|
208
|
||||||
|
209
|
||||||
|
210
|
||||||
|
211
|
||||||
|
212
|
||||||
|
213
|
||||||
|
214
|
||||||
|
215
|
||||||
|
216
|
||||||
|
218
|
||||||
|
219
|
||||||
|
220
|
||||||
|
221
|
||||||
|
223
|
||||||
|
224
|
||||||
|
225
|
||||||
|
226
|
||||||
|
227
|
||||||
|
228
|
||||||
|
230
|
||||||
|
231
|
||||||
|
232
|
||||||
|
233
|
||||||
|
234
|
||||||
|
235
|
||||||
|
236
|
||||||
|
237
|
||||||
|
238
|
||||||
|
239
|
||||||
|
240
|
||||||
|
241
|
||||||
|
243
|
||||||
|
244
|
||||||
|
246
|
||||||
|
247
|
||||||
|
248
|
||||||
|
250
|
||||||
|
251
|
||||||
|
252
|
||||||
|
253
|
||||||
|
254
|
||||||
|
255
|
||||||
|
256
|
||||||
|
257
|
||||||
|
258
|
||||||
|
259
|
||||||
|
260
|
||||||
|
261
|
||||||
|
262
|
||||||
|
263
|
||||||
|
264
|
||||||
|
265
|
||||||
|
266
|
||||||
|
267
|
||||||
|
268
|
||||||
|
269
|
||||||
|
270
|
||||||
|
271
|
||||||
|
272
|
||||||
|
273
|
||||||
|
274
|
||||||
|
275
|
||||||
|
276
|
||||||
|
277
|
||||||
|
278
|
||||||
|
279
|
||||||
|
280
|
||||||
|
281
|
||||||
|
282
|
||||||
|
283
|
||||||
|
284
|
||||||
|
285
|
||||||
|
286
|
||||||
|
288
|
||||||
|
289
|
||||||
|
290
|
||||||
|
291
|
||||||
|
292
|
||||||
|
294
|
||||||
|
295
|
||||||
|
296
|
||||||
|
297
|
||||||
|
298
|
||||||
|
299
|
||||||
|
300
|
||||||
|
301
|
||||||
|
302
|
||||||
|
303
|
||||||
|
304
|
||||||
|
305
|
||||||
|
306
|
||||||
|
307
|
||||||
|
308
|
||||||
|
309
|
||||||
|
310
|
||||||
|
311
|
||||||
|
312
|
||||||
|
313
|
||||||
|
314
|
||||||
|
315
|
||||||
|
316
|
||||||
|
317
|
||||||
|
318
|
||||||
|
319
|
||||||
|
320
|
||||||
|
321
|
||||||
|
322
|
||||||
|
323
|
||||||
|
324
|
||||||
|
325
|
||||||
|
326
|
||||||
|
327
|
||||||
|
328
|
||||||
|
329
|
||||||
|
330
|
||||||
|
332
|
||||||
|
333
|
||||||
|
334
|
||||||
|
335
|
||||||
|
336
|
||||||
|
338
|
||||||
|
339
|
||||||
|
340
|
||||||
|
341
|
||||||
|
342
|
||||||
|
343
|
||||||
|
345
|
||||||
|
346
|
||||||
|
347
|
||||||
|
348
|
||||||
|
349
|
||||||
|
350
|
||||||
|
351
|
||||||
|
352
|
||||||
|
353
|
||||||
|
354
|
||||||
|
355
|
||||||
|
356
|
||||||
|
357
|
||||||
|
358
|
||||||
|
359
|
||||||
|
360
|
||||||
|
361
|
||||||
|
362
|
||||||
|
363
|
||||||
|
364
|
||||||
|
365
|
||||||
|
366
|
||||||
|
367
|
||||||
|
368
|
||||||
|
369
|
||||||
|
370
|
||||||
|
371
|
||||||
|
373
|
||||||
|
375
|
||||||
|
376
|
||||||
|
378
|
||||||
|
379
|
||||||
|
380
|
||||||
|
381
|
||||||
|
382
|
||||||
|
383
|
||||||
|
384
|
||||||
|
385
|
||||||
|
386
|
||||||
|
387
|
||||||
|
388
|
||||||
|
389
|
||||||
|
390
|
||||||
|
391
|
||||||
|
392
|
||||||
|
393
|
||||||
|
394
|
||||||
|
395
|
||||||
|
396
|
||||||
|
397
|
||||||
|
398
|
||||||
|
399
|
||||||
|
400
|
||||||
|
401
|
||||||
|
402
|
||||||
|
403
|
||||||
|
404
|
||||||
|
405
|
||||||
|
406
|
||||||
|
407
|
||||||
|
408
|
||||||
|
409
|
||||||
|
410
|
||||||
|
411
|
||||||
|
412
|
||||||
|
413
|
||||||
|
414
|
||||||
|
415
|
||||||
|
416
|
||||||
|
417
|
||||||
|
418
|
||||||
|
419
|
||||||
|
420
|
||||||
|
421
|
||||||
|
422
|
||||||
|
423
|
||||||
|
424
|
||||||
|
425
|
||||||
|
426
|
||||||
|
427
|
||||||
|
428
|
||||||
|
429
|
||||||
|
430
|
||||||
|
431
|
||||||
|
432
|
||||||
|
433
|
||||||
|
434
|
||||||
|
435
|
||||||
|
436
|
||||||
|
437
|
||||||
|
438
|
||||||
|
439
|
||||||
|
440
|
||||||
|
441
|
||||||
|
442
|
||||||
|
443
|
||||||
|
444
|
||||||
|
445
|
||||||
|
446
|
||||||
|
447
|
||||||
|
448
|
||||||
|
449
|
||||||
|
450
|
||||||
|
451
|
||||||
|
452
|
||||||
|
453
|
||||||
|
454
|
||||||
|
455
|
||||||
|
456
|
||||||
|
457
|
||||||
|
458
|
||||||
|
459
|
||||||
|
460
|
||||||
|
461
|
||||||
|
462
|
||||||
|
463
|
||||||
|
464
|
||||||
|
465
|
||||||
|
466
|
||||||
|
468
|
||||||
|
469
|
||||||
|
470
|
||||||
|
471
|
||||||
|
472
|
||||||
|
473
|
||||||
|
474
|
||||||
|
475
|
||||||
|
476
|
||||||
|
477
|
||||||
|
478
|
||||||
|
479
|
||||||
|
480
|
||||||
|
481
|
||||||
|
482
|
||||||
|
483
|
||||||
|
484
|
||||||
|
485
|
||||||
|
486
|
||||||
|
487
|
||||||
|
488
|
||||||
|
489
|
||||||
|
490
|
||||||
|
491
|
||||||
|
492
|
||||||
|
494
|
||||||
|
495
|
||||||
|
496
|
||||||
|
497
|
||||||
|
498
|
||||||
|
499
|
||||||
|
500
|
||||||
|
501
|
||||||
|
502
|
||||||
|
503
|
||||||
|
504
|
||||||
|
505
|
||||||
|
506
|
||||||
|
507
|
||||||
|
508
|
||||||
|
509
|
||||||
|
510
|
||||||
|
511
|
||||||
|
512
|
||||||
|
513
|
||||||
|
514
|
||||||
|
515
|
||||||
|
516
|
||||||
|
517
|
||||||
|
518
|
||||||
|
519
|
||||||
|
520
|
||||||
|
521
|
||||||
|
522
|
||||||
|
523
|
||||||
|
524
|
||||||
|
525
|
||||||
|
527
|
||||||
|
528
|
||||||
|
529
|
||||||
|
530
|
||||||
|
532
|
||||||
|
533
|
||||||
|
534
|
||||||
|
535
|
||||||
|
536
|
||||||
|
537
|
||||||
|
538
|
||||||
|
539
|
||||||
|
540
|
||||||
|
541
|
||||||
|
542
|
||||||
|
543
|
||||||
|
544
|
||||||
|
545
|
||||||
|
546
|
||||||
|
547
|
||||||
|
548
|
||||||
|
549
|
||||||
|
550
|
||||||
|
551
|
||||||
|
552
|
||||||
|
553
|
||||||
|
555
|
||||||
|
556
|
||||||
|
557
|
||||||
|
559
|
||||||
|
560
|
||||||
|
561
|
||||||
|
562
|
||||||
|
563
|
||||||
|
564
|
||||||
|
565
|
||||||
|
566
|
||||||
|
567
|
||||||
|
568
|
||||||
|
569
|
||||||
|
570
|
||||||
|
571
|
||||||
|
572
|
||||||
|
574
|
||||||
|
575
|
||||||
|
576
|
||||||
|
577
|
||||||
|
578
|
||||||
|
579
|
||||||
|
580
|
||||||
|
581
|
||||||
|
582
|
||||||
|
583
|
||||||
|
584
|
||||||
|
585
|
||||||
|
586
|
||||||
|
587
|
||||||
|
588
|
||||||
|
589
|
||||||
|
590
|
||||||
|
591
|
||||||
|
593
|
||||||
|
594
|
||||||
|
595
|
||||||
|
596
|
||||||
|
597
|
||||||
|
598
|
||||||
|
599
|
||||||
|
601
|
||||||
|
602
|
||||||
|
603
|
||||||
|
604
|
||||||
|
605
|
||||||
|
606
|
||||||
|
607
|
||||||
|
608
|
||||||
|
609
|
||||||
|
610
|
||||||
|
611
|
||||||
|
612
|
||||||
|
613
|
||||||
|
614
|
||||||
|
615
|
||||||
|
617
|
||||||
|
618
|
||||||
|
619
|
||||||
|
620
|
||||||
|
622
|
||||||
|
623
|
||||||
|
624
|
||||||
|
625
|
||||||
|
626
|
||||||
|
627
|
||||||
|
628
|
||||||
|
629
|
||||||
|
630
|
||||||
|
632
|
||||||
|
633
|
||||||
|
634
|
||||||
|
635
|
||||||
|
636
|
||||||
|
637
|
||||||
|
638
|
||||||
|
639
|
||||||
|
640
|
||||||
|
641
|
||||||
|
642
|
||||||
|
643
|
||||||
|
645
|
||||||
|
646
|
||||||
|
647
|
||||||
|
649
|
||||||
|
650
|
||||||
|
651
|
||||||
|
653
|
||||||
|
654
|
||||||
|
655
|
||||||
|
656
|
||||||
|
658
|
||||||
|
659
|
||||||
|
660
|
||||||
|
661
|
||||||
|
662
|
||||||
|
663
|
||||||
|
664
|
||||||
|
665
|
||||||
|
666
|
||||||
|
667
|
||||||
|
668
|
||||||
|
669
|
||||||
|
670
|
||||||
|
671
|
||||||
|
672
|
||||||
|
673
|
||||||
|
674
|
||||||
|
675
|
||||||
|
676
|
||||||
|
677
|
||||||
|
678
|
||||||
|
679
|
||||||
|
680
|
||||||
|
681
|
||||||
|
682
|
||||||
|
683
|
||||||
|
684
|
||||||
|
685
|
||||||
|
686
|
||||||
|
687
|
||||||
|
688
|
||||||
|
689
|
||||||
|
690
|
||||||
|
691
|
||||||
|
692
|
||||||
|
693
|
||||||
|
694
|
||||||
|
695
|
||||||
|
696
|
||||||
|
697
|
||||||
|
698
|
||||||
|
699
|
||||||
|
700
|
||||||
|
701
|
||||||
|
702
|
||||||
|
703
|
||||||
|
704
|
||||||
|
705
|
||||||
|
706
|
||||||
|
707
|
||||||
|
709
|
||||||
|
710
|
||||||
|
711
|
||||||
|
712
|
||||||
|
713
|
||||||
|
714
|
||||||
|
715
|
||||||
|
716
|
||||||
|
717
|
||||||
|
719
|
||||||
|
720
|
||||||
|
721
|
||||||
|
722
|
||||||
|
723
|
||||||
|
724
|
||||||
|
725
|
||||||
|
726
|
||||||
|
727
|
||||||
|
728
|
||||||
|
729
|
||||||
|
730
|
||||||
|
731
|
||||||
|
732
|
||||||
|
733
|
||||||
|
734
|
||||||
|
735
|
||||||
|
736
|
||||||
|
737
|
||||||
|
738
|
||||||
|
739
|
||||||
|
740
|
||||||
|
741
|
||||||
|
742
|
||||||
|
743
|
||||||
|
744
|
||||||
|
745
|
||||||
|
746
|
||||||
|
747
|
||||||
|
748
|
||||||
|
749
|
||||||
|
750
|
||||||
|
751
|
||||||
|
752
|
||||||
|
753
|
||||||
|
754
|
||||||
|
757
|
||||||
|
758
|
||||||
|
759
|
||||||
|
760
|
||||||
|
761
|
||||||
|
762
|
||||||
|
763
|
||||||
|
764
|
||||||
|
765
|
||||||
|
766
|
||||||
|
767
|
||||||
|
768
|
||||||
|
769
|
||||||
|
770
|
||||||
|
771
|
||||||
|
772
|
||||||
|
773
|
||||||
|
774
|
||||||
|
775
|
||||||
|
776
|
||||||
|
777
|
||||||
|
778
|
||||||
|
779
|
||||||
|
780
|
||||||
|
781
|
||||||
|
782
|
||||||
|
783
|
||||||
|
784
|
||||||
|
785
|
||||||
|
786
|
||||||
|
787
|
||||||
|
788
|
||||||
|
789
|
||||||
|
790
|
||||||
|
791
|
||||||
|
792
|
||||||
|
793
|
||||||
|
794
|
||||||
|
795
|
||||||
|
796
|
||||||
|
797
|
||||||
|
798
|
||||||
|
799
|
||||||
|
800
|
||||||
|
801
|
||||||
|
802
|
||||||
|
803
|
||||||
|
804
|
||||||
|
805
|
||||||
|
806
|
||||||
|
807
|
||||||
|
808
|
||||||
|
809
|
||||||
|
810
|
||||||
|
811
|
||||||
|
812
|
||||||
|
813
|
||||||
|
814
|
||||||
|
815
|
||||||
|
816
|
||||||
|
817
|
||||||
|
818
|
||||||
|
819
|
||||||
|
820
|
||||||
|
822
|
||||||
|
823
|
||||||
|
824
|
||||||
|
825
|
||||||
|
826
|
||||||
|
827
|
||||||
|
828
|
||||||
|
829
|
||||||
|
830
|
||||||
|
831
|
||||||
|
832
|
||||||
|
833
|
||||||
|
834
|
||||||
|
835
|
||||||
|
837
|
||||||
|
838
|
||||||
|
839
|
||||||
|
840
|
||||||
|
841
|
||||||
|
842
|
||||||
|
843
|
||||||
|
844
|
||||||
|
845
|
||||||
|
846
|
||||||
|
847
|
||||||
|
848
|
||||||
|
849
|
||||||
|
850
|
||||||
|
851
|
||||||
|
852
|
||||||
|
853
|
||||||
|
854
|
||||||
|
855
|
||||||
|
857
|
||||||
|
858
|
||||||
|
859
|
||||||
|
860
|
||||||
|
861
|
||||||
|
862
|
||||||
|
863
|
||||||
|
864
|
||||||
|
865
|
||||||
|
866
|
||||||
|
867
|
||||||
|
868
|
||||||
|
869
|
||||||
|
870
|
||||||
|
872
|
||||||
|
873
|
||||||
|
874
|
||||||
|
875
|
||||||
|
876
|
||||||
|
877
|
||||||
|
878
|
||||||
|
879
|
||||||
|
880
|
||||||
|
881
|
||||||
|
882
|
||||||
|
883
|
||||||
|
884
|
||||||
|
885
|
||||||
|
886
|
||||||
|
887
|
||||||
|
888
|
||||||
|
889
|
||||||
|
890
|
||||||
|
891
|
||||||
|
892
|
||||||
|
893
|
||||||
|
894
|
||||||
|
895
|
||||||
|
896
|
||||||
|
897
|
||||||
|
898
|
||||||
|
899
|
||||||
|
900
|
||||||
|
901
|
||||||
|
902
|
||||||
|
903
|
||||||
|
904
|
||||||
|
905
|
||||||
|
906
|
||||||
|
907
|
||||||
|
909
|
||||||
|
910
|
||||||
|
911
|
||||||
|
912
|
||||||
|
913
|
||||||
|
914
|
||||||
|
915
|
||||||
|
916
|
||||||
|
918
|
||||||
|
919
|
||||||
|
920
|
||||||
|
921
|
||||||
|
922
|
||||||
|
923
|
||||||
|
924
|
||||||
|
925
|
||||||
|
926
|
||||||
|
927
|
||||||
|
928
|
||||||
|
929
|
||||||
|
930
|
||||||
|
931
|
||||||
|
932
|
||||||
|
933
|
||||||
|
934
|
||||||
|
935
|
||||||
|
936
|
||||||
|
937
|
||||||
|
938
|
||||||
|
939
|
||||||
|
940
|
||||||
|
941
|
||||||
|
942
|
||||||
|
943
|
||||||
|
944
|
||||||
|
945
|
||||||
|
946
|
||||||
|
947
|
||||||
|
948
|
||||||
|
949
|
||||||
|
950
|
||||||
|
951
|
||||||
|
952
|
||||||
|
953
|
||||||
|
954
|
||||||
|
955
|
||||||
|
956
|
||||||
|
957
|
||||||
|
958
|
||||||
|
959
|
||||||
|
960
|
||||||
|
961
|
||||||
|
962
|
||||||
|
963
|
||||||
|
964
|
||||||
|
965
|
||||||
|
966
|
||||||
|
967
|
||||||
|
968
|
||||||
|
969
|
||||||
|
970
|
||||||
|
971
|
||||||
|
972
|
||||||
|
973
|
||||||
|
974
|
||||||
|
975
|
||||||
|
976
|
||||||
|
977
|
||||||
|
978
|
||||||
|
979
|
||||||
|
980
|
||||||
|
981
|
||||||
|
982
|
||||||
|
983
|
||||||
|
984
|
||||||
|
985
|
||||||
|
986
|
||||||
|
987
|
||||||
|
988
|
||||||
|
989
|
||||||
|
990
|
||||||
|
991
|
||||||
|
992
|
||||||
|
993
|
||||||
|
994
|
||||||
|
995
|
||||||
|
996
|
||||||
|
997
|
||||||
|
998
|
||||||
|
999
|
||||||
|
1000
|
|
1000
PostgreSQL/.csv/sentences.csv
Normal file
1000
PostgreSQL/.csv/sentences.csv
Normal file
File diff suppressed because it is too large
Load Diff
1001
PostgreSQL/.csv/urls.csv
Normal file
1001
PostgreSQL/.csv/urls.csv
Normal file
File diff suppressed because it is too large
Load Diff
1001
PostgreSQL/.csv/words.csv
Normal file
1001
PostgreSQL/.csv/words.csv
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,5 +3,4 @@ FROM postgres:17
|
|||||||
WORKDIR /db
|
WORKDIR /db
|
||||||
|
|
||||||
# postgresql will execute the files in that folder after build
|
# postgresql will execute the files in that folder after build
|
||||||
COPY tables/tables.sql /docker-entrypoint-initdb.d/
|
COPY build/* /docker-entrypoint-initdb.d/
|
||||||
|
|
||||||
|
30
PostgreSQL/Makefile
Normal file
30
PostgreSQL/Makefile
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
DIR_SRC = src
|
||||||
|
DIR_BUILD = build
|
||||||
|
|
||||||
|
BIN = 00_drop.sql 01_create.sql 02_insert.sql \
|
||||||
|
03_select.sql 04_update.sql
|
||||||
|
|
||||||
|
all: $(BIN)
|
||||||
|
|
||||||
|
generate_data:
|
||||||
|
python generate_data.py
|
||||||
|
rm .data/*.data
|
||||||
|
|
||||||
|
00_drop.sql:
|
||||||
|
cp $(DIR_SRC)/drop.sql $(DIR_BUILD)/$@
|
||||||
|
|
||||||
|
01_create.sql:
|
||||||
|
cp $(DIR_SRC)/create.sql $(DIR_BUILD)/$@
|
||||||
|
|
||||||
|
02_insert.sql:
|
||||||
|
cp $(DIR_SRC)/insert.sql $(DIR_BUILD)/$@
|
||||||
|
|
||||||
|
03_select.sql:
|
||||||
|
cp $(DIR_SRC)/select.sql $(DIR_BUILD)/$@
|
||||||
|
|
||||||
|
04_update.sql:
|
||||||
|
cp $(DIR_SRC)/update.sql $(DIR_BUILD)/$@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(DIR_BUILD)/* .data/*.data
|
||||||
|
|
633
PostgreSQL/generate_data.py
Normal file
633
PostgreSQL/generate_data.py
Normal file
@ -0,0 +1,633 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# PYTHON SCRIPT TO RANDOMLY GENERATE DATA
|
||||||
|
# STEPS :
|
||||||
|
# 1 --> Generate a line of a table.
|
||||||
|
# 2 --> Generate an entire table.
|
||||||
|
# 3 --> Resolve the issues of dependencies and others.
|
||||||
|
# 4 --> Convert the created tables to the PostgreSQL code.
|
||||||
|
# Bonus --> Enjoy !
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
import os
|
||||||
|
import random
|
||||||
|
import csv
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# HERE IS ALL THE RAW DATA
|
||||||
|
#
|
||||||
|
# It is just csv files with for each a single column.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
pathIntegers : str = ".csv/row_numbers.csv"
|
||||||
|
pathSentences : str = ".csv/sentences.csv"
|
||||||
|
pathUrls : str = ".csv/urls.csv"
|
||||||
|
pathWords : str = ".csv/words.csv"
|
||||||
|
pathNames : str = ".csv/names.csv"
|
||||||
|
pathNameModels : str = ".csv/name_models.csv"
|
||||||
|
pathDates : str = ".csv/dates.csv"
|
||||||
|
pathColors : str = ".csv/colors.csv"
|
||||||
|
pathBrands : str = ".csv/brands.csv"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# TO KNOW WHICH NUMBER IS USED FOR A PRIMARY KEY
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def initialize_dict_primary_key(pathFile : str) -> dict:
|
||||||
|
"""
|
||||||
|
:param pathFile: merely is `pathIntegers`.
|
||||||
|
"""
|
||||||
|
d : dict = {}
|
||||||
|
|
||||||
|
with open(pathFile, 'r') as toto:
|
||||||
|
csvList = list(csv.reader(toto))
|
||||||
|
|
||||||
|
for element in csvList[1:]:
|
||||||
|
d[int(element[0])] = 0
|
||||||
|
|
||||||
|
return d
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# id_truc = { X (int) : 1 or 0 } 1 for used, 0 for not.
|
||||||
|
idMembreDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idBoiteDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idCouleurDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idFilDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idFormeDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idIllustrDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idMarqueDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idMessageDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idModeleDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idMotifDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idPieceDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idPieceCompDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
idTagDict : dict = initialize_dict_primary_key(pathIntegers)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# STEP 1 : GENERATE A LINE OF A TABLE
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def give_used_key(idDict : dict) -> str:
|
||||||
|
"""
|
||||||
|
:param idDict: idTructDict.
|
||||||
|
:return: a key X that is used i.e idTrucDict[X] == 1
|
||||||
|
"""
|
||||||
|
dictUsed : dict = { k: v for k, v in idDict.items() if v == 1 }
|
||||||
|
keysUsed : list = list(dictUsed.keys())
|
||||||
|
length : int = len(keysUsed)
|
||||||
|
|
||||||
|
# If the associated table has no instances yet.
|
||||||
|
if length == 0:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
randomKey : int = keysUsed[random.randrange(length)]
|
||||||
|
return str(randomKey)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def give_not_used_key(idDict : dict) -> str:
|
||||||
|
"""
|
||||||
|
:param idDict: idTructDict.
|
||||||
|
:return: a key X that is not used i.e idTrucDict[X] == 0
|
||||||
|
It updates the dict : 0 --> 1.
|
||||||
|
"""
|
||||||
|
dictNotUsed : dict = { k: v for k, v in idDict.items() if v == 0 }
|
||||||
|
keysNotUsed : list = list(dictNotUsed.keys())
|
||||||
|
|
||||||
|
# If the associated table has no instances yet.
|
||||||
|
if len(keysNotUsed) == 0:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
randomKey : int = random.choice(keysNotUsed)
|
||||||
|
idDict[randomKey] = 1
|
||||||
|
return str(randomKey)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# USED FOR NOT PRIMARY KEY VARIABLES
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def random_element(pathFile : str) -> str:
|
||||||
|
"""
|
||||||
|
:param pathFile: the relative path of the csv file to read.
|
||||||
|
:return: a random element from this file.
|
||||||
|
"""
|
||||||
|
with open(pathFile, 'r') as file:
|
||||||
|
csvList : list = list(csv.reader(file))
|
||||||
|
random_index_line : int = random.randint(1, len(csvList) - 1)
|
||||||
|
return "" if ( csvList[random_index_line] == [] ) \
|
||||||
|
else csvList[random_index_line][0]
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def construct_line(*args : tuple) -> str:
|
||||||
|
"""
|
||||||
|
:param *args: a tuple of elements.
|
||||||
|
example : [ "1", "'toto'", "'Lorem PIPsum'", "42" ].
|
||||||
|
:return: a line to give to the sql.
|
||||||
|
example : "(1, 'toto', 'Lorem PIPsum', 42)".
|
||||||
|
"""
|
||||||
|
return "(" + ', '.join(list(args)) + ")"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def generate_line_acheter(idMembre : str, idPiece : str,
|
||||||
|
quantite : str) -> str:
|
||||||
|
return construct_line(idMembre, idPiece, quantite)
|
||||||
|
|
||||||
|
def generate_line_avoir_motif(idPiece : str, idMotif : str) -> str:
|
||||||
|
return construct_line(idPiece, idMotif)
|
||||||
|
|
||||||
|
def generate_line_avoir_tag(idTag : str, idBoite : str) -> str:
|
||||||
|
return construct_line(idTag, idBoite)
|
||||||
|
|
||||||
|
def generate_line_boites(idMarque : str) -> str:
|
||||||
|
idBoite : str = give_not_used_key(idBoiteDict)
|
||||||
|
titre : str = "\'" + random_element(pathWords) + "\'"
|
||||||
|
dateBoite : str = "\'" + random_element(pathDates) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idBoite, titre, dateBoite, idMarque)
|
||||||
|
|
||||||
|
def generate_line_colorer(idPiece : str, idCouleur : str) -> str:
|
||||||
|
return construct_line(idPiece, idCouleur)
|
||||||
|
|
||||||
|
def generate_line_construire(idBoite : str, idModele : str) -> str:
|
||||||
|
return construct_line(idBoite, idModele)
|
||||||
|
|
||||||
|
def generate_line_contenir(idBoite : str, idPiece : str,
|
||||||
|
quantite : str) -> str:
|
||||||
|
return construct_line(idBoite, idPiece, quantite)
|
||||||
|
|
||||||
|
def generate_line_couleurs() -> str:
|
||||||
|
idCouleur : str = give_not_used_key(idCouleurDict)
|
||||||
|
nomCouleur : str = "\'" + random_element(pathColors) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idCouleur, nomCouleur)
|
||||||
|
|
||||||
|
def generate_line_enregistrer(idBoite : str, idMembre : str,
|
||||||
|
quantite : str) -> str:
|
||||||
|
return construct_line(idBoite, idMembre, quantite)
|
||||||
|
|
||||||
|
def generate_line_etre(idPiece : str, idMarque : str) -> str:
|
||||||
|
return construct_line(idPiece, idMarque)
|
||||||
|
|
||||||
|
def generate_line_etre_complexe(idPiece : str, idPieceComp : str) -> str:
|
||||||
|
return construct_line(idPiece, idPieceComp)
|
||||||
|
|
||||||
|
def generate_line_etre_forme(idForme : str, idPiece : str) -> str:
|
||||||
|
return construct_line(idForme, idPiece)
|
||||||
|
|
||||||
|
def generate_line_fils(idModele : str) -> str:
|
||||||
|
idFil : str = give_not_used_key(idFilDict)
|
||||||
|
|
||||||
|
return construct_line(idFil, idModele)
|
||||||
|
|
||||||
|
def generate_line_illustrations(idModele : str) -> str:
|
||||||
|
idIllustr : str = give_not_used_key(idIllustrDict)
|
||||||
|
urlIllustr : str = "\'" + random_element(pathUrls) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idIllustr, urlIllustr, idModele)
|
||||||
|
|
||||||
|
def generate_line_marques() -> str:
|
||||||
|
idMarque : str = give_not_used_key(idMarqueDict)
|
||||||
|
nomMarque : str = "\'" + random_element(pathBrands) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idMarque, nomMarque)
|
||||||
|
|
||||||
|
def generate_line_membres() -> str:
|
||||||
|
idMembre : str = give_not_used_key(idMembreDict)
|
||||||
|
nomMembre : str = "\'" + random_element(pathNames) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idMembre, nomMembre)
|
||||||
|
|
||||||
|
def generate_line_messages(idMembre : str, idFil : str,
|
||||||
|
idMessage2 : str) -> str:
|
||||||
|
idMessage : str = give_not_used_key(idMessageDict)
|
||||||
|
contenu : str = "\'" + random_element(pathSentences) + "\'"
|
||||||
|
|
||||||
|
# When the first message is declared.
|
||||||
|
if idMessage2 == '':
|
||||||
|
idMessage2 = idMessage
|
||||||
|
|
||||||
|
return construct_line(idMessage, contenu, idMembre, idFil, \
|
||||||
|
idMessage2)
|
||||||
|
|
||||||
|
def generate_line_modeles(idMembre : str, idModeleEte : str) -> str:
|
||||||
|
idModele : str = give_not_used_key(idModeleDict)
|
||||||
|
nomModele : str = "\'" + random_element(pathNameModels) + "\'"
|
||||||
|
urlNotice : str = "\'" + random_element(pathUrls) + "\'"
|
||||||
|
|
||||||
|
# When the first modele is declared.
|
||||||
|
if idModeleEte == '':
|
||||||
|
idModeleEte = idModele
|
||||||
|
|
||||||
|
return construct_line(idModele, nomModele, urlNotice, idMembre, \
|
||||||
|
idModeleEte)
|
||||||
|
|
||||||
|
def generate_line_necessiter(idModele : str, idPiece : str,
|
||||||
|
quantite : str) -> str:
|
||||||
|
return construct_line(idModele, idPiece, quantite)
|
||||||
|
|
||||||
|
def generate_line_noter(idModele : str, idMembre : str) -> str:
|
||||||
|
note : str = "\'" + random_element(pathSentences) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idModele, idMembre, note)
|
||||||
|
|
||||||
|
def generate_line_perdre(idMembre : str, idBoite : str,
|
||||||
|
idPiece : str, quantite : str) -> str:
|
||||||
|
return construct_line(idMembre, idBoite, idPiece, quantite)
|
||||||
|
|
||||||
|
def generate_line_tags() -> str:
|
||||||
|
idTag : str = give_not_used_key(idTagDict)
|
||||||
|
nomTag : str = "\'" + random_element(pathWords) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idTag, nomTag)
|
||||||
|
|
||||||
|
def generate_line_varier(idModele_1 : str, idModele_et : str) -> str:
|
||||||
|
return construct_line(idModele_1, idModele_et)
|
||||||
|
|
||||||
|
def generate_line_formes() -> str:
|
||||||
|
idForme : str = give_not_used_key(idFormeDict)
|
||||||
|
nomForme : str = "\'" + random_element(pathWords) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idForme, nomForme)
|
||||||
|
|
||||||
|
def generate_line_motifs() -> str:
|
||||||
|
idMotif : str = give_not_used_key(idMotifDict)
|
||||||
|
nomMotif : str = "\'" + random_element(pathWords) + "\'"
|
||||||
|
|
||||||
|
return construct_line(idMotif, nomMotif)
|
||||||
|
|
||||||
|
def generate_line_pieces() -> str:
|
||||||
|
idPiece : str = give_not_used_key(idPieceDict)
|
||||||
|
|
||||||
|
return construct_line(idPiece)
|
||||||
|
|
||||||
|
def generate_line_pieces_complexes() -> str:
|
||||||
|
idPieceCo : str = give_not_used_key(idPieceCompDict)
|
||||||
|
|
||||||
|
return construct_line(idPieceCo)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# STEP 2 : GENERATE AN ENTIRE TABLE
|
||||||
|
#
|
||||||
|
# It is temporarily stored in a file with the extension .data
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def store_a_line_in_table(pathFile : str, funcGenerationLine) -> None:
|
||||||
|
"""
|
||||||
|
:param pathFile: the relative path where we want to store the table.
|
||||||
|
:param funcGenerationLine: the function generate_line_* for the table.
|
||||||
|
|
||||||
|
Write the line of the table in a .data file.
|
||||||
|
"""
|
||||||
|
with open(pathFile, 'a+') as file: # w+ : if does not exist.
|
||||||
|
file.write(funcGenerationLine() + ",\n")
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def store_table(nbElements : int, nameTable : str, funcGenerationLine) -> None:
|
||||||
|
"""
|
||||||
|
:param nbElements: the number of instances we want to get.
|
||||||
|
:param nameTable: from `dictTables.keys()`.
|
||||||
|
:param funcGenerationLine: the function generate_line_* for the table.
|
||||||
|
"""
|
||||||
|
for i in range(nbElements):
|
||||||
|
store_a_line_in_table(give_path_file(nameTable), funcGenerationLine)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def generate_table(nbElements : int, nameTable : str, funcGen) -> None:
|
||||||
|
for i in range(nbElements):
|
||||||
|
store_table(1, nameTable, funcGen)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def generate_table_using_quantite(nbElements : int, nameTable : str,
|
||||||
|
funcGen) -> None:
|
||||||
|
# total : int = nbElements
|
||||||
|
# for i in range(nbElements):
|
||||||
|
# quantite : int = random.randint(0, int(total / 10)) if i < nbElements \
|
||||||
|
# else total
|
||||||
|
# total = total - quantite
|
||||||
|
# funcGen_2 = lambda : funcGen(
|
||||||
|
# str(quantite)
|
||||||
|
# )
|
||||||
|
|
||||||
|
# store_table(1, nameTable, funcGen_2)
|
||||||
|
for i in range(nbElements):
|
||||||
|
quantite : int = random.randint(0, nbElements)
|
||||||
|
|
||||||
|
funcGen_2 = lambda : funcGen( str(quantite) )
|
||||||
|
store_table(1, nameTable, funcGen_2)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# STEP 3 : RESOLVE THE ISSUES OF DEPENDENCIES AND OTHERS
|
||||||
|
#
|
||||||
|
# Just edits the .data files.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def remove_duplicata(pathFile : str) -> None:
|
||||||
|
"""
|
||||||
|
:param pathFile: a .data file.
|
||||||
|
"""
|
||||||
|
lines_seen = set() # holds lines already seen.
|
||||||
|
|
||||||
|
outfile = open("temp.data", "w")
|
||||||
|
for line in open(pathFile, "r"):
|
||||||
|
if line not in lines_seen: # not a duplicate.
|
||||||
|
outfile.write(line)
|
||||||
|
lines_seen.add(line)
|
||||||
|
outfile.close()
|
||||||
|
|
||||||
|
os.rename("temp.data", pathFile)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# STEP 4 : CONVERSION TO PostgreSQL
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def convert_table_to_sql(pathFile : str, nameTable : str) -> None:
|
||||||
|
"""
|
||||||
|
:param pathFile: the relative path to the .data file
|
||||||
|
which contains the table.
|
||||||
|
:param nameTable: the name of the table.
|
||||||
|
|
||||||
|
Write the code in append mode to the file called `insert.sql`.
|
||||||
|
"""
|
||||||
|
fileSql = open("src/insert.sql", 'a') # append mode.
|
||||||
|
|
||||||
|
fileSql.write("INSERT INTO " + nameTable + " VALUES\n")
|
||||||
|
|
||||||
|
if os.path.exists(pathFile):
|
||||||
|
with open(pathFile, 'r') as fileData:
|
||||||
|
fileSql.writelines(fileData.readlines())
|
||||||
|
|
||||||
|
fileSql.close()
|
||||||
|
|
||||||
|
# Replace last ',' by ';'.
|
||||||
|
with open("src/insert.sql", 'rb+') as fileSql:
|
||||||
|
fileSql.seek(-2, 2)
|
||||||
|
fileSql.truncate()
|
||||||
|
|
||||||
|
with open("src/insert.sql", 'a') as fileSql:
|
||||||
|
fileSql.write(";\n")
|
||||||
|
fileSql.write("\n")
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
tablesDict : dict = {
|
||||||
|
"membres" : generate_line_membres,
|
||||||
|
"couleurs" : generate_line_couleurs,
|
||||||
|
"marques" : generate_line_marques,
|
||||||
|
"tags" : generate_line_tags,
|
||||||
|
"formes" : generate_line_formes,
|
||||||
|
"motifs" : generate_line_motifs,
|
||||||
|
"pieces" : generate_line_pieces,
|
||||||
|
"pieces_complexes" : generate_line_pieces_complexes,
|
||||||
|
"modeles" : generate_line_modeles,
|
||||||
|
"boites" : generate_line_boites,
|
||||||
|
"fils" : generate_line_fils,
|
||||||
|
"messages" : generate_line_messages,
|
||||||
|
"illustrations" : generate_line_illustrations,
|
||||||
|
"acheter" : generate_line_acheter,
|
||||||
|
"avoir_motif" : generate_line_avoir_motif,
|
||||||
|
"avoir_tag" : generate_line_avoir_tag,
|
||||||
|
"colorer" : generate_line_colorer,
|
||||||
|
"construire" : generate_line_construire,
|
||||||
|
"contenir" : generate_line_contenir,
|
||||||
|
"enregistrer" : generate_line_enregistrer,
|
||||||
|
"etre" : generate_line_etre,
|
||||||
|
"etre_complexe" : generate_line_etre_complexe,
|
||||||
|
"etre_forme" : generate_line_etre_forme,
|
||||||
|
"necessiter" : generate_line_necessiter,
|
||||||
|
"noter" : generate_line_noter,
|
||||||
|
"perdre" : generate_line_perdre,
|
||||||
|
"varier" : generate_line_varier
|
||||||
|
}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def give_path_file(nameTable : str) -> str:
|
||||||
|
repertory : str = ".data/"
|
||||||
|
return repertory + nameTable + ".data"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
###########################################################################
|
||||||
|
#
|
||||||
|
# The tables that have no foreign keys.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
nbMembres : int = 101
|
||||||
|
store_table(nbMembres, "membres", tablesDict["membres"])
|
||||||
|
|
||||||
|
nbCouleurs : int = 21
|
||||||
|
store_table(nbCouleurs, "couleurs", tablesDict["couleurs"])
|
||||||
|
|
||||||
|
nbMarques : int = 10
|
||||||
|
store_table(nbMarques, "marques", tablesDict["marques"])
|
||||||
|
|
||||||
|
nbTags : int = 69
|
||||||
|
store_table(nbTags, "tags", tablesDict["tags"])
|
||||||
|
|
||||||
|
nbFormes : int = 69
|
||||||
|
store_table(nbFormes, "formes", tablesDict["formes"])
|
||||||
|
|
||||||
|
nbMotifs : int = 100
|
||||||
|
store_table(nbMotifs, "motifs", tablesDict["motifs"])
|
||||||
|
|
||||||
|
nbPieces : int = 750
|
||||||
|
store_table(nbPieces, "pieces", tablesDict["pieces"])
|
||||||
|
|
||||||
|
nbPiecesComp : int = 250
|
||||||
|
store_table(nbPiecesComp, "pieces_complexes",
|
||||||
|
tablesDict["pieces_complexes"])
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
#
|
||||||
|
# The tables that are needed for the verb tables.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
nbModeles : int = 10
|
||||||
|
funcGen = lambda : tablesDict["modeles"](
|
||||||
|
give_used_key(idMembreDict),
|
||||||
|
give_used_key(idModeleDict)
|
||||||
|
)
|
||||||
|
generate_table(nbModeles, "modeles", funcGen)
|
||||||
|
|
||||||
|
nbBoites : int = 20
|
||||||
|
funcGen = lambda : tablesDict["boites"](
|
||||||
|
give_used_key(idMarqueDict)
|
||||||
|
)
|
||||||
|
generate_table(nbBoites, "boites", funcGen)
|
||||||
|
|
||||||
|
nbFils : int = 100
|
||||||
|
funcGen = lambda : tablesDict["fils"](
|
||||||
|
give_used_key(idModeleDict)
|
||||||
|
)
|
||||||
|
generate_table(nbFils, "fils", funcGen)
|
||||||
|
|
||||||
|
nbMessages : int = 300
|
||||||
|
funcGen = lambda : tablesDict["messages"](
|
||||||
|
give_used_key(idMembreDict),
|
||||||
|
give_used_key(idFilDict),
|
||||||
|
give_used_key(idMessageDict)
|
||||||
|
)
|
||||||
|
generate_table(nbMessages, "messages", funcGen)
|
||||||
|
|
||||||
|
nbIllustrations : int = nbModeles
|
||||||
|
funcGen = lambda : tablesDict["illustrations"](
|
||||||
|
give_used_key(idModeleDict)
|
||||||
|
)
|
||||||
|
generate_table(nbIllustrations, "illustrations", funcGen)
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
#
|
||||||
|
# The verb tables.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
nbAcheter : int = nbMembres if nbMembres < nbPieces else nbPieces
|
||||||
|
funcGen = lambda x: tablesDict["acheter"](
|
||||||
|
give_used_key(idMembreDict),
|
||||||
|
give_used_key(idPieceDict),
|
||||||
|
x
|
||||||
|
)
|
||||||
|
generate_table_using_quantite(nbAcheter, "acheter", funcGen)
|
||||||
|
|
||||||
|
nbAvoirMotif : int = nbPieces if nbPieces < nbMotifs else nbMotifs
|
||||||
|
funcGen = lambda : tablesDict["avoir_motif"](
|
||||||
|
give_used_key(idPieceDict),
|
||||||
|
give_used_key(idMotifDict)
|
||||||
|
)
|
||||||
|
generate_table(nbAvoirMotif, "avoir_motif", funcGen)
|
||||||
|
|
||||||
|
nbAvoirTag : int = nbTags if nbTags < nbBoites else nbBoites
|
||||||
|
funcGen = lambda : tablesDict["avoir_tag"](
|
||||||
|
give_used_key(idTagDict),
|
||||||
|
give_used_key(idBoiteDict)
|
||||||
|
)
|
||||||
|
generate_table(nbAvoirTag, "avoir_tag", funcGen)
|
||||||
|
|
||||||
|
nbColorer : int = nbPieces if nbPieces < nbCouleurs else nbCouleurs
|
||||||
|
funcGen = lambda : tablesDict["colorer"](
|
||||||
|
give_used_key(idPieceDict),
|
||||||
|
give_used_key(idCouleurDict)
|
||||||
|
)
|
||||||
|
generate_table(nbColorer, "colorer", funcGen)
|
||||||
|
|
||||||
|
nbConstruire : int = nbBoites if nbBoites < nbModeles else nbModeles
|
||||||
|
funcGen = lambda : tablesDict["construire"](
|
||||||
|
give_used_key(idBoiteDict),
|
||||||
|
give_used_key(idModeleDict)
|
||||||
|
)
|
||||||
|
generate_table(nbConstruire, "construire", funcGen)
|
||||||
|
|
||||||
|
nbContenir : int = nbBoites if nbBoites < nbPieces else nbPieces
|
||||||
|
funcGen = lambda x: tablesDict["contenir"](
|
||||||
|
give_used_key(idBoiteDict),
|
||||||
|
give_used_key(idPieceDict),
|
||||||
|
x
|
||||||
|
)
|
||||||
|
generate_table_using_quantite(nbContenir, "contenir", funcGen)
|
||||||
|
|
||||||
|
nbEnregistrer : int = nbBoites if nbBoites < nbMembres else nbMembres
|
||||||
|
funcGen = lambda x: tablesDict["enregistrer"](
|
||||||
|
give_used_key(idBoiteDict),
|
||||||
|
give_used_key(idMembreDict),
|
||||||
|
x
|
||||||
|
)
|
||||||
|
generate_table_using_quantite(nbEnregistrer, "enregistrer", funcGen)
|
||||||
|
|
||||||
|
nbEtre : int = nbPieces - int(nbPieces / 4)
|
||||||
|
funcGen = lambda : tablesDict["etre"](
|
||||||
|
give_used_key(idPieceDict),
|
||||||
|
give_used_key(idMarqueDict)
|
||||||
|
)
|
||||||
|
generate_table(nbEtre, "etre", funcGen)
|
||||||
|
|
||||||
|
nbEtreComp : int = nbPieces - nbEtre
|
||||||
|
funcGen = lambda : tablesDict["etre_complexe"](
|
||||||
|
give_used_key(idPieceDict),
|
||||||
|
give_used_key(idPieceCompDict)
|
||||||
|
)
|
||||||
|
generate_table(nbEtreComp, "etre_complexe", funcGen)
|
||||||
|
|
||||||
|
nbEtreForme : int = nbPieces
|
||||||
|
funcGen = lambda : tablesDict["etre_forme"](
|
||||||
|
give_used_key(idFormeDict),
|
||||||
|
give_used_key(idPieceDict)
|
||||||
|
)
|
||||||
|
generate_table(nbEtreForme, "etre_forme", funcGen)
|
||||||
|
|
||||||
|
nbNecessiter : int = nbModeles if nbModeles < nbPieces else nbPieces
|
||||||
|
funcGen = lambda x: tablesDict["necessiter"](
|
||||||
|
give_used_key(idModeleDict),
|
||||||
|
give_used_key(idPieceDict),
|
||||||
|
x
|
||||||
|
)
|
||||||
|
generate_table_using_quantite(nbNecessiter, "necessiter", funcGen)
|
||||||
|
|
||||||
|
nbNoter : int = nbModeles if nbModeles < nbMembres else nbMembres
|
||||||
|
funcGen = lambda : tablesDict["noter"](
|
||||||
|
give_used_key(idModeleDict),
|
||||||
|
give_used_key(idMembreDict)
|
||||||
|
)
|
||||||
|
generate_table(nbNoter, "noter", funcGen)
|
||||||
|
|
||||||
|
nbPerdre : int = nbPieces
|
||||||
|
funcGen = lambda x: tablesDict["perdre"](
|
||||||
|
give_used_key(idMembreDict),
|
||||||
|
give_used_key(idBoiteDict),
|
||||||
|
give_used_key(idPieceDict),
|
||||||
|
x
|
||||||
|
)
|
||||||
|
generate_table_using_quantite(nbPerdre, "perdre", funcGen)
|
||||||
|
|
||||||
|
nbVarier : int = nbModeles
|
||||||
|
funcGen = lambda : tablesDict["varier"](
|
||||||
|
give_used_key(idModeleDict),
|
||||||
|
give_used_key(idModeleDict)
|
||||||
|
)
|
||||||
|
generate_table(nbVarier, "varier", funcGen)
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
#
|
||||||
|
# To write `insert.sql`.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# Remove duplicatas.
|
||||||
|
for nameTable in tablesDict:
|
||||||
|
remove_duplicata(give_path_file(nameTable))
|
||||||
|
|
||||||
|
# Writing in `insert.sql`.
|
||||||
|
fileSql = open("src/insert.sql", 'w+')
|
||||||
|
fileSql.write("TRUNCATE " + ', '.join(tablesDict) + ";\n")
|
||||||
|
fileSql.write("\n")
|
||||||
|
fileSql.close()
|
||||||
|
|
||||||
|
with open("src/insert.sql", 'a') as fileSql:
|
||||||
|
for nameTable in tablesDict:
|
||||||
|
convert_table_to_sql(give_path_file(nameTable), nameTable)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
@ -4,32 +4,6 @@
|
|||||||
-- CREATION Date : 24/10/24
|
-- CREATION Date : 24/10/24
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
DROP TABLE IF EXISTS acheter CASCADE;
|
|
||||||
DROP TABLE IF EXISTS avoir_motif CASCADE;
|
|
||||||
DROP TABLE IF EXISTS boites CASCADE;
|
|
||||||
DROP TABLE IF EXISTS colorer CASCADE;
|
|
||||||
DROP TABLE IF EXISTS construire CASCADE;
|
|
||||||
DROP TABLE IF EXISTS contenir CASCADE;
|
|
||||||
DROP TABLE IF EXISTS couleurs CASCADE;
|
|
||||||
DROP TABLE IF EXISTS enregistrer CASCADE;
|
|
||||||
DROP TABLE IF EXISTS etre CASCADE;
|
|
||||||
DROP TABLE IF EXISTS etre_complexe CASCADE;
|
|
||||||
DROP TABLE IF EXISTS etre_forme CASCADE;
|
|
||||||
DROP TABLE IF EXISTS fils CASCADE;
|
|
||||||
DROP TABLE IF EXISTS illustrations CASCADE;
|
|
||||||
DROP TABLE IF EXISTS marques CASCADE;
|
|
||||||
DROP TABLE IF EXISTS messages CASCADE;
|
|
||||||
DROP TABLE IF EXISTS modeles CASCADE;
|
|
||||||
DROP TABLE IF EXISTS necessiter CASCADE;
|
|
||||||
DROP TABLE IF EXISTS noter CASCADE;
|
|
||||||
DROP TABLE IF EXISTS perdre CASCADE;
|
|
||||||
DROP TABLE IF EXISTS varier CASCADE;
|
|
||||||
DROP TABLE IF EXISTS formes CASCADE;
|
|
||||||
DROP TABLE IF EXISTS membres CASCADE;
|
|
||||||
DROP TABLE IF EXISTS motifs CASCADE;
|
|
||||||
DROP TABLE IF EXISTS pieces CASCADE;
|
|
||||||
DROP TABLE IF EXISTS pieces_complexes CASCADE;
|
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Tables
|
-- Tables
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
@ -44,52 +18,60 @@ CREATE TABLE acheter
|
|||||||
|
|
||||||
CREATE TABLE avoir_motif
|
CREATE TABLE avoir_motif
|
||||||
(
|
(
|
||||||
id_piece INTEGER NOT NULL,
|
id_piece INTEGER ,
|
||||||
id_motif INTEGER NOT NULL,
|
id_motif INTEGER ,
|
||||||
CONSTRAINT pk__avoir_motif PRIMARY KEY (id_piece, id_motif)
|
CONSTRAINT pk__avoir_motif PRIMARY KEY (id_piece, id_motif)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE avoir_tag
|
||||||
|
(
|
||||||
|
id_tag INTEGER ,
|
||||||
|
id_boite INTEGER ,
|
||||||
|
CONSTRAINT pk__avoir_tag PRIMARY KEY (id_tag, id_boite)
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE boites
|
CREATE TABLE boites
|
||||||
(
|
(
|
||||||
id_boite SERIAL NOT NULL,
|
id_boite INTEGER NOT NULL,
|
||||||
titre_boite varchar(255) NOT NULL,
|
titre_boite varchar(255) NOT NULL,
|
||||||
date_boite DATE ,
|
date_boite DATE ,
|
||||||
|
id_marque INTEGER ,
|
||||||
CONSTRAINT pk__boites PRIMARY KEY (id_boite)
|
CONSTRAINT pk__boites PRIMARY KEY (id_boite)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE colorer
|
CREATE TABLE colorer
|
||||||
(
|
(
|
||||||
id_piece INTEGER NOT NULL,
|
id_piece INTEGER NOT NULL,
|
||||||
id_couleur INTEGER NOT NULL,
|
id_couleur INTEGER ,
|
||||||
CONSTRAINT pk__colorer PRIMARY KEY (id_piece, id_couleur)
|
CONSTRAINT pk__colorer PRIMARY KEY (id_piece, id_couleur)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE construire
|
CREATE TABLE construire
|
||||||
(
|
(
|
||||||
id_boite INTEGER NOT NULL,
|
id_boite INTEGER ,
|
||||||
id_modele INTEGER NOT NULL,
|
id_modele INTEGER ,
|
||||||
CONSTRAINT pk__construire PRIMARY KEY (id_boite, id_modele)
|
CONSTRAINT pk__construire PRIMARY KEY (id_boite, id_modele)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE contenir
|
CREATE TABLE contenir
|
||||||
(
|
(
|
||||||
id_boite INTEGER NOT NULL,
|
id_boite INTEGER ,
|
||||||
id_piece INTEGER NOT NULL,
|
id_piece INTEGER ,
|
||||||
quantite_contenir INTEGER NOT NULL,
|
quantite_contenir INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__contenir PRIMARY KEY (id_boite, id_piece)
|
CONSTRAINT pk__contenir PRIMARY KEY (id_boite, id_piece)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE couleurs
|
CREATE TABLE couleurs
|
||||||
(
|
(
|
||||||
id_couleur SERIAL NOT NULL,
|
id_couleur INTEGER NOT NULL,
|
||||||
nom_couleur VARCHAR(255) ,
|
nom_couleur VARCHAR(255) ,
|
||||||
CONSTRAINT pk__couleurs PRIMARY KEY (id_couleur)
|
CONSTRAINT pk__couleurs PRIMARY KEY (id_couleur)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE enregistrer
|
CREATE TABLE enregistrer
|
||||||
(
|
(
|
||||||
id_boite INTEGER NOT NULL,
|
id_boite INTEGER ,
|
||||||
id_membre INTEGER NOT NULL,
|
id_membre INTEGER ,
|
||||||
quantite_enregistrer INTEGER NOT NULL,
|
quantite_enregistrer INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__enregistrer PRIMARY KEY (id_boite, id_membre)
|
CONSTRAINT pk__enregistrer PRIMARY KEY (id_boite, id_membre)
|
||||||
);
|
);
|
||||||
@ -97,7 +79,7 @@ CREATE TABLE enregistrer
|
|||||||
CREATE TABLE etre
|
CREATE TABLE etre
|
||||||
(
|
(
|
||||||
id_piece INTEGER NOT NULL,
|
id_piece INTEGER NOT NULL,
|
||||||
id_marque INTEGER NOT NULL,
|
id_marque INTEGER ,
|
||||||
CONSTRAINT pk__etre PRIMARY KEY (id_piece, id_marque)
|
CONSTRAINT pk__etre PRIMARY KEY (id_piece, id_marque)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -124,7 +106,7 @@ CREATE TABLE fils
|
|||||||
|
|
||||||
CREATE TABLE illustrations
|
CREATE TABLE illustrations
|
||||||
(
|
(
|
||||||
id_illustration SERIAL NOT NULL,
|
id_illustration INTEGER NOT NULL,
|
||||||
url_illustration VARCHAR(2048) ,
|
url_illustration VARCHAR(2048) ,
|
||||||
id_modele INTEGER NOT NULL,
|
id_modele INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__illustrations PRIMARY KEY (id_illustration)
|
CONSTRAINT pk__illustrations PRIMARY KEY (id_illustration)
|
||||||
@ -132,34 +114,41 @@ CREATE TABLE illustrations
|
|||||||
|
|
||||||
CREATE TABLE marques
|
CREATE TABLE marques
|
||||||
(
|
(
|
||||||
id_marque SERIAL NOT NULL,
|
id_marque INTEGER NOT NULL,
|
||||||
nom_marque VARCHAR(255) ,
|
nom_marque VARCHAR(255) ,
|
||||||
CONSTRAINT pk__marques PRIMARY KEY (id_marque)
|
CONSTRAINT pk__marques PRIMARY KEY (id_marque)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE membres
|
||||||
|
(
|
||||||
|
id_membre INTEGER NOT NULL,
|
||||||
|
nom_membre VARCHAR(255) NOT NULL,
|
||||||
|
CONSTRAINT pk__membres PRIMARY KEY (id_membre)
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE messages
|
CREATE TABLE messages
|
||||||
(
|
(
|
||||||
id_message SERIAL NOT NULL,
|
id_message INTEGER NOT NULL,
|
||||||
contenu_message VARCHAR(255) ,
|
contenu_message VARCHAR(255) ,
|
||||||
id_membre SERIAL NOT NULL,
|
id_membre INTEGER NOT NULL,
|
||||||
id_fil SERIAL NOT NULL,
|
id_fil INTEGER NOT NULL,
|
||||||
id_message_2 SERIAL NOT NULL,
|
id_message_2 INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__messages PRIMARY KEY (id_message)
|
CONSTRAINT pk__messages PRIMARY KEY (id_message)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE modeles
|
CREATE TABLE modeles
|
||||||
(
|
(
|
||||||
id_modele SERIAL NOT NULL,
|
id_modele INTEGER NOT NULL,
|
||||||
nom_modele VARCHAR(255) ,
|
nom_modele VARCHAR(255) ,
|
||||||
url_notice_modele VARCHAR(2048) ,
|
url_notice_modele VARCHAR(2048) ,
|
||||||
id_membre INTEGER NOT NULL,
|
id_membre INTEGER NOT NULL,
|
||||||
id_modele_2 INTEGER NOT NULL,
|
id_modele_etendu INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__modeles PRIMARY KEY (id_modele)
|
CONSTRAINT pk__modeles PRIMARY KEY (id_modele)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE necessiter
|
CREATE TABLE necessiter
|
||||||
(
|
(
|
||||||
id_modele INTEGER NOT NULL,
|
id_modele INTEGER ,
|
||||||
id_piece INTEGER NOT NULL,
|
id_piece INTEGER NOT NULL,
|
||||||
quantite_necessiter INTEGER NOT NULL,
|
quantite_necessiter INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__necessiter PRIMARY KEY (id_modele, id_piece)
|
CONSTRAINT pk__necessiter PRIMARY KEY (id_modele, id_piece)
|
||||||
@ -167,59 +156,59 @@ CREATE TABLE necessiter
|
|||||||
|
|
||||||
CREATE TABLE noter
|
CREATE TABLE noter
|
||||||
(
|
(
|
||||||
id_modele INTEGER NOT NULL,
|
id_modele INTEGER ,
|
||||||
id_membre INTEGER NOT NULL,
|
id_membre INTEGER ,
|
||||||
note_noter VARCHAR(255) NOT NULL,
|
note_noter VARCHAR(255) NOT NULL,
|
||||||
CONSTRAINT pk__noter PRIMARY KEY (id_modele, id_membre)
|
CONSTRAINT pk__noter PRIMARY KEY (id_modele, id_membre)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE perdre
|
CREATE TABLE perdre
|
||||||
(
|
(
|
||||||
id_membre INTEGER NOT NULL,
|
id_membre INTEGER ,
|
||||||
id_boite INTEGER NOT NULL,
|
id_boite INTEGER ,
|
||||||
id_piece INTEGER NOT NULL,
|
id_piece INTEGER NOT NULL,
|
||||||
quantite_perdre INTEGER NOT NULL,
|
quantite_perdre INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__perdre PRIMARY KEY (id_membre, id_boite, id_piece)
|
CONSTRAINT pk__perdre PRIMARY KEY (id_membre, id_boite, id_piece)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE tags
|
||||||
|
(
|
||||||
|
id_tag INTEGER NOT NULL,
|
||||||
|
nom_tag VARCHAR(255) ,
|
||||||
|
CONSTRAINT pk__tags PRIMARY KEY (id_tag)
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE varier
|
CREATE TABLE varier
|
||||||
(
|
(
|
||||||
id_modele INTEGER NOT NULL,
|
id_modele INTEGER ,
|
||||||
id_modele_2 INTEGER NOT NULL,
|
id_modele_etendu INTEGER ,
|
||||||
CONSTRAINT pk__varier PRIMARY KEY (id_modele, id_modele_2)
|
CONSTRAINT pk__varier PRIMARY KEY (id_modele, id_modele_etendu)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE formes
|
CREATE TABLE formes
|
||||||
(
|
(
|
||||||
id_forme SERIAL NOT NULL,
|
id_forme INTEGER NOT NULL,
|
||||||
nom_forme VARCHAR(255) NOT NULL,
|
nom_forme VARCHAR(255) NOT NULL,
|
||||||
CONSTRAINT pk__formes PRIMARY KEY (id_forme)
|
CONSTRAINT pk__formes PRIMARY KEY (id_forme)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE membres
|
|
||||||
(
|
|
||||||
id_membre SERIAL NOT NULL,
|
|
||||||
nom_membre VARCHAR(255) NOT NULL,
|
|
||||||
mdp_membre VARCHAR(255) NOT NULL,
|
|
||||||
CONSTRAINT pk__membres PRIMARY KEY (id_membre)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE motifs
|
CREATE TABLE motifs
|
||||||
(
|
(
|
||||||
id_motif SERIAL NOT NULL,
|
id_motif INTEGER NOT NULL,
|
||||||
nom_motif VARCHAR(255) NOT NULL,
|
nom_motif VARCHAR(255) NOT NULL,
|
||||||
CONSTRAINT pk__motifs PRIMARY KEY (id_motif)
|
CONSTRAINT pk__motifs PRIMARY KEY (id_motif)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE pieces
|
CREATE TABLE pieces
|
||||||
(
|
(
|
||||||
id_piece SERIAL NOT NULL,
|
id_piece INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__pieces PRIMARY KEY (id_piece)
|
CONSTRAINT pk__pieces PRIMARY KEY (id_piece)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE pieces_complexes
|
CREATE TABLE pieces_complexes
|
||||||
(
|
(
|
||||||
id_piece_complexe SERIAL NOT NULL,
|
id_piece_complexe INTEGER NOT NULL,
|
||||||
CONSTRAINT pk__pieces_complexes PRIMARY KEY (id_piece_complexe)
|
CONSTRAINT pk__pieces_complexes PRIMARY KEY (id_piece_complexe)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -243,6 +232,18 @@ ALTER TABLE avoir_motif
|
|||||||
ADD CONSTRAINT fk2__avoir_motif FOREIGN KEY (id_motif)
|
ADD CONSTRAINT fk2__avoir_motif FOREIGN KEY (id_motif)
|
||||||
REFERENCES motifs (id_motif);
|
REFERENCES motifs (id_motif);
|
||||||
|
|
||||||
|
ALTER TABLE avoir_tag
|
||||||
|
ADD CONSTRAINT fk1__avoir_tag FOREIGN KEY (id_tag)
|
||||||
|
REFERENCES tags (id_tag);
|
||||||
|
|
||||||
|
ALTER TABLE avoir_tag
|
||||||
|
ADD CONSTRAINT fk2__avoir_tag FOREIGN KEY (id_boite)
|
||||||
|
REFERENCES boites (id_boite);
|
||||||
|
|
||||||
|
ALTER TABLE boites
|
||||||
|
ADD CONSTRAINT fk1__boites FOREIGN KEY (id_marque)
|
||||||
|
REFERENCES marques (id_marque);
|
||||||
|
|
||||||
ALTER TABLE colorer
|
ALTER TABLE colorer
|
||||||
ADD CONSTRAINT fk1__colorer FOREIGN KEY (id_piece)
|
ADD CONSTRAINT fk1__colorer FOREIGN KEY (id_piece)
|
||||||
REFERENCES pieces (id_piece);
|
REFERENCES pieces (id_piece);
|
||||||
@ -260,7 +261,11 @@ ALTER TABLE construire
|
|||||||
REFERENCES modeles (id_modele);
|
REFERENCES modeles (id_modele);
|
||||||
|
|
||||||
ALTER TABLE contenir
|
ALTER TABLE contenir
|
||||||
ADD CONSTRAINT fk2__contenir FOREIGN KEY (id_boite)
|
ADD CONSTRAINT fk1__contenir FOREIGN KEY (id_boite)
|
||||||
|
REFERENCES boites (id_boite);
|
||||||
|
|
||||||
|
ALTER TABLE contenir
|
||||||
|
ADD CONSTRAINT fk2__contenir FOREIGN KEY (id_piece)
|
||||||
REFERENCES pieces (id_piece);
|
REFERENCES pieces (id_piece);
|
||||||
|
|
||||||
ALTER TABLE enregistrer
|
ALTER TABLE enregistrer
|
||||||
@ -275,6 +280,10 @@ ALTER TABLE etre
|
|||||||
ADD CONSTRAINT fk1__etre FOREIGN KEY (id_piece)
|
ADD CONSTRAINT fk1__etre FOREIGN KEY (id_piece)
|
||||||
REFERENCES pieces (id_piece);
|
REFERENCES pieces (id_piece);
|
||||||
|
|
||||||
|
ALTER TABLE etre
|
||||||
|
ADD CONSTRAINT fk2__etre FOREIGN KEY (id_marque)
|
||||||
|
REFERENCES marques (id_marque);
|
||||||
|
|
||||||
ALTER TABLE etre_complexe
|
ALTER TABLE etre_complexe
|
||||||
ADD CONSTRAINT fk1__etre_complexe FOREIGN KEY (id_piece)
|
ADD CONSTRAINT fk1__etre_complexe FOREIGN KEY (id_piece)
|
||||||
REFERENCES pieces (id_piece);
|
REFERENCES pieces (id_piece);
|
||||||
@ -300,13 +309,25 @@ ALTER TABLE illustrations
|
|||||||
REFERENCES modeles (id_modele);
|
REFERENCES modeles (id_modele);
|
||||||
|
|
||||||
ALTER TABLE messages
|
ALTER TABLE messages
|
||||||
ADD CONSTRAINT fk1__messages FOREIGN KEY (id_fil)
|
ADD CONSTRAINT fk1__messages FOREIGN KEY (id_membre)
|
||||||
|
REFERENCES membres (id_membre);
|
||||||
|
|
||||||
|
ALTER TABLE messages
|
||||||
|
ADD CONSTRAINT fk2__messages FOREIGN KEY (id_fil)
|
||||||
REFERENCES fils (id_fil);
|
REFERENCES fils (id_fil);
|
||||||
|
|
||||||
ALTER TABLE messages
|
ALTER TABLE messages
|
||||||
ADD CONSTRAINT fk2__messages FOREIGN KEY (id_message_2)
|
ADD CONSTRAINT fk3__messages FOREIGN KEY (id_message_2)
|
||||||
REFERENCES messages (id_message);
|
REFERENCES messages (id_message);
|
||||||
|
|
||||||
|
ALTER TABLE modeles
|
||||||
|
ADD CONSTRAINT fk1__modeles FOREIGN KEY (id_membre)
|
||||||
|
REFERENCES membres (id_membre);
|
||||||
|
|
||||||
|
ALTER TABLE modeles
|
||||||
|
ADD CONSTRAINT fk2__modeles FOREIGN KEY (id_modele_etendu)
|
||||||
|
REFERENCES modeles (id_modele);
|
||||||
|
|
||||||
ALTER TABLE necessiter
|
ALTER TABLE necessiter
|
||||||
ADD CONSTRAINT fk1__necessiter FOREIGN KEY (id_modele)
|
ADD CONSTRAINT fk1__necessiter FOREIGN KEY (id_modele)
|
||||||
REFERENCES modeles (id_modele);
|
REFERENCES modeles (id_modele);
|
||||||
@ -340,7 +361,7 @@ ALTER TABLE varier
|
|||||||
REFERENCES modeles (id_modele);
|
REFERENCES modeles (id_modele);
|
||||||
|
|
||||||
ALTER TABLE varier
|
ALTER TABLE varier
|
||||||
ADD CONSTRAINT fk2__varier FOREIGN KEY (id_modele_2)
|
ADD CONSTRAINT fk2__varier FOREIGN KEY (id_modele_etendu)
|
||||||
REFERENCES modeles (id_modele);
|
REFERENCES modeles (id_modele);
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
34
PostgreSQL/src/drop.sql
Normal file
34
PostgreSQL/src/drop.sql
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- To drop the tables once created.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS acheter CASCADE;
|
||||||
|
DROP TABLE IF EXISTS avoir_motif CASCADE;
|
||||||
|
DROP TABLE IF EXISTS avoir_tag CASCADE;
|
||||||
|
DROP TABLE IF EXISTS boites CASCADE;
|
||||||
|
DROP TABLE IF EXISTS colorer CASCADE;
|
||||||
|
DROP TABLE IF EXISTS construire CASCADE;
|
||||||
|
DROP TABLE IF EXISTS contenir CASCADE;
|
||||||
|
DROP TABLE IF EXISTS couleurs CASCADE;
|
||||||
|
DROP TABLE IF EXISTS enregistrer CASCADE;
|
||||||
|
DROP TABLE IF EXISTS etre CASCADE;
|
||||||
|
DROP TABLE IF EXISTS etre_complexe CASCADE;
|
||||||
|
DROP TABLE IF EXISTS etre_forme CASCADE;
|
||||||
|
DROP TABLE IF EXISTS fils CASCADE;
|
||||||
|
DROP TABLE IF EXISTS illustrations CASCADE;
|
||||||
|
DROP TABLE IF EXISTS marques CASCADE;
|
||||||
|
DROP TABLE IF EXISTS membres CASCADE;
|
||||||
|
DROP TABLE IF EXISTS messages CASCADE;
|
||||||
|
DROP TABLE IF EXISTS modeles CASCADE;
|
||||||
|
DROP TABLE IF EXISTS necessiter CASCADE;
|
||||||
|
DROP TABLE IF EXISTS noter CASCADE;
|
||||||
|
DROP TABLE IF EXISTS perdre CASCADE;
|
||||||
|
DROP TABLE IF EXISTS tags CASCADE;
|
||||||
|
DROP TABLE IF EXISTS varier CASCADE;
|
||||||
|
DROP TABLE IF EXISTS formes CASCADE;
|
||||||
|
DROP TABLE IF EXISTS motifs CASCADE;
|
||||||
|
DROP TABLE IF EXISTS pieces CASCADE;
|
||||||
|
DROP TABLE IF EXISTS pieces_complexes CASCADE;
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
|
4409
PostgreSQL/src/insert.sql
Normal file
4409
PostgreSQL/src/insert.sql
Normal file
File diff suppressed because it is too large
Load Diff
74
PostgreSQL/src/select.sql
Normal file
74
PostgreSQL/src/select.sql
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Some requests for the statistics and to consult the database.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- CONSULTATION
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
-- Liste des boîtes parues depuis 5 ans.
|
||||||
|
SELECT boites.titre_boite
|
||||||
|
FROM boites
|
||||||
|
WHERE DATE_PART('year', AGE(NOW(), boites.date_boite) < 5;
|
||||||
|
|
||||||
|
--Liste des modèles proposés par des fans.
|
||||||
|
|
||||||
|
SELECT id_modeles
|
||||||
|
FROM modeles
|
||||||
|
WHERE id_membre NOT NULL;
|
||||||
|
|
||||||
|
-- Liste des pièces qui apparaissent dans des boîtes de différentes marques.
|
||||||
|
|
||||||
|
SELECT id_piece
|
||||||
|
FROM ( -- couple (piece,marque) d'ou vient les pieces
|
||||||
|
SELECT DISTINCT id_piece, id_marque FROM contenir
|
||||||
|
NATURAL JOIN boites
|
||||||
|
NATURAL JOIN marques
|
||||||
|
)
|
||||||
|
GROUP BY id_piece
|
||||||
|
WHERE COUNT(*) > 1;
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- STATISTIQUES
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
-- Nombre de piece par boite
|
||||||
|
CREATE OR REPLACE VIEW nb_piece_par_boite AS
|
||||||
|
(
|
||||||
|
SELECT id_boite, SUM(quantite_contenir) as nb_piece
|
||||||
|
FROM contenir
|
||||||
|
GROUP BY id_boite
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Le nombre moyen de pièces par boîte.
|
||||||
|
SELECT AVG(nb_piece)
|
||||||
|
FROM nb_piece_par_boite
|
||||||
|
;
|
||||||
|
|
||||||
|
-- nombre de modele proposés par membre
|
||||||
|
CREATE OR REPLACE VIEW nb_modele_par_boite AS
|
||||||
|
(
|
||||||
|
SELECT id_membre, COUNT(*) as nb_boite
|
||||||
|
FROM modeles
|
||||||
|
GROUP BY id_membre
|
||||||
|
);
|
||||||
|
|
||||||
|
-- La liste des membres qui ont proposé le plus de modèles.
|
||||||
|
SELECT id_membre, nb_boite
|
||||||
|
FROM nb_modele_par_boite
|
||||||
|
ORDER BY nb_boite
|
||||||
|
DESC
|
||||||
|
LIMIT 5
|
||||||
|
;
|
||||||
|
|
||||||
|
-- La liste des modèles, classés par note moyenne descendante.
|
||||||
|
SELECT id_modele, AVG(note_noter) as note_moyenne
|
||||||
|
FROM noter
|
||||||
|
GROUP BY id_modele
|
||||||
|
ORDER BY note_moyenne
|
||||||
|
DESC
|
||||||
|
;
|
||||||
|
|
||||||
|
-- ============================================================================
|
351
PostgreSQL/src/update.sql
Normal file
351
PostgreSQL/src/update.sql
Normal file
@ -0,0 +1,351 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Those are the requests to update the database.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
-- Verifying functions.
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION is_existing_piece(
|
||||||
|
toadd_id_piece INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
IF NOT EXISTS(SELECT 1 FROM etre WHERE id_piece = toadd_id_piece) THEN
|
||||||
|
RAISE EXCEPTION 'The % piece does not exist.', toadd_id_piece;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION is_existing_marque(
|
||||||
|
toadd_id_marque INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
IF NOT EXISTS(
|
||||||
|
SELECT 1 FROM marques
|
||||||
|
WHERE id_marque = toadd_id_marque
|
||||||
|
)
|
||||||
|
THEN
|
||||||
|
RAISE NOTICE 'The % marque does not exist.', toadd_id_marque;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION is_existing_note(
|
||||||
|
toadd_id_modele INT,
|
||||||
|
toadd_id_membre INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
IF NOT EXISTS(
|
||||||
|
SELECT 1 FROM noter
|
||||||
|
WHERE id_modele = toadd_id_modele
|
||||||
|
AND id_membre = toadd_id_membre
|
||||||
|
)
|
||||||
|
THEN
|
||||||
|
RAISE NOTICE 'The notes does not exist.';
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION is_existing_membre(
|
||||||
|
toadd_id_membre INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
IF NOT EXISTS(SELECT 1 FROM membres WHERE id_membre = toadd_id_membre) THEN
|
||||||
|
RAISE NOTICE 'The % membre does not exist.', toadd_id_membre;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
-- To add/remove a piece.
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION add_piece(
|
||||||
|
toadd_id_piece INT,
|
||||||
|
toadd_id_couleur INT,
|
||||||
|
toadd_id_forme INT,
|
||||||
|
toadd_id_marque INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
-- If the piece is already in the database, do nothing.
|
||||||
|
IF EXISTS(SELECT 1 FROM etre WHERE id_piece = toadd_id_piece) THEN
|
||||||
|
RAISE NOTICE 'The % piece is already in the db.', toadd_id_piece;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
INSERT INTO pieces VALUES (toadd_id_piece);
|
||||||
|
INSERT INTO etre VALUES (toadd_id_piece, toadd_id_marque);
|
||||||
|
INSERT INTO colorer VALUES (toadd_id_piece, toadd_id_couleur);
|
||||||
|
INSERT INTO etre_forme VALUES (toadd_id_forme, toadd_id_piece);
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION remove_piece(
|
||||||
|
torem_id_piece INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
-- If the piece does not exist.
|
||||||
|
SELECT is_existing_piece(torem_id_piece);
|
||||||
|
|
||||||
|
-- If the piece is complex.
|
||||||
|
IF EXISTS(SELECT 1 FROM etre_complexe WHERE id_piece = torem_id_piece) THEN
|
||||||
|
DELETE FROM piece_complexe WHERE id_piece_complexe IN (
|
||||||
|
SELECT id_piece_complexe
|
||||||
|
FROM etre_complexe
|
||||||
|
WHERE id_piece = torem_id_piece
|
||||||
|
);
|
||||||
|
|
||||||
|
DELETE FROM etre_complexe WHERE id_piece = torem_id_piece;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
DELETE FROM colorer WHERE id_piece = torem_id_piece;
|
||||||
|
DELETE FROM avoir_motif WHERE id_piece = torem_id_piece;
|
||||||
|
DELETE FROM etre_forme WHERE id_piece = torem_id_piece;
|
||||||
|
DELETE FROM necessiter WHERE id_piece = torem_id_piece;
|
||||||
|
DELETE FROM acheter WHERE id_piece = torem_id_piece;
|
||||||
|
DELETE FROM perdre WHERE id_piece = torem_id_piece;
|
||||||
|
DELETE FROM contenir WHERE id_piece = torem_id_piece;
|
||||||
|
DELETE FROM etre WHERE id_piece = torem_id_piece;
|
||||||
|
DELETE FROM pieces WHERE id_piece = torem_id_piece;
|
||||||
|
|
||||||
|
RAISE NOTICE '% piece sucessfully removed.', torem_id_piece;
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
-- To add a complex piece.
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION add_piece_comp(
|
||||||
|
toadd_id_piece INT,
|
||||||
|
toadd_id_piece_comp INT,
|
||||||
|
toadd_id_couleur INT,
|
||||||
|
toadd_id_forme INT,
|
||||||
|
toadd_id_marque INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
-- If the piece is already complex.
|
||||||
|
IF EXISTS(
|
||||||
|
SELECT 1 FROM etre_complexe
|
||||||
|
WHERE id_piece_complexe = toadd_id_piece_comp
|
||||||
|
) THEN
|
||||||
|
RAISE NOTICE 'The % piece is already in the db.', toadd_id_piece;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
-- If the piece is already in the database, do nothing.
|
||||||
|
IF EXISTS(SELECT 1 FROM etre WHERE id_piece = toadd_id_piece) THEN
|
||||||
|
RAISE NOTICE 'The % piece is already in the db.', toadd_id_piece;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
INSERT INTO pieces VALUES (toadd_id_piece);
|
||||||
|
INSERT INTO piece_complexes VALUES (toadd_id_piece_comp);
|
||||||
|
INSERT INTO etre VALUES (toadd_id_piece, toadd_id_marque);
|
||||||
|
INSERT INTO etre_complexe VALUES (toadd_id_piece, toadd_id_piece_comp);
|
||||||
|
INSERT INTO colorer VALUES (toadd_id_piece, toadd_id_couleur);
|
||||||
|
INSERT INTO etre_forme VALUES (toadd_id_forme, toadd_id_piece);
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
-- To add/remove a member.
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION add_membre(
|
||||||
|
toadd_id_membre INT,
|
||||||
|
toadd_nom_membre TEXT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
-- If the member is already in the database, do nothing.
|
||||||
|
IF EXISTS(SELECT 1 FROM membres WHERE id_membre = toadd_id_membre) THEN
|
||||||
|
RAISE NOTICE 'The % member is already in the db.', toadd_id_membre;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
INSERT INTO membres VALUES (toadd_id_membre, toadd_nom_membre);
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION remove_membre(
|
||||||
|
torem_id_membre INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
-- If the membre does not exist.
|
||||||
|
SELECT is_existing_membre(torem_id_membre);
|
||||||
|
|
||||||
|
DELETE FROM acheter WHERE id_membre = torem_id_membre;
|
||||||
|
DELETE FROM enregister WHERE id_membre = torem_id_membre;
|
||||||
|
DELETE FROM messages WHERE id_membre = torem_id_membre;
|
||||||
|
DELETE FROM modeles WHERE id_membre = torem_id_membre;
|
||||||
|
DELETE FROM noter WHERE id_membre = torem_id_membre;
|
||||||
|
DELETE FROM perdre WHERE id_membre = torem_id_membre;
|
||||||
|
DELETE FROM membres WHERE id_membre = torem_id_membre;
|
||||||
|
|
||||||
|
RAISE NOTICE '% membre sucessfully removed.', torem_id_membre;
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
-- To add/remove messages.
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION add_message(
|
||||||
|
toadd_id_message INT,
|
||||||
|
toadd_contenu TEXT,
|
||||||
|
toadd_id_membre INT,
|
||||||
|
toadd_id_fil INT,
|
||||||
|
toadd_id_message_2 INT DEFAULT NULL
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
-- If the message is already in the database, do nothing.
|
||||||
|
IF EXISTS(SELECT 1 FROM messages WHERE id_message = toadd_id_message) THEN
|
||||||
|
RAISE NOTICE 'The % message is already in the db.', toadd_id_message;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
-- To verify if the member exists.
|
||||||
|
IF NOT EXISTS(SELECT 1 FROM membres WHERE id_membre = toadd_id_membre) THEN
|
||||||
|
RAISE NOTICE 'The % membre does not exist.', toadd_id_membre;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
-- To verify if the fil exists.
|
||||||
|
IF NOT EXISTS(SELECT 1 FROM fils WHERE id_fil = toadd_id_fil) THEN
|
||||||
|
RAISE NOTICE 'The % fil does not exist.', toadd_id_fil;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
INSERT INTO messages VALUES (
|
||||||
|
toadd_id_message,
|
||||||
|
toadd_contenu,
|
||||||
|
toadd_id_membre,
|
||||||
|
toadd_id_fil,
|
||||||
|
toadd_id_message_2
|
||||||
|
);
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION remove_message(
|
||||||
|
torem_id_message INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
-- If the message does not exist.
|
||||||
|
IF NOT EXISTS(
|
||||||
|
SELECT 1 FROM messages
|
||||||
|
WHERE id_messages = torem_id_messages
|
||||||
|
)
|
||||||
|
THEN
|
||||||
|
RAISE NOTICE 'The % message does not exist.', torem_id_message;
|
||||||
|
RETURN;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
DELETE FROM messages WHERE id_message = torem_id_message;
|
||||||
|
|
||||||
|
RAISE NOTICE '% message sucessfully removed.', torem_id_message;
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
-- To change the name of a brand.
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION change_brand_name(
|
||||||
|
toadd_id_marque INT,
|
||||||
|
toadd_nom_marque TEXT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
-- If the marque does not exist.
|
||||||
|
SELECT is_existing_marque(toadd_id_marque);
|
||||||
|
|
||||||
|
UPDATE marques
|
||||||
|
SET nom_marque = toadd_nom_marque
|
||||||
|
WHERE id_marque = toadd_id_marque;
|
||||||
|
|
||||||
|
RAISE NOTICE '% marque sucessfully changed.', toadd_id_marque;
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
|
||||||
|
-- To change a notes.
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION change_note(
|
||||||
|
toadd_id_modele INT,
|
||||||
|
toadd_id_membre INT,
|
||||||
|
toadd_note TEXT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
-- If the notes do not exist.
|
||||||
|
SELECT is_existing_note(toadd_id_modele, toadd_id_membre);
|
||||||
|
|
||||||
|
UPDATE noter
|
||||||
|
SET note_noter = toadd_note
|
||||||
|
WHERE id_modele = toadd_id_modele
|
||||||
|
AND id_membre = toadd_id_membre;
|
||||||
|
|
||||||
|
RAISE NOTICE 'Notes sucessfully changed';
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
-- To add the pieces of a set to a member possession.
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION add_pieces_to_member(
|
||||||
|
toadd_id_membre INT,
|
||||||
|
toadd_id_boite INT
|
||||||
|
) RETURNS VOID AS $$
|
||||||
|
DECLARE
|
||||||
|
var_id_piece INT;
|
||||||
|
var_quantite INT;
|
||||||
|
BEGIN
|
||||||
|
-- If the membre does not exist.
|
||||||
|
SELECT is_existing_piece(torem_id_membre);
|
||||||
|
|
||||||
|
-- If the piece does not exist.
|
||||||
|
SELECT is_existing_piece(torem_id_piece);
|
||||||
|
|
||||||
|
FOR var_id_piece, var_quantite IN
|
||||||
|
SELECT id_piece, quantite
|
||||||
|
FROM contenir
|
||||||
|
WHERE id_boite = toadd_id_boite
|
||||||
|
LOOP
|
||||||
|
|
||||||
|
IF EXISTS(SELECT 1 FROM acheter
|
||||||
|
WHERE id_membre = toadd_id_membre
|
||||||
|
AND id_piece = toadd_id_piece)
|
||||||
|
THEN
|
||||||
|
|
||||||
|
UPDATE acheter
|
||||||
|
SET quantite = quantite + var_quantite
|
||||||
|
WHERE id_membre = toadd_id_membre AND id_piece = toadd_id_piece;
|
||||||
|
|
||||||
|
ELSE
|
||||||
|
|
||||||
|
INSERT INTO acheter VALUES (
|
||||||
|
toadd_id_membre,
|
||||||
|
var_id_piece,
|
||||||
|
var_quantite
|
||||||
|
);
|
||||||
|
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
END LOOP;
|
||||||
|
|
||||||
|
RAISE NOTICE 'Pieces sucessfully added.';
|
||||||
|
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
|
14
README.md
14
README.md
@ -2,11 +2,25 @@
|
|||||||
|
|
||||||
On aime les briques
|
On aime les briques
|
||||||
|
|
||||||
|
## Sujet
|
||||||
|
|
||||||
|
* [Projet: Travail et modalités de rendu Fichier](https://moodle.bordeaux-inp.fr/mod/resource/view.php?id=48191)
|
||||||
|
* [Sujet : Briques Fichier](https://moodle.bordeaux-inp.fr/mod/resource/view.php?id=132493)
|
||||||
|
|
||||||
|
## Generating data
|
||||||
|
|
||||||
|
```
|
||||||
|
cd PostgreSQL/
|
||||||
|
make generate_data
|
||||||
|
```
|
||||||
|
|
||||||
## Dev
|
## Dev
|
||||||
|
|
||||||
To run postgresql server + adminer in dev environnement (assuming you're running the backend manually with node), run :
|
To run postgresql server + adminer in dev environnement (assuming you're running the backend manually with node), run :
|
||||||
|
|
||||||
```
|
```
|
||||||
|
cd free-briques/
|
||||||
|
make
|
||||||
docker compose -f docker-compose.dev.yml up
|
docker compose -f docker-compose.dev.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -6,11 +6,12 @@ WORKDIR /usr/src/back
|
|||||||
|
|
||||||
# Copy sources
|
# Copy sources
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY .env.production .env
|
|
||||||
|
|
||||||
# install deps, and pm2 to run the app
|
# install deps, and pm2 to run the app
|
||||||
RUN npm install
|
RUN npm install
|
||||||
RUN npm install -g pm2
|
# RUN npm install -g pm2
|
||||||
|
|
||||||
|
COPY .env.production .env
|
||||||
|
|
||||||
# Compilation des fichiers TypeScript
|
# Compilation des fichiers TypeScript
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
@ -23,4 +24,5 @@ RUN chmod -R u=rwx,g=,o= ./
|
|||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Start app
|
# Start app
|
||||||
CMD ["pm2", "start", "dist/app.js", "--no-daemon"]
|
CMD ["npm", "run", "startonly"]
|
||||||
|
# CMD ["pm2", "start", "dist/app.js", "--no-daemon"]
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
"main": "dist/app.js",
|
"main": "dist/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"startonly": "node dist/app.js",
|
"startonly": "node dist/app.js",
|
||||||
"start": "tsc && node dist/app.js",
|
"start": "npm run build && node dist/app.js",
|
||||||
"build": "tsc && cp -r src/templates dist",
|
"build": "tsc && cp -r src/templates dist && cp -r src/static dist",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
@ -3,7 +3,7 @@ import bcrypt from 'bcrypt';
|
|||||||
import { SignJWT } from 'jose';
|
import { SignJWT } from 'jose';
|
||||||
import { JWT_ISSUER, JWT_AUDIENCE, JWT_SECRET, JWT_EXPIRATION, JWT_SECRET_KEY } from '../config/auth.config';
|
import { JWT_ISSUER, JWT_AUDIENCE, JWT_SECRET, JWT_EXPIRATION, JWT_SECRET_KEY } from '../config/auth.config';
|
||||||
import { Member, User } from '../types/member';
|
import { Member, User } from '../types/member';
|
||||||
import { getMember, createMember, userAdapter } from './member.controller';
|
import memberService from '../services/member.service';
|
||||||
import { Either, eitherLeft, eitherRight } from '../utils/utils';
|
import { Either, eitherLeft, eitherRight } from '../utils/utils';
|
||||||
|
|
||||||
const register = (req: Request, res: Response) => {
|
const register = (req: Request, res: Response) => {
|
||||||
@ -22,7 +22,7 @@ const register = (req: Request, res: Response) => {
|
|||||||
res.status(500).send();
|
res.status(500).send();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const member: Either<Member, string> = await createMember(name, hash);
|
const member: Either<Member, string> = await memberService.createMember(name, hash);
|
||||||
if (member.hasRight) {
|
if (member.hasRight) {
|
||||||
res.status(401).send(member.right);
|
res.status(401).send(member.right);
|
||||||
return;
|
return;
|
||||||
@ -33,7 +33,7 @@ const register = (req: Request, res: Response) => {
|
|||||||
.setIssuer(JWT_ISSUER)
|
.setIssuer(JWT_ISSUER)
|
||||||
.setExpirationTime(JWT_EXPIRATION)
|
.setExpirationTime(JWT_EXPIRATION)
|
||||||
.sign(JWT_SECRET_KEY);
|
.sign(JWT_SECRET_KEY);
|
||||||
res.status(200).send({ member: userAdapter(member.left), token: token});
|
res.status(200).send({ member: memberService.userAdapter(member.left), token: token });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -44,7 +44,7 @@ const login = async (req: Request, res: Response) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const name: string = req.body.name;
|
const name: string = req.body.name;
|
||||||
const member: Either<Member, string> = await getMember(name);
|
const member: Either<Member, string> = await memberService.getMember(name);
|
||||||
if (member.hasRight) {
|
if (member.hasRight) {
|
||||||
res.send(member.right).send();
|
res.send(member.right).send();
|
||||||
return;
|
return;
|
||||||
@ -64,7 +64,7 @@ const login = async (req: Request, res: Response) => {
|
|||||||
.setIssuer(JWT_ISSUER)
|
.setIssuer(JWT_ISSUER)
|
||||||
.setExpirationTime(JWT_EXPIRATION)
|
.setExpirationTime(JWT_EXPIRATION)
|
||||||
.sign(JWT_SECRET_KEY);
|
.sign(JWT_SECRET_KEY);
|
||||||
res.status(200).send({ member: userAdapter(member.left), token: token});
|
res.status(200).send({ member: memberService.userAdapter(member.left), token: token });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
55
back-end/src/controllers/box.controller.ts
Normal file
55
back-end/src/controllers/box.controller.ts
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import boxService from "../services/box.service";
|
||||||
|
|
||||||
|
const boxByTitle: RequestHandler<{ title: string; }> = async (req, res) => {
|
||||||
|
const boxEither = await boxService.getBox(req.params.title);
|
||||||
|
|
||||||
|
if (boxEither.hasRight) {
|
||||||
|
res.sendStatus(404);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const box = boxEither.left;
|
||||||
|
|
||||||
|
res.render('box.ejs', { box });
|
||||||
|
};
|
||||||
|
|
||||||
|
const allBoxes: RequestHandler = async (_req, res) => {
|
||||||
|
const boxes = await boxService.getAllBoxes();
|
||||||
|
res.render('boxes.ejs', { boxes });
|
||||||
|
};
|
||||||
|
|
||||||
|
const allBoxesFromDate: RequestHandler<{ date: string; }> = async (req, res) => {
|
||||||
|
const date = new Date(req.params.date);
|
||||||
|
// If the input isn't a date
|
||||||
|
if (isNaN(date.getTime())) {
|
||||||
|
res.sendStatus(400);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const boxes = await boxService.getAllBoxesFromDate(date);
|
||||||
|
res.render('boxes.ejs', { boxes });
|
||||||
|
};
|
||||||
|
|
||||||
|
const boxById: RequestHandler<{ id: string; }> = async (req, res) => {
|
||||||
|
const id = parseInt(req.params.id);
|
||||||
|
const boxEither = await boxService.getBox(id);
|
||||||
|
|
||||||
|
if (boxEither.hasRight) {
|
||||||
|
res.sendStatus(404);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const box = boxEither.left;
|
||||||
|
|
||||||
|
res.render('box.ejs', { box });
|
||||||
|
};
|
||||||
|
|
||||||
|
const boxController = {
|
||||||
|
boxByTitle,
|
||||||
|
allBoxes,
|
||||||
|
allBoxesFromDate,
|
||||||
|
boxById,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default boxController;
|
@ -1,43 +1,7 @@
|
|||||||
import { Request, Response } from 'express';
|
import { Request, Response } from 'express';
|
||||||
import { new_client } from '../db/db_client';
|
|
||||||
import { Marque } from '../types/marque';
|
import { Marque } from '../types/marque';
|
||||||
import { Either, eitherLeft, eitherRight } from '../utils/utils';
|
import marqueService from '../services/marque.service';
|
||||||
|
import { Either } from '../utils/utils';
|
||||||
const getMarque = async (idOrName: number | string): Promise<Either<Marque, string>> => {
|
|
||||||
const client = new_client();
|
|
||||||
await client.connect();
|
|
||||||
let res;
|
|
||||||
if (typeof idOrName !== 'number') {
|
|
||||||
res = await client.query("SELECT * FROM marques WHERE nom_marque=$1;", [`${idOrName}`]);
|
|
||||||
} else {
|
|
||||||
res = await client.query("SELECT * FROM marques WHERE id_marque=$1;", [idOrName]);
|
|
||||||
}
|
|
||||||
if (res.rows.length === 0) {
|
|
||||||
await client.end();
|
|
||||||
return eitherRight<Marque, string>("Does not exist.");
|
|
||||||
}
|
|
||||||
const marque: Marque = { id_marque: res.rows[0].id_marque, name: res.rows[0].nom_marque };
|
|
||||||
await client.end();
|
|
||||||
|
|
||||||
return eitherLeft<Marque, string>(marque);
|
|
||||||
}
|
|
||||||
|
|
||||||
const createMarque = async (name: string): Promise<Either<Marque, string>> => {
|
|
||||||
const gettingMarque = await getMarque(name);
|
|
||||||
if (!gettingMarque.hasRight) {
|
|
||||||
return eitherRight<Marque, string>("Already in database.");
|
|
||||||
}
|
|
||||||
const client = new_client();
|
|
||||||
await client.connect();
|
|
||||||
const res = await client.query("INSERT INTO marques (nom_membre) VALUES ($1) RETURNING *;", [`${name}`]);
|
|
||||||
if (res.rows.length === 0) {
|
|
||||||
await client.end();
|
|
||||||
return eitherRight<Marque, string>("Something went wrong");
|
|
||||||
}
|
|
||||||
const marque: Marque = { id_marque: res.rows[0].id_marque, name: res.rows[0].nom_marque };
|
|
||||||
await client.end();
|
|
||||||
return eitherLeft<Marque, string>(marque);
|
|
||||||
};
|
|
||||||
|
|
||||||
const register = async (req: Request, res: Response) => {
|
const register = async (req: Request, res: Response) => {
|
||||||
if (!req || !req.body || !req.body.name) {
|
if (!req || !req.body || !req.body.name) {
|
||||||
@ -45,7 +9,7 @@ const register = async (req: Request, res: Response) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const name: string = req.body.name;
|
const name: string = req.body.name;
|
||||||
const marque: Either<Marque, string> = await createMarque(name);
|
const marque: Either<Marque, string> = await marqueService.createMarque(name);
|
||||||
if (marque.hasRight) {
|
if (marque.hasRight) {
|
||||||
res.status(403).send(marque.right);
|
res.status(403).send(marque.right);
|
||||||
return;
|
return;
|
||||||
@ -54,4 +18,8 @@ const register = async (req: Request, res: Response) => {
|
|||||||
res.status(200).send(marque);
|
res.status(200).send(marque);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { register };
|
const marqueController = {
|
||||||
|
register
|
||||||
|
};
|
||||||
|
|
||||||
|
export default marqueController;
|
||||||
|
@ -1,48 +1,42 @@
|
|||||||
import { new_client } from '../db/db_client';
|
import { RequestHandler } from "express";
|
||||||
import { Member, User } from '../types/member';
|
import memberService from "../services/member.service";
|
||||||
import { Either, eitherLeft, eitherRight } from '../utils/utils';
|
|
||||||
|
|
||||||
const getDefaultUser = (): User => ({ id_member: -1, name: "unknown" });
|
const memberByName: RequestHandler<{ name: string; }> = async (req, res) => {
|
||||||
const getDefaultMember = (): Member => ({ id_member: -1, name: "unknown", password: "none" });
|
const memberEither = await memberService.getMember(req.params.name);
|
||||||
|
|
||||||
const getMember = async (idOrName: number | string): Promise<Either<Member, string>> => {
|
if (memberEither.hasRight) {
|
||||||
const client = new_client();
|
res.sendStatus(404);
|
||||||
await client.connect();
|
return;
|
||||||
let res;
|
|
||||||
if (typeof idOrName !== 'number') {
|
|
||||||
res = await client.query("SELECT * FROM membres WHERE nom_membre=$1;", [`${idOrName}`]);
|
|
||||||
} else {
|
|
||||||
res = await client.query("SELECT * FROM membres WHERE id_membre=$1;", [idOrName]);
|
|
||||||
}
|
|
||||||
if (res.rows.length === 0) {
|
|
||||||
await client.end();
|
|
||||||
return eitherRight<Member, string>("Does not exist.");
|
|
||||||
}
|
|
||||||
const member: Member = { id_member: res.rows[0].id_membre, name: res.rows[0].nom_membre, password: res.rows[0].mdp_membre };
|
|
||||||
await client.end();
|
|
||||||
|
|
||||||
return eitherLeft<Member, string>(member);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const createMember = async (name: string, passwd: string): Promise<Either<Member, string>> => {
|
const member = memberEither.left;
|
||||||
const gettingMember = await getMember(name);
|
|
||||||
if (!gettingMember.hasRight) {
|
res.render('member.ejs', { member });
|
||||||
return eitherRight<Member, string>("Already in database.");
|
};
|
||||||
}
|
|
||||||
const client = new_client();
|
const allMembers: RequestHandler = async (_req, res) => {
|
||||||
await client.connect();
|
const members = await memberService.getAllMembers();
|
||||||
const res = await client.query("INSERT INTO membres (nom_membre, mdp_membre) VALUES ($1, $2) RETURNING *;", [`${name}`, `${passwd}`]);
|
res.render('members.ejs', { members });
|
||||||
if (res.rows.length === 0) {
|
};
|
||||||
await client.end();
|
|
||||||
return eitherRight<Member, string>("Something went wrong");
|
const memberById: RequestHandler<{ id: string; }> = async (req, res) => {
|
||||||
}
|
const id = parseInt(req.params.id);
|
||||||
const member: Member = { id_member: res.rows[0].id_membre, name: res.rows[0].nom_membre, password: res.rows[0].mdp_membre };
|
const memberEither = await memberService.getMember(id);
|
||||||
await client.end();
|
|
||||||
return eitherLeft<Member, string>(member);
|
if (memberEither.hasRight) {
|
||||||
|
res.sendStatus(404);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function userAdapter(member: Member): User {
|
const member = memberEither.left;
|
||||||
return { id_member: member.id_member, name: member.name };
|
|
||||||
}
|
|
||||||
|
|
||||||
export { getDefaultUser, getDefaultMember, getMember, createMember, userAdapter };
|
res.render('member.ejs', { member });
|
||||||
|
};
|
||||||
|
|
||||||
|
const memberController = {
|
||||||
|
memberByName,
|
||||||
|
memberById,
|
||||||
|
allMembers,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default memberController;
|
||||||
|
42
back-end/src/controllers/model.controller.ts
Normal file
42
back-end/src/controllers/model.controller.ts
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import modelService from "../services/model.service";
|
||||||
|
|
||||||
|
const modelByName: RequestHandler<{ name: string; }> = async (req, res) => {
|
||||||
|
const modelEither = await modelService.getModel(req.params.name);
|
||||||
|
|
||||||
|
if (modelEither.hasRight) {
|
||||||
|
res.sendStatus(404);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const model = modelEither.left;
|
||||||
|
|
||||||
|
res.render('model.ejs', { model });
|
||||||
|
};
|
||||||
|
|
||||||
|
const allModels: RequestHandler = async (_req, res) => {
|
||||||
|
const models = await modelService.getAllModels();
|
||||||
|
res.render('models.ejs', { models });
|
||||||
|
};
|
||||||
|
|
||||||
|
const modelById: RequestHandler<{ id: string; }> = async (req, res) => {
|
||||||
|
const id = parseInt(req.params.id);
|
||||||
|
const modelEither = await modelService.getModel(id);
|
||||||
|
|
||||||
|
if (modelEither.hasRight) {
|
||||||
|
res.sendStatus(404);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const model = modelEither.left;
|
||||||
|
|
||||||
|
res.render('model.ejs', { model });
|
||||||
|
};
|
||||||
|
|
||||||
|
const modelController = {
|
||||||
|
modelByName,
|
||||||
|
allModels,
|
||||||
|
modelById,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default modelController;
|
@ -1,7 +1,7 @@
|
|||||||
import { Request, Response } from 'express';
|
import { Request, Response } from 'express';
|
||||||
import { jwtVerify } from 'jose';
|
import { jwtVerify } from 'jose';
|
||||||
import { JWT_SECRET_KEY } from '../config/auth.config';
|
import { JWT_SECRET_KEY } from '../config/auth.config';
|
||||||
import { getMember } from '../controllers/member.controller';
|
import memberService from '../services/member.service';
|
||||||
import { Member } from '../types/member';
|
import { Member } from '../types/member';
|
||||||
import { Either } from '../utils/utils';
|
import { Either } from '../utils/utils';
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ const getUsername = async (req: Request, res: Response, next: () => void) => {
|
|||||||
try {
|
try {
|
||||||
const { payload } = await jwtVerify(token, JWT_SECRET_KEY);
|
const { payload } = await jwtVerify(token, JWT_SECRET_KEY);
|
||||||
const name: string = payload.name as string;
|
const name: string = payload.name as string;
|
||||||
const member: Either<Member, string> = await getMember(name);
|
const member: Either<Member, string> = await memberService.getMember(name);
|
||||||
|
|
||||||
if (!member.hasRight) {
|
if (!member.hasRight) {
|
||||||
res.locals.user = {
|
res.locals.user = {
|
||||||
|
14
back-end/src/routes/box.route.ts
Normal file
14
back-end/src/routes/box.route.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import express from 'express';
|
||||||
|
import boxController from '../controllers/box.controller';
|
||||||
|
|
||||||
|
const boxRouter = express.Router();
|
||||||
|
|
||||||
|
boxRouter.get("/", boxController.allBoxes);
|
||||||
|
|
||||||
|
boxRouter.get("/from/:date", boxController.allBoxesFromDate);
|
||||||
|
|
||||||
|
boxRouter.get("/:title", boxController.boxByTitle);
|
||||||
|
|
||||||
|
boxRouter.get("/byid/:id", boxController.boxById);
|
||||||
|
|
||||||
|
export default boxRouter;
|
@ -1,24 +1,28 @@
|
|||||||
import express from 'express';
|
import express from 'express';
|
||||||
|
import path from 'path';
|
||||||
import db from '../db';
|
import db from '../db';
|
||||||
import { getUsername, verifyAuthentication } from '../middlewares/auth.middleware'
|
import { getUsername, verifyAuthentication } from '../middlewares/auth.middleware'
|
||||||
import authRoute from './auth.route'
|
import authRoute from './auth.route'
|
||||||
import marquesRoute from './marque.route'
|
import marquesRoute from './marque.route'
|
||||||
import piecesRoute from './piece.route'
|
import piecesRoute from './piece.route'
|
||||||
|
import memberRouter from './member.route'
|
||||||
|
import modelRouter from './model.route';
|
||||||
|
import boxRouter from './box.route';
|
||||||
|
|
||||||
const routes = express.Router();
|
const routes = express.Router();
|
||||||
|
|
||||||
routes.get('/', async (_req, res) => {
|
routes.use("/static", express.static(path.join(__dirname, '../static')));
|
||||||
const message = await db.example_request();
|
|
||||||
res.send(message);
|
|
||||||
});
|
|
||||||
|
|
||||||
routes.get("/message", async (_req, res) => {
|
|
||||||
const message = await db.example_request();
|
|
||||||
res.render('index.ejs', { message });
|
|
||||||
});
|
|
||||||
|
|
||||||
routes.use("/auth", authRoute);
|
routes.use("/auth", authRoute);
|
||||||
routes.use("/marques", getUsername, verifyAuthentication, marquesRoute);
|
routes.use("/marques", getUsername, verifyAuthentication, marquesRoute);
|
||||||
routes.use("/pieces", getUsername, verifyAuthentication, piecesRoute);
|
routes.use("/pieces", getUsername, verifyAuthentication, piecesRoute);
|
||||||
|
routes.use("/membres", memberRouter);
|
||||||
|
routes.use("/models", modelRouter);
|
||||||
|
routes.use("/boxes", boxRouter);
|
||||||
|
|
||||||
|
// 404 fallback
|
||||||
|
routes.get("*", (_req, res) => {
|
||||||
|
res.render('notfound.ejs');
|
||||||
|
});
|
||||||
|
|
||||||
export default routes;
|
export default routes;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import express from 'express';
|
import express from 'express';
|
||||||
import { register } from '../controllers/marque.controller';
|
import marqueController from '../controllers/marque.controller';
|
||||||
|
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
router.post('/register', register);
|
router.post('/register', marqueController.register);
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
12
back-end/src/routes/member.route.ts
Normal file
12
back-end/src/routes/member.route.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import express from 'express';
|
||||||
|
import memberController from '../controllers/member.controller';
|
||||||
|
|
||||||
|
const router = express.Router();
|
||||||
|
|
||||||
|
router.get("/", memberController.allMembers);
|
||||||
|
|
||||||
|
router.get("/:name", memberController.memberByName);
|
||||||
|
|
||||||
|
router.get("/byid/:id", memberController.memberById);
|
||||||
|
|
||||||
|
export default router;
|
12
back-end/src/routes/model.route.ts
Normal file
12
back-end/src/routes/model.route.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import express from 'express';
|
||||||
|
import modelController from '../controllers/model.controller';
|
||||||
|
|
||||||
|
const modelRouter = express.Router();
|
||||||
|
|
||||||
|
modelRouter.get("/", modelController.allModels);
|
||||||
|
|
||||||
|
modelRouter.get("/:name", modelController.modelByName);
|
||||||
|
|
||||||
|
modelRouter.get("/byid/:id", modelController.modelById);
|
||||||
|
|
||||||
|
export default modelRouter;
|
68
back-end/src/services/box.service.ts
Normal file
68
back-end/src/services/box.service.ts
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
import { new_client } from '../db/db_client';
|
||||||
|
import { Box } from '../types/box';
|
||||||
|
import { Either, eitherLeft, eitherRight } from '../utils/utils';
|
||||||
|
|
||||||
|
type DBBox = {
|
||||||
|
id_boite: number;
|
||||||
|
titre_boite: string;
|
||||||
|
date_boite: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
function db2box(data: DBBox): Box {
|
||||||
|
const box: Box = {
|
||||||
|
id: data.id_boite,
|
||||||
|
title: data.titre_boite,
|
||||||
|
date: new Date(data.date_boite),
|
||||||
|
};
|
||||||
|
|
||||||
|
return box;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getBox = async (idOrTitle: number | string): Promise<Either<Box, string>> => {
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
let res;
|
||||||
|
if (typeof idOrTitle !== 'number') {
|
||||||
|
res = await client.query("SELECT * FROM boites WHERE titre_boite=$1;", [`${idOrTitle}`]);
|
||||||
|
} else {
|
||||||
|
res = await client.query("SELECT * FROM boites WHERE id_boite=$1;", [idOrTitle]);
|
||||||
|
}
|
||||||
|
if (res.rows.length === 0) {
|
||||||
|
await client.end();
|
||||||
|
return eitherRight<Box, string>("Does not exist.");
|
||||||
|
}
|
||||||
|
const box = db2box(res.rows[0]);
|
||||||
|
await client.end();
|
||||||
|
|
||||||
|
return eitherLeft<Box, string>(box);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getAllBoxes = async () => {
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
const res = await client.query("SELECT * FROM boites");
|
||||||
|
await client.end();
|
||||||
|
return res.rows.map(db2box);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getAllBoxesFromDate = async (date: Date) => {
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
|
||||||
|
const YYYY = date.getFullYear();
|
||||||
|
const MM = date.getMonth() + 1;
|
||||||
|
const DD = date.getDate();
|
||||||
|
const dateString = `${YYYY}-${MM}-${DD}`;
|
||||||
|
|
||||||
|
const res = await client.query("SELECT * FROM boites WHERE date_boite > $1", [dateString]);
|
||||||
|
await client.end();
|
||||||
|
return res.rows.map(db2box);
|
||||||
|
}
|
||||||
|
|
||||||
|
const boxService = {
|
||||||
|
getBox,
|
||||||
|
getAllBoxes,
|
||||||
|
getAllBoxesFromDate,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default boxService;
|
47
back-end/src/services/marque.service.ts
Normal file
47
back-end/src/services/marque.service.ts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import { Request, Response } from 'express';
|
||||||
|
import { new_client } from '../db/db_client';
|
||||||
|
import { Marque } from '../types/marque';
|
||||||
|
import { Either, eitherLeft, eitherRight } from '../utils/utils';
|
||||||
|
|
||||||
|
const getMarque = async (idOrName: number | string): Promise<Either<Marque, string>> => {
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
let res;
|
||||||
|
if (typeof idOrName !== 'number') {
|
||||||
|
res = await client.query("SELECT * FROM marques WHERE nom_marque=$1;", [`${idOrName}`]);
|
||||||
|
} else {
|
||||||
|
res = await client.query("SELECT * FROM marques WHERE id_marque=$1;", [idOrName]);
|
||||||
|
}
|
||||||
|
if (res.rows.length === 0) {
|
||||||
|
await client.end();
|
||||||
|
return eitherRight<Marque, string>("Does not exist.");
|
||||||
|
}
|
||||||
|
const marque: Marque = { id_marque: res.rows[0].id_marque, name: res.rows[0].nom_marque };
|
||||||
|
await client.end();
|
||||||
|
|
||||||
|
return eitherLeft<Marque, string>(marque);
|
||||||
|
}
|
||||||
|
|
||||||
|
const createMarque = async (name: string): Promise<Either<Marque, string>> => {
|
||||||
|
const gettingMarque = await getMarque(name);
|
||||||
|
if (!gettingMarque.hasRight) {
|
||||||
|
return eitherRight<Marque, string>("Already in database.");
|
||||||
|
}
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
const res = await client.query("INSERT INTO marques (nom_membre) VALUES ($1) RETURNING *;", [`${name}`]);
|
||||||
|
if (res.rows.length === 0) {
|
||||||
|
await client.end();
|
||||||
|
return eitherRight<Marque, string>("Something went wrong");
|
||||||
|
}
|
||||||
|
const marque: Marque = { id_marque: res.rows[0].id_marque, name: res.rows[0].nom_marque };
|
||||||
|
await client.end();
|
||||||
|
return eitherLeft<Marque, string>(marque);
|
||||||
|
};
|
||||||
|
|
||||||
|
const marqueService = {
|
||||||
|
getMarque,
|
||||||
|
createMarque
|
||||||
|
};
|
||||||
|
|
||||||
|
export default marqueService;
|
80
back-end/src/services/member.service.ts
Normal file
80
back-end/src/services/member.service.ts
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
import { new_client } from '../db/db_client';
|
||||||
|
import { Member, User } from '../types/member';
|
||||||
|
import { Either, eitherLeft, eitherRight } from '../utils/utils';
|
||||||
|
|
||||||
|
type DBMembre = {
|
||||||
|
id_membre: number;
|
||||||
|
nom_membre: string;
|
||||||
|
mdp_membre: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
function db2member(data: DBMembre) {
|
||||||
|
const member: Member = {
|
||||||
|
id_member: data.id_membre,
|
||||||
|
name: data.nom_membre,
|
||||||
|
password: data.mdp_membre,
|
||||||
|
};
|
||||||
|
return member;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getMember = async (idOrName: number | string): Promise<Either<Member, string>> => {
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
let res;
|
||||||
|
if (typeof idOrName !== 'number') {
|
||||||
|
res = await client.query("SELECT * FROM membres WHERE nom_membre=$1;", [`${idOrName}`]);
|
||||||
|
} else {
|
||||||
|
res = await client.query("SELECT * FROM membres WHERE id_membre=$1;", [idOrName]);
|
||||||
|
}
|
||||||
|
if (res.rows.length === 0) {
|
||||||
|
await client.end();
|
||||||
|
return eitherRight<Member, string>("Does not exist.");
|
||||||
|
}
|
||||||
|
const member = db2member(res.rows[0]);
|
||||||
|
await client.end();
|
||||||
|
|
||||||
|
return eitherLeft<Member, string>(member);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getAllMembers = async () => {
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
const res = await client.query("SELECT * FROM membres");
|
||||||
|
await client.end();
|
||||||
|
return res.rows.map(db2member);
|
||||||
|
}
|
||||||
|
|
||||||
|
const createMember = async (name: string, passwd: string): Promise<Either<Member, string>> => {
|
||||||
|
const gettingMember = await getMember(name);
|
||||||
|
if (!gettingMember.hasRight) {
|
||||||
|
return eitherRight<Member, string>("Already in database.");
|
||||||
|
}
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
const res = await client.query("INSERT INTO membres (nom_membre, mdp_membre) VALUES ($1, $2) RETURNING *;", [`${name}`, `${passwd}`]);
|
||||||
|
if (res.rows.length === 0) {
|
||||||
|
await client.end();
|
||||||
|
return eitherRight<Member, string>("Something went wrong");
|
||||||
|
}
|
||||||
|
const member: Member = { id_member: res.rows[0].id_membre, name: res.rows[0].nom_membre, password: res.rows[0].mdp_membre };
|
||||||
|
await client.end();
|
||||||
|
return eitherLeft<Member, string>(member);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDefaultUser = (): User => ({ id_member: -1, name: "unknown" });
|
||||||
|
const getDefaultMember = (): Member => ({ id_member: -1, name: "unknown", password: "none" });
|
||||||
|
|
||||||
|
function userAdapter(member: Member): User {
|
||||||
|
return { id_member: member.id_member, name: member.name };
|
||||||
|
}
|
||||||
|
|
||||||
|
const memberService = {
|
||||||
|
getMember,
|
||||||
|
createMember,
|
||||||
|
getDefaultUser,
|
||||||
|
getDefaultMember,
|
||||||
|
userAdapter,
|
||||||
|
getAllMembers,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default memberService;
|
81
back-end/src/services/model.service.ts
Normal file
81
back-end/src/services/model.service.ts
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
import { new_client } from '../db/db_client';
|
||||||
|
import { Model } from '../types/model';
|
||||||
|
import { Either, eitherLeft, eitherRight } from '../utils/utils';
|
||||||
|
|
||||||
|
type DBModel = {
|
||||||
|
id_modele: number;
|
||||||
|
nom_modele: string;
|
||||||
|
url_notice_modele: string;
|
||||||
|
id_membre: number;
|
||||||
|
id_modele_2: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
function db2Model(data: DBModel) {
|
||||||
|
const model: Model = {
|
||||||
|
id: data.id_modele,
|
||||||
|
name: data.nom_modele,
|
||||||
|
url: data.url_notice_modele,
|
||||||
|
creator: data.id_membre,
|
||||||
|
inheritFrom: data.id_modele_2,
|
||||||
|
};
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getModel = async (idOrName: number | string): Promise<Either<Model, string>> => {
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
let res;
|
||||||
|
if (typeof idOrName !== 'number') {
|
||||||
|
res = await client.query("SELECT * FROM modeles WHERE nom_modele=$1;", [`${idOrName}`]);
|
||||||
|
} else {
|
||||||
|
res = await client.query("SELECT * FROM modeles WHERE id_modele=$1;", [idOrName]);
|
||||||
|
}
|
||||||
|
if (res.rows.length === 0) {
|
||||||
|
await client.end();
|
||||||
|
return eitherRight<Model, string>("Does not exist.");
|
||||||
|
}
|
||||||
|
const model = db2Model(res.rows[0]);
|
||||||
|
await client.end();
|
||||||
|
|
||||||
|
return eitherLeft<Model, string>(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getAllModels = async () => {
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
const res = await client.query("SELECT * FROM modeles");
|
||||||
|
await client.end();
|
||||||
|
return res.rows.map(db2Model);
|
||||||
|
}
|
||||||
|
|
||||||
|
const createModel = async (name: string, url: string, creator: number, inheritFrom: number): Promise<Either<Model, string>> => {
|
||||||
|
const gettingModel = await getModel(name);
|
||||||
|
if (!gettingModel.hasRight) {
|
||||||
|
return eitherRight<Model, string>("Already in database.");
|
||||||
|
}
|
||||||
|
const client = new_client();
|
||||||
|
await client.connect();
|
||||||
|
const res = await client.query(
|
||||||
|
"INSERT INTO modeles \
|
||||||
|
(nom_modele, url_notice_modele, id_membre, id_modele_2) \
|
||||||
|
VALUES ($1, $2, $3, $4) \
|
||||||
|
RETURNING *;",
|
||||||
|
[`${name}`, `${url}`, `${creator}`, `${inheritFrom}`]);
|
||||||
|
|
||||||
|
if (res.rows.length === 0) {
|
||||||
|
await client.end();
|
||||||
|
return eitherRight<Model, string>("Something went wrong");
|
||||||
|
}
|
||||||
|
const model: Model = db2Model(res.rows[0]);
|
||||||
|
await client.end();
|
||||||
|
return eitherLeft<Model, string>(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
const modelService = {
|
||||||
|
getModel,
|
||||||
|
getAllModels,
|
||||||
|
createModel,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default modelService;
|
7
back-end/src/static/css/colors.css
Normal file
7
back-end/src/static/css/colors.css
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
:root {
|
||||||
|
--fg: #161925;
|
||||||
|
--bg: #FDFFFC;
|
||||||
|
--blue: #235789;
|
||||||
|
--red: #C1292E;
|
||||||
|
--yellow: #F1D302;
|
||||||
|
}
|
22
back-end/src/static/css/header.css
Normal file
22
back-end/src/static/css/header.css
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.header nav ul {
|
||||||
|
display: flex;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
background-color: var(--fg);
|
||||||
|
color: var(--bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header a {
|
||||||
|
color: var(--bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header li {
|
||||||
|
padding: 2rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header li:hover {
|
||||||
|
background-color: var(--bg);
|
||||||
|
color: var(--fg);
|
||||||
|
}
|
15
back-end/src/static/css/reset.css
Normal file
15
back-end/src/static/css/reset.css
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
outline: 0;
|
||||||
|
border: 0;
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre, code {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-bottom: 2px solid var(--fg);
|
||||||
|
}
|
25
back-end/src/templates/box.ejs
Normal file
25
back-end/src/templates/box.ejs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>
|
||||||
|
<%= box.title %>
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<%- include('partials/links.ejs') %>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<%- include('partials/header.ejs') %>
|
||||||
|
<h1>
|
||||||
|
<%= box.title %>
|
||||||
|
</h1>
|
||||||
|
<pre>
|
||||||
|
id : <%= box.id %>
|
||||||
|
date : <%= box.date %>
|
||||||
|
</pre>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
39
back-end/src/templates/boxes.ejs
Normal file
39
back-end/src/templates/boxes.ejs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>
|
||||||
|
Liste des boîtes
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<%- include('partials/links.ejs') %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%- include('partials/header.ejs') %>
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
Liste des boîtes
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<div class="fromDate">
|
||||||
|
<label for="fromDate">À partir de : </label>
|
||||||
|
<input type="date" name="fromDate" id="fromDate">
|
||||||
|
<input type="submit" value="Filtrer" onclick="window.location.pathname = '/boxes/from/' + document.getElementById('fromDate').value;">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<% boxes.forEach(function(box) { %>
|
||||||
|
<li>
|
||||||
|
<a href="/boxes/<%=box.title%>">
|
||||||
|
<%=box.title%>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% }); %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -1,13 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Leohl !dworl</title>
|
<title>Leohl !dworl</title>
|
||||||
|
|
||||||
|
<%- include('partials/links.ejs') %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<%- include('partials/header.ejs') %>
|
||||||
<h1>Naisu</h1>
|
<h1>Naisu</h1>
|
||||||
<h2><%= message %></h2>
|
<h2>
|
||||||
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Sapiente quod dicta molestiae harum veniam iste, nostrum nemo earum commodi fugit modi, ratione obcaecati, beatae ullam. Debitis ducimus dignissimos rem at.</p>
|
<%= message %>
|
||||||
|
</h2>
|
||||||
|
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Sapiente quod dicta molestiae harum veniam iste, nostrum
|
||||||
|
nemo earum commodi fugit modi, ratione obcaecati, beatae ullam. Debitis ducimus dignissimos rem at.</p>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
23
back-end/src/templates/member.ejs
Normal file
23
back-end/src/templates/member.ejs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>
|
||||||
|
<%= member.name %>
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<%- include('partials/links.ejs') %>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<%- include('partials/header.ejs') %>
|
||||||
|
<h1>
|
||||||
|
<%= member.name %>
|
||||||
|
</h1>
|
||||||
|
<h2>id: <%= member.id_member%>
|
||||||
|
</h2>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
31
back-end/src/templates/members.ejs
Normal file
31
back-end/src/templates/members.ejs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>
|
||||||
|
Liste des membres
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<%- include('partials/links.ejs') %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%- include('partials/header.ejs') %>
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
Liste des membres
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<% members.forEach(function(member) { %>
|
||||||
|
<li>
|
||||||
|
<a href="/membres/<%=member.name%>">
|
||||||
|
<%=member.name%>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% }); %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
27
back-end/src/templates/model.ejs
Normal file
27
back-end/src/templates/model.ejs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>
|
||||||
|
<%= model.name %>
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<%- include('partials/links.ejs') %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%- include('partials/header.ejs') %>
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
<%= model.name %>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
id : <%= model.id %>
|
||||||
|
url : <%= model.url %>
|
||||||
|
creator : <%= model.creator %>
|
||||||
|
inheritFrom : <%= model.inheritFrom %>
|
||||||
|
</pre>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
31
back-end/src/templates/models.ejs
Normal file
31
back-end/src/templates/models.ejs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>
|
||||||
|
Liste des modeles
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<%- include('partials/links.ejs') %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%- include('partials/header.ejs') %>
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
Liste des modeles
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<% models.forEach(function(model) { %>
|
||||||
|
<li>
|
||||||
|
<a href="/models/<%=model.name%>">
|
||||||
|
<%=model.name%>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% }); %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
19
back-end/src/templates/notfound.ejs
Normal file
19
back-end/src/templates/notfound.ejs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>
|
||||||
|
404 -- Not Found
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<%- include('partials/links.ejs') %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%- include('partials/header.ejs') %>
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
¯\_(ツ)_/¯
|
||||||
|
</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
23
back-end/src/templates/partials/header.ejs
Normal file
23
back-end/src/templates/partials/header.ejs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<header class="header">
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<a href="/membres">
|
||||||
|
<li>
|
||||||
|
Membres
|
||||||
|
</li>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/models">
|
||||||
|
<li>
|
||||||
|
Modèles
|
||||||
|
</li>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/boxes">
|
||||||
|
<li>
|
||||||
|
Boîtes
|
||||||
|
</li>
|
||||||
|
</a>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
3
back-end/src/templates/partials/links.ejs
Normal file
3
back-end/src/templates/partials/links.ejs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<link href="/static/css/colors.css" rel="stylesheet" />
|
||||||
|
<link href="/static/css/header.css" rel="stylesheet" />
|
||||||
|
<link href="/static/css/reset.css" rel="stylesheet" />
|
7
back-end/src/types/box.ts
Normal file
7
back-end/src/types/box.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
type Box = {
|
||||||
|
id: number;
|
||||||
|
title: string;
|
||||||
|
date: Date;
|
||||||
|
};
|
||||||
|
|
||||||
|
export { Box };
|
9
back-end/src/types/model.ts
Normal file
9
back-end/src/types/model.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
type Model = {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
creator: number;
|
||||||
|
inheritFrom: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export { Model };
|
@ -2,10 +2,10 @@ services:
|
|||||||
database:
|
database:
|
||||||
hostname: database
|
hostname: database
|
||||||
container_name: briques_postgres
|
container_name: briques_postgres
|
||||||
|
env_file: back-end/.env
|
||||||
build:
|
build:
|
||||||
context: ./PostgreSQL
|
context: ./PostgreSQL
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: always
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=${DB_NAME}
|
- POSTGRES_DB=${DB_NAME}
|
||||||
- POSTGRES_USER=${DB_USER}
|
- POSTGRES_USER=${DB_USER}
|
||||||
@ -17,6 +17,5 @@ services:
|
|||||||
|
|
||||||
adminer:
|
adminer:
|
||||||
image: adminer
|
image: adminer
|
||||||
restart: always
|
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
|
@ -6,6 +6,7 @@ services:
|
|||||||
context: ./PostgreSQL
|
context: ./PostgreSQL
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
|
env_file: back-end/.env.production
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=${DB_NAME}
|
- POSTGRES_DB=${DB_NAME}
|
||||||
- POSTGRES_USER=${DB_USER}
|
- POSTGRES_USER=${DB_USER}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user