Support C language
This commit is contained in:
parent
c22c71778d
commit
08b7309472
13
migrations/2019-09-19-100046_c/down.sql
Normal file
13
migrations/2019-09-19-100046_c/down.sql
Normal file
|
@ -0,0 +1,13 @@
|
|||
DELETE FROM implementation_wrappers WHERE implementation_id IN (
|
||||
SELECT implementation_id
|
||||
FROM implementations
|
||||
JOIN languages USING (language_id)
|
||||
WHERE languages.identifier = 'c'
|
||||
);
|
||||
|
||||
DELETE FROM implementations WHERE implementation_id IN (
|
||||
SELECT implementation_id
|
||||
FROM implementations
|
||||
JOIN languages USING (language_id)
|
||||
WHERE languages.identifier = 'c'
|
||||
);
|
21
migrations/2019-09-19-100046_c/up.sql
Normal file
21
migrations/2019-09-19-100046_c/up.sql
Normal file
|
@ -0,0 +1,21 @@
|
|||
INSERT INTO implementations (language_id, identifier, label)
|
||||
SELECT language_id, 'clang', 'Clang'
|
||||
FROM languages
|
||||
WHERE identifier = 'c';
|
||||
|
||||
INSERT INTO implementations (language_id, identifier, label)
|
||||
SELECT language_id, 'gcc', 'gcc'
|
||||
FROM languages
|
||||
WHERE identifier = 'c';
|
||||
|
||||
INSERT INTO implementation_wrappers (implementation_id, identifier, label, code, ordering)
|
||||
SELECT implementation_id, 'run', 'Run', 'mv code code.c; clang %s code.c && ./a.out', 1
|
||||
FROM implementations
|
||||
JOIN languages USING (language_id)
|
||||
WHERE implementations.identifier = 'clang'
|
||||
AND languages.identifier = 'c';
|
||||
|
||||
INSERT INTO implementation_wrappers (implementation_id, identifier, label, code, ordering)
|
||||
SELECT implementation_id, 'run', 'Run', 'mv code code.c; gcc %s code.c && ./a.out', 1
|
||||
FROM implementations
|
||||
WHERE identifier = 'gcc';
|
Loading…
Reference in New Issue
Block a user