Yes, 'attaching the table' does not allow references. On second thoughts,
it is somewhat inconvenient to use that feature too.
Let me see if another method will work.
In web2py directory, under site-packages, you can define a module (or a
simple .py file) wherein you can define the required dic
Thanks Sundar, but attaching DBs don't allow me to reference the "attached"
tables right?
On Thursday, May 18, 2017 at 5:27:03 PM UTC+8, Sundar wrote:
>
> See https://www.sqlite.org/lang_attach.html solves your problem.
>
> Cheers.
> ===
>
> On Tues
See https://www.sqlite.org/lang_attach.html solves your problem.
Cheers.
===
On Tuesday, May 16, 2017 at 5:46:25 PM UTC+5:30, lyn2py wrote:
>
> Is there is a way to define a table without adding it to the sqlite
> database? I wish to define a table
On Wednesday, May 17, 2017 at 1:58:04 AM UTC-7, lyn2py wrote:
>
> Please bear with me while I explain my use case:
>
> I have a list of "standard" websites, like all the major search engines.
> Traditionally, I can make do with a python list, like so:
>
> list_of_sites =['google.com','yahoo.com'
Note, you could consider storing this table in its own separate SQLite
database, but then you won't be able to have tables in other databases
reference it and do joins with it (you would have to manage relationships
and joins in your Python app code).
Anthony
On Wednesday, May 17, 2017 at 8:12
>
> In summary, I am using sqlite db. There is a table that I don't wish to
> store in the sqlite db, but yet have that particular table data be served /
> accessed like a normal table (as if from the db). Is that possible, and how
> can I achieve this?
>
I don't think so. If you need to have
Please bear with me while I explain my use case:
I have a list of "standard" websites, like all the major search engines.
Traditionally, I can make do with a python list, like so:
list_of_sites =['google.com','yahoo.com',...]
However, the code base has evolved and it's much better to have othe
You still need somewhere to 'store' it. Rght?
May be you can create another SQLITE DB (say db1) and use it for your
purpose. (Of course, 'join'ing with db1 table data will have to be done
through your program).
On Tuesday, May 16, 2017 at 5:46:
On Tuesday, May 16, 2017 at 12:34:01 PM UTC-4, lyn2py wrote:
>
> Thanks Anthony, I'm sorry my question was ambiguous.
>
> I meant to define a table and to add data to a table that doesn't exist in
> the sqlite table, but yet web2py can get the data (I can "hardcode" the
> data into the controller
On Tuesday, May 16, 2017 at 9:34:01 AM UTC-7, lyn2py wrote:
>
> Thanks Anthony, I'm sorry my question was ambiguous.
>
> I meant to define a table and to add data to a table that doesn't exist in
> the sqlite table, but yet web2py can get the data (I can "hardcode" the
> data into the controlle
Thanks Anthony, I'm sorry my question was ambiguous.
I meant to define a table and to add data to a table that doesn't exist in
the sqlite table, but yet web2py can get the data (I can "hardcode" the
data into the controller or model). How do I achieve that? Or rather can I?
Thank you again!
On Tuesday, May 16, 2017 at 8:16:25 AM UTC-4, lyn2py wrote:
>
> Is there is a way to define a table without adding it to the sqlite
> database? I wish to define a table and have data in that table, but not add
> it to the sqlite db.
>
You can do db.define_table(..., migrate=False). This assumes
12 matches
Mail list logo