MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / act_create

Function act_create

src/gpre/sql.cpp:1628–1679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1626//
1627
1628static act* act_create()
1629{
1630 if (MSC_match(KW_DATABASE) || MSC_match(KW_SCHEMA))
1631 return act_create_database();
1632
1633 if (MSC_match(KW_DOMAIN))
1634 return act_create_domain();
1635
1636 if (MSC_match(KW_GENERATOR))
1637 return act_create_generator();
1638
1639 if (MSC_match(KW_SHADOW))
1640 return act_create_shadow();
1641
1642 if (MSC_match(KW_STOGROUP))
1643 PAR_error("CREATE STOGROUP not supported");
1644
1645 if (MSC_match(KW_SYNONYM))
1646 PAR_error("CREATE SYNONYM not supported");
1647
1648 if (MSC_match(KW_TABLE))
1649 return act_create_table();
1650
1651 if (MSC_match(KW_TABLESPACE))
1652 PAR_error("CREATE TABLESPACE not supported");
1653
1654 if (MSC_match(KW_VIEW))
1655 return (act_create_view());
1656
1657 const kwwords_t tok_kw = gpreGlob.token_global.tok_keyword;
1658 if (tok_kw == KW_UNIQUE || tok_kw == KW_ASCENDING || tok_kw == KW_DESCENDING || tok_kw == KW_INDEX)
1659 {
1660 bool descending = false;
1661 bool unique = false;
1662 while (true)
1663 {
1664 if (MSC_match(KW_UNIQUE))
1665 unique = true;
1666 else if (MSC_match(KW_ASCENDING))
1667 descending = false;
1668 else if (MSC_match(KW_DESCENDING))
1669 descending = true;
1670 else if (MSC_match(KW_INDEX))
1671 return act_create_index(unique, descending);
1672 else
1673 break;
1674 }
1675 }
1676
1677 PAR_error("Invalid CREATE request");
1678 return NULL; // silence compiler
1679}
1680
1681
1682//____________________________________________________________

Callers 1

SQL_actionFunction · 0.85

Calls 9

MSC_matchFunction · 0.85
act_create_databaseFunction · 0.85
act_create_domainFunction · 0.85
act_create_generatorFunction · 0.85
act_create_shadowFunction · 0.85
act_create_tableFunction · 0.85
act_create_viewFunction · 0.85
act_create_indexFunction · 0.85
PAR_errorFunction · 0.70

Tested by

no test coverage detected