Knowledgator UTCA
KnowledgatorGitHubDiscord
  • Welcome to UTCA documentation!
  • Quickstart
  • Concepts
    • Components
    • Types of components
    • ExecutionSchema
    • Context
    • Scopes
  • Development and Contribution
    • Contribution
    • Future relises
  • Framework structure
  • Core
    • Component
    • BaseExecutor
    • Action
    • Executable
    • Evaluator
    • Memory management
    • Schemas
    • Exceptions
  • Structural components
    • ExecutionSchema
    • Switch
    • ForEach
    • Filter
    • While
    • Condition
    • BREAK
    • Log
  • Base Actions
    • Flush
    • AddData
    • RenameAttribute
    • RenameAttributeQuery
    • SetValue
    • UnpackValue
    • NestToKey
    • ExecuteFunction
  • Predictors
    • Predictor
    • Transformers predictors
    • Transformers schemas
    • TokenSearcherPredictor
    • ComprehendItPredictor
    • GLiNERPredictor
    • OpenAIChatGPTPredictor
    • OpenAIWhisperPredictor
  • Tasks
    • Task
    • ComprehendIt
    • TokenSearcherTextCleaner
    • TokenSearcherNER
    • TokenSearcherQandA
    • TokenSearcherRelationExtraction
    • GLiNER
    • GLiNERRelationExtraction
    • GLiNERQandA
    • OpenAIChat
    • WhisperSpeechToText
    • TransformersTextToSpeech
    • TransformersChartsAndPlotsAnalysis
    • TransformersDocumentQandA
    • TransformersImageClassification
    • TransformersVisualQandA
    • TransformersObjectDetection
    • TransformersTextEmbedding
    • TransformersEntityLinking
    • TransformersTokenClassifier
    • TransformersTextSummarization
    • TransformersTextualQandA
    • TransformersTextClassification
    • TransformersChat
    • Objects
    • Chat tasks utilities
    • Relation extraction tasks utilities
  • Executable Schemas
    • SemanticSearchSchema
    • Web2Meaning
    • RequestsHTML
  • Datasources
    • Audio
    • DB
      • SQL
      • Neo4j
      • Chroma
      • Qdrant
    • Google Documents
    • Google Sheets
    • Image
    • Index
    • JSON
    • PDF
    • Plain text
    • Video
  • Conditions
    • RePattern
    • SemanticCondition
  • APIs
    • GoogleCloudClient
  • Integrations
    • Google Cloud
  • Examples
    • Basic image classification
    • Text to speech
    • PDF document processing
Powered by GitBook
On this page
  • Module: implementation.datasources.db
  • SQLAction
  • __init__
  • execute
  • SQLActionWithReturns
  • __init__
  • execute
  • SQLSessionFactory
  • __init__
  • create
  • close_all
  • create_tables
  • BaseModel
  1. Datasources
  2. DB

SQL

PreviousDBNextNeo4j

Last updated 11 months ago

Module: .datasources.db



SQLAction

SQL action without returns. Expected that this action will execute statements that don't return data from DB.

Subclass of . Type of [Dict[str, Any], None]


__init__

Arguments:

  • session (): Session to use.

  • name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.


execute

Arguments:

  • input_data (Dict[str, Any]): Expected keys:

    • "kwargs" (Dict[str, Any], optional): Extra arguments.

In details about statements, see:




SQLActionWithReturns


__init__

Arguments:

  • name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.


execute

Arguments:

  • input_data (Dict[str, Any]): Expected keys:

    • "kwargs" (Dict[str, Any], optional): Extra arguments.

Returns:

  • List[Any]: Result of query.

In details about statements, see:




SQLSessionFactory

Sessions manager


__init__

Arguments:

  • url (str): connection URL of the DB.

  • echo (bool, optional): If equals to True, logs debug info. Defaults to False.


create

Create session

Returns:

  • Session


close_all

Close all sessions


create_tables

Create all tables

Arguments:

See more:




BaseModel



"statement" (Any): .

SQL action with returns. Subclass of . Type of [Dict[str, Any], Any]

session (): Session to use.

"statement" (Any): .

tables_class (Type[], optional): Base class of tables that will be used to trigger creation. Defaults to .

Default base class for tables models. Subclass of .

SQLAlchemy statement
Action
Action
SQLAlchemy statement
DeclarativeBase
SQLSessionFactory
DeclarativeBase
BaseModel
Action
Action
SQLSessionFactory
implementation
SQL Statements and Expressions API — SQLAlchemy 2.0 Documentation
SQL Statements and Expressions API — SQLAlchemy 2.0 Documentation
Logo
Logo
ORM Mapped Class Overview — SQLAlchemy 2.0 Documentation
Logo
ORM Quick Start — SQLAlchemy 2.0 Documentation
Logo