Python sqlalchemy.dialects.postgresql.TSVECTOR Examples
The following are 12
code examples of sqlalchemy.dialects.postgresql.TSVECTOR().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
sqlalchemy.dialects.postgresql
, or try the search function
.
Example #1
Source File: base.py From jbox with MIT License | 5 votes |
def visit_TSVECTOR(self, type, **kw): return "TSVECTOR"
Example #2
Source File: 00004_09ec7dda0433_remove_old_history_tool.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.add_column('web_pages', sa.Column('previous_release', sa.INTEGER(), autoincrement=False, nullable=True)) op.create_foreign_key('web_pages_previous_release_fkey', 'web_pages', 'web_page_history', ['previous_release'], ['id']) op.create_table('web_page_history', sa.Column('id', sa.INTEGER(), nullable=False), sa.Column('errno', sa.INTEGER(), autoincrement=False, nullable=True), sa.Column('url', sa.TEXT(), autoincrement=False, nullable=False), sa.Column('file', sa.INTEGER(), autoincrement=False, nullable=True), sa.Column('distance', sa.INTEGER(), autoincrement=False, nullable=False), sa.Column('is_text', sa.BOOLEAN(), autoincrement=False, nullable=True), sa.Column('title', citext.CIText(), autoincrement=False, nullable=True), sa.Column('mimetype', sa.TEXT(), autoincrement=False, nullable=True), sa.Column('content', sa.TEXT(), autoincrement=False, nullable=True), sa.Column('fetchtime', postgresql.TIMESTAMP(), autoincrement=False, nullable=True), sa.Column('addtime', postgresql.TIMESTAMP(), autoincrement=False, nullable=True), sa.Column('tsv_content', postgresql.TSVECTOR(), autoincrement=False, nullable=True), sa.Column('root_rel', sa.INTEGER(), autoincrement=False, nullable=False), sa.Column('newer_rel', sa.INTEGER(), autoincrement=False, nullable=True), sa.Column('older_rel', sa.INTEGER(), autoincrement=False, nullable=True), sa.Column('contenthash', sa.TEXT(), autoincrement=False, nullable=True), sa.Column('is_diff', sa.BOOLEAN(), autoincrement=False, nullable=True), sa.ForeignKeyConstraint(['file'], ['web_files.id'], name='web_page_history_file_fkey'), sa.ForeignKeyConstraint(['newer_rel'], ['web_page_history.id'], name='web_page_history_newer_rel_fkey'), sa.ForeignKeyConstraint(['older_rel'], ['web_page_history.id'], name='web_page_history_older_rel_fkey'), sa.ForeignKeyConstraint(['root_rel'], ['web_pages.id'], name='web_page_history_root_rel_fkey'), sa.PrimaryKeyConstraint('id', name='web_page_history_pkey') ) ### end Alembic commands ###
Example #3
Source File: base.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def visit_TSVECTOR(self, type, **kw): return "TSVECTOR"
Example #4
Source File: base.py From planespotter with MIT License | 5 votes |
def visit_TSVECTOR(self, type, **kw): return "TSVECTOR"
Example #5
Source File: base.py From pyRevit with GNU General Public License v3.0 | 5 votes |
def visit_TSVECTOR(self, type, **kw): return "TSVECTOR"
Example #6
Source File: base.py From stdm with GNU General Public License v2.0 | 5 votes |
def visit_TSVECTOR(self, type): return "TSVECTOR"
Example #7
Source File: base.py From sqlalchemy with MIT License | 5 votes |
def visit_TSVECTOR(self, type_, **kw): return "TSVECTOR"
Example #8
Source File: test_types.py From sqlalchemy with MIT License | 5 votes |
def special_types_table(self, metadata): # create these types so that we can issue # special SQL92 INTERVAL syntax class y2m(types.UserDefinedType, postgresql.INTERVAL): def get_col_spec(self): return "INTERVAL YEAR TO MONTH" class d2s(types.UserDefinedType, postgresql.INTERVAL): def get_col_spec(self): return "INTERVAL DAY TO SECOND" table = Table( "sometable", metadata, Column("id", postgresql.UUID, primary_key=True), Column("flag", postgresql.BIT), Column("bitstring", postgresql.BIT(4)), Column("addr", postgresql.INET), Column("addr2", postgresql.MACADDR), Column("price", postgresql.MONEY), Column("addr3", postgresql.CIDR), Column("doubleprec", postgresql.DOUBLE_PRECISION), Column("plain_interval", postgresql.INTERVAL), Column("year_interval", y2m()), Column("month_interval", d2s()), Column("precision_interval", postgresql.INTERVAL(precision=3)), Column("tsvector_document", postgresql.TSVECTOR), ) return table
Example #9
Source File: test_types.py From sqlalchemy with MIT License | 5 votes |
def test_tsvector_round_trip(self, connection): t = Table("t1", self.metadata, Column("data", postgresql.TSVECTOR)) t.create() connection.execute(t.insert(), data="a fat cat sat") eq_(connection.scalar(select([t.c.data])), "'a' 'cat' 'fat' 'sat'") connection.execute(t.update(), data="'a' 'cat' 'fat' 'mat' 'sat'") eq_( connection.scalar(select([t.c.data])), "'a' 'cat' 'fat' 'mat' 'sat'", )
Example #10
Source File: base.py From jarvis with GNU General Public License v2.0 | 5 votes |
def visit_TSVECTOR(self, type, **kw): return "TSVECTOR"
Example #11
Source File: base.py From moviegrabber with GNU General Public License v3.0 | 5 votes |
def visit_TSVECTOR(self, type): return "TSVECTOR"
Example #12
Source File: base.py From android_universal with MIT License | 5 votes |
def visit_TSVECTOR(self, type, **kw): return "TSVECTOR"