neuralogic.dbο
- class PostgresConverter(model, table_mappings: List[TableMapping], settings: Settings)[source]ο
Bases:
Converter
- static get_function(name: str, params: List[str], return_type: List[str], body: str, language: str = 'SQL', volatility: str = 'STABLE') str [source]ο
- static get_empty_function(name: str, params: List[str], return_type: List[str], language: str = 'SQL', volatility: str = 'STABLE') str [source]ο
- get_fact_sql_function(relation: BaseRelation, index: int, weight_indices: List[int], weights) str [source]ο
Generate a SQL function for a ground fact
- get_relation_interface_sql_function(relation: str, arity: int) Tuple[str, str] [source]ο
Return the SQL function that should by used by the end users
- class TableMapping(relation_name: str, table_name: str, term_columns: List[str], value_column: str | None = None)[source]ο
Bases:
object
- relation_name: strο
- table_name: strο
- term_columns: List[str]ο
- value_column: str | None = Noneο
- class Converter(model, table_mappings: List[TableMapping], settings: Settings)[source]ο
Bases:
object
- get_rule_sql_function(rule: Rule, index: int, activation: str, aggregation: str, weight_indices: List[int], weights) str [source]ο
- get_fact_sql_function(relation: BaseRelation, index: int, weight_indices: List[int], weights) str [source]ο