module translation.translation_to_python

Inheritance diagram of pysqllike.translation.translation_to_python

Short summary

module pysqllike.translation.translation_to_python

One class which visits a syntax tree.

source on GitHub

Classes

class

truncated documentation

Translate2Python

Translates a code into Python.

Methods

method

truncated documentation

__init__

constructor

GroupBy

Interprets a select statement.

Select

Interprets a select statement.

setReturn

Indicates all nodes containing information about returned results.

Signature

Builds the signature of a function based on its name and its children.

Where

Interprets a where statement.

Documentation

One class which visits a syntax tree.

source on GitHub

class pysqllike.translation.translation_to_python.Translate2Python(code_func)[source]

Bases: pysqllike.translation.translation_class.TranslateClass

Translates a code into Python.

source on GitHub

constructor

Parameters

code_func – code (str) or function(func)

source on GitHub

GroupBy(name, table, rows)[source]

Interprets a select statement.

Parameters
  • name – name of the table which receives the results

  • table – name of the table it applies to

  • rows – rows to consider

Returns

list of strings (code)

source on GitHub

Select(name, table, rows)[source]

Interprets a select statement.

Parameters
  • name – name of the table which receives the results

  • table – name of the table it applies to

  • rows – rows to consider

Returns

list of strings (code)

source on GitHub

Signature(name, rows)[source]

Builds the signature of a function based on its name and its children.

Parameters
  • name – name

  • rows – list of arguments

Returns

list of strings (code)

source on GitHub

Where(name, table, rows)[source]

Interprets a where statement.

Parameters
  • name – name of the table which receives the results

  • table – name of the table it applies to

  • rows – rows to consider

Returns

list of strings (code)

source on GitHub

__init__(code_func)[source]

constructor

Parameters

code_func – code (str) or function(func)

source on GitHub

setReturn(nodes)[source]

Indicates all nodes containing information about returned results.

Parameters

nodes – list of nodes

Returns

list of string

source on GitHub