parameters: (
          self, text, bind=None, bindparams=None, typemap=None, autocommit=None
      )
return_statement: return stmt
docstring: r"""Construct a new :class:`.TextClause` clause, representing
          a textual SQL string directly.
  
          E.g.::
  
              from sqlalchemy import text
  
              t = text("SELECT * FROM users")
              result = connection.execute(t)
  
          The advantages :func:`.text` provides over a plain string are
          backend-neutral support for bind parameters, per-statement
          execution options, as well as
          bind parameter and result-column typing behavior, allowing
          SQLAlchemy type constructs to play a role when executing
          a statement that is specified literally.  The construct can also
          be provided with a ``.c`` collection of column elements, allowing
          it to be embedded in other SQL expression constructs as a subquery.
  
          Bind parameters are specified by name, using the format ``:name``.
          E.g.::
  
              t = text("SELECT * FROM users WHERE id=:user_id")
              result = connection.execute(t, user_id=12)
  
          For SQL statements where a colon is required verbatim, as within
          an inline string, use a backslash to escape::
  
              t = text("SELECT * FROM users WHERE name='\:username'")
  
          The :class:`.TextClause` construct includes methods which can
          provide information about the bound parameters as well as the column
          values which would be returned from the textual statement, assuming
          it's an executable SELECT type of statement.  The
          :meth:`.TextClause.bindparams` method is used to provide bound
          parameter detail, and :meth:`.TextClause.columns` method allows
          specification of return columns including names and types::
  
              t = text("SELECT * FROM users WHERE id=:user_id").\
                      bindparams(user_id=7).\
                      columns(id=Integer, name=String)
  
              for id, name in connection.execute(t):
                  print(id, name)
  
          The :func:`.text` construct is used in cases when
          a literal string SQL fragment is specified as part of a larger query,
          such as for the WHERE clause of a SELECT statement::
  
              s = select([users.c.id, users.c.name]).where(text("id=:user_id"))
              result = connection.execute(s, user_id=12)
  
          :func:`.text` is also used for the construction
          of a full, standalone statement using plain text.
          As such, SQLAlchemy refers
          to it as an :class:`.Executable` object, and it supports
          the :meth:`Executable.execution_options` method.  For example,
          a :func:`.text` construct that should be subject to "autocommit"
          can be set explicitly so using the
          :paramref:`.Connection.execution_options.autocommit` option::
  
              t = text("EXEC my_procedural_thing()").\
                      execution_options(autocommit=True)
  
          Note that SQLAlchemy's usual "autocommit" behavior applies to
          :func:`.text` constructs implicitly - that is, statements which begin
          with a phrase such as ``INSERT``, ``UPDATE``, ``DELETE``,
          or a variety of other phrases specific to certain backends, will
          be eligible for autocommit if no transaction is in progress.
  
          :param text:
            the text of the SQL statement to be created.  use ``:<param>``
            to specify bind parameters; they will be compiled to their
            engine-specific format.
  
          :param autocommit: whether or not to set the "autocommit" execution
            option for this :class:`.TextClause` object.
  
          :param bind:
            an optional connection or engine to be used for this text query.
  
          :param bindparams:
            A list of :func:`.bindparam` instances used to
            provide information about parameters embedded in the statement.
  
            E.g.::
  
                stmt = text("SELECT * FROM table WHERE id=:id",
                          bindparams=[bindparam('id', value=5, type_=Integer)])
  
          :param typemap:
            A dictionary mapping the names of columns represented in the columns
            clause of a ``SELECT`` statement to type objects.
  
            E.g.::
  
                stmt = text("SELECT * FROM table",
                              typemap={'id': Integer, 'name': String},
                          )
  
          .. seealso::
  
              :ref:`sqlexpression_text` - in the Core tutorial
  
              :ref:`orm_tutorial_literal_sql` - in the ORM tutorial
docstring_summary: r"""Construct a new :class:`.TextClause` clause, representing
          a textual SQL string directly.
docstring_tokens: r Construct a new : class : . TextClause clause representing a textual SQL string directly .
function: def _create_text(
          self, text, bind=None, bindparams=None, typemap=None, autocommit=None
      ):
          r"""Construct a new :class:`.TextClause` clause, representing
          a textual SQL string directly.
  
          E.g.::
  
              from sqlalchemy import text
  
              t = text("SELECT * FROM users")
              result = connection.execute(t)
  
          The advantages :func:`.text` provides over a plain string are
          backend-neutral support for bind parameters, per-statement
          execution options, as well as
          bind parameter and result-column typing behavior, allowing
          SQLAlchemy type constructs to play a role when executing
          a statement that is specified literally.  The construct can also
          be provided with a ``.c`` collection of column elements, allowing
          it to be embedded in other SQL expression constructs as a subquery.
  
          Bind parameters are specified by name, using the format ``:name``.
          E.g.::
  
              t = text("SELECT * FROM users WHERE id=:user_id")
              result = connection.execute(t, user_id=12)
  
          For SQL statements where a colon is required verbatim, as within
          an inline string, use a backslash to escape::
  
              t = text("SELECT * FROM users WHERE name='\:username'")
  
          The :class:`.TextClause` construct includes methods which can
          provide information about the bound parameters as well as the column
          values which would be returned from the textual statement, assuming
          it's an executable SELECT type of statement.  The
          :meth:`.TextClause.bindparams` method is used to provide bound
          parameter detail, and :meth:`.TextClause.columns` method allows
          specification of return columns including names and types::
  
              t = text("SELECT * FROM users WHERE id=:user_id").\
                      bindparams(user_id=7).\
                      columns(id=Integer, name=String)
  
              for id, name in connection.execute(t):
                  print(id, name)
  
          The :func:`.text` construct is used in cases when
          a literal string SQL fragment is specified as part of a larger query,
          such as for the WHERE clause of a SELECT statement::
  
              s = select([users.c.id, users.c.name]).where(text("id=:user_id"))
              result = connection.execute(s, user_id=12)
  
          :func:`.text` is also used for the construction
          of a full, standalone statement using plain text.
          As such, SQLAlchemy refers
          to it as an :class:`.Executable` object, and it supports
          the :meth:`Executable.execution_options` method.  For example,
          a :func:`.text` construct that should be subject to "autocommit"
          can be set explicitly so using the
          :paramref:`.Connection.execution_options.autocommit` option::
  
              t = text("EXEC my_procedural_thing()").\
                      execution_options(autocommit=True)
  
          Note that SQLAlchemy's usual "autocommit" behavior applies to
          :func:`.text` constructs implicitly - that is, statements which begin
          with a phrase such as ``INSERT``, ``UPDATE``, ``DELETE``,
          or a variety of other phrases specific to certain backends, will
          be eligible for autocommit if no transaction is in progress.
  
          :param text:
            the text of the SQL statement to be created.  use ``:<param>``
            to specify bind parameters; they will be compiled to their
            engine-specific format.
  
          :param autocommit: whether or not to set the "autocommit" execution
            option for this :class:`.TextClause` object.
  
          :param bind:
            an optional connection or engine to be used for this text query.
  
          :param bindparams:
            A list of :func:`.bindparam` instances used to
            provide information about parameters embedded in the statement.
  
            E.g.::
  
                stmt = text("SELECT * FROM table WHERE id=:id",
                          bindparams=[bindparam('id', value=5, type_=Integer)])
  
          :param typemap:
            A dictionary mapping the names of columns represented in the columns
            clause of a ``SELECT`` statement to type objects.
  
            E.g.::
  
                stmt = text("SELECT * FROM table",
                              typemap={'id': Integer, 'name': String},
                          )
  
          .. seealso::
  
              :ref:`sqlexpression_text` - in the Core tutorial
  
              :ref:`orm_tutorial_literal_sql` - in the ORM tutorial
  
          """
          stmt = TextClause(text, bind=bind)
          if bindparams:
              stmt = stmt.bindparams(*bindparams)
          if typemap:
              stmt = stmt.columns(**typemap)
          if autocommit is not None:
              stmt = stmt.execution_options(autocommit=autocommit)
  
          return stmt
function_tokens: def _create_text ( self , text , bind = None , bindparams = None , typemap = None , autocommit = None ) : stmt = TextClause ( text , bind = bind ) if bindparams : stmt = stmt . bindparams ( * bindparams ) if typemap : stmt = stmt . columns ( * * typemap ) if autocommit is not None : stmt = stmt . execution_options ( autocommit = autocommit ) return stmt