Sponsored Content
Full Discussion: Permanent Dynamic “View”
Top Forums UNIX for Dummies Questions & Answers Permanent Dynamic “View” Post 302593270 by devoll on Thursday 26th of January 2012 10:37:59 AM
Old 01-26-2012
Quote:
Originally Posted by Corona688
A named pipe might do:

Code:
mkfifo whole
while true
do
        cat half1 half2 > whole
done

But if that loop ever stops running, the 'file' will block.
Ah, effectively a "replinishing" pipe. That would work. The downside, as you mentioned, is that it must be supported by a running process.

It would be nice to have a native file type (again, like an SQL view) that contains "instructions" to materialize data, but only materializes such data when it is read.
 

10 More Discussions You Might Find Interesting

1. IP Networking

Permanent ip routing

I am trying to add a permanent route on my server, but whenever i reboot it dissapears. Please does anyone know the correct command to use. route add XXX.XXX.XXX.XXX DDD.DDD.DDD.DDD the above is what i have done. ednut:) using IRIX SGI software. (2 Replies)
Discussion started by: Ednut
2 Replies

2. Solaris

permanent route

How do I make a route permanent, other than default route on a Solaris server? (1 Reply)
Discussion started by: jontom
1 Replies

3. UNIX for Dummies Questions & Answers

Permanent Alias

On AIX 5.2 as root, installed Seamonkey and have to type #/seakey/seamonkey/seamonkey to get it to run, which it does okay. To set up a permanent alias, I did the following (1) In a text editor alias seamk='/seakey/seamonkey/seamonkey' and saved it to /home/alias_file (2) In a text editor... (7 Replies)
Discussion started by: farl
7 Replies

4. Solaris

Permanent changes to PATH

Hi guys, I'm running Solars 8 on a V100 server at home for testing. If I switch user to root and do: # echo $PATH This is the output: /usr/sbin:/usr/bin I'm using rsync over ssh and need to add /usr/local/bin and /user/local/sbin. I do this by running the line: #... (3 Replies)
Discussion started by: Stin
3 Replies

5. AIX

How to set permanent variables

I set my TERM variable to work with SMIT and everything works fine but when I logged out and log in again I have to set the variable again. How can I set a permanent variable into the system so it will be as I wish even if a reboot is needed? I set variables this way: export VAR=value (7 Replies)
Discussion started by: agasamapetilon
7 Replies

6. UNIX for Dummies Questions & Answers

Making an alias permanent

Hi mates, I want to make an alias permanent for a KShell, does someone knows how to do that? Thanks! (4 Replies)
Discussion started by: agasamapetilon
4 Replies

7. UNIX for Advanced & Expert Users

Sql dynamic table / dynamic inserts

I have a file that reads File (X.txt) Contents of record 1: rdrDESTINATION_ADDRESS (String) "91 971502573813" rdrDESTINATION_IMSI (String) "000000000000000" rdrORIGINATING_ADDRESS (String) "d0 movies" rdrORIGINATING_IMSI (String) "000000000000000" rdrTRAFFIC_EVENT_TIME... (0 Replies)
Discussion started by: magedfawzy
0 Replies

8. UNIX for Advanced & Expert Users

rm non-permanent delete

I read this article as a way to do a non-permanent of something. I saw 2 problems. The first that my rm is located at /bin/rm. I would assume I would change the location to /bin/rm. The second my rm is a executable file and not a text file. So will replacing my rm file with the shellscript... (3 Replies)
Discussion started by: cokedude
3 Replies

9. UNIX for Dummies Questions & Answers

Inode: is it both unique and 'permanent'?

I try to understand the meaning of an inode. I wonder whether an inode is unique (I'm pretty sure it is) and whether it remains the same inode regardless of whatever happens to the file, dir or whatever? I read somewhere that an inode stores info about the file, size... so changing the... (4 Replies)
Discussion started by: dakke
4 Replies

10. What is on Your Mind?

Moving from Desktop View to Mobile View

See attached video for a demo on how to move back and forth from the desktop view to the mobile view. Currently this only works for the home page, but I will work on some new PHP code in the future to make this work with the page we are currently on. Edit: The issue with making every page ... (2 Replies)
Discussion started by: Neo
2 Replies
DBIx::Class::ResultSource::View(3)			User Contributed Perl Documentation			DBIx::Class::ResultSource::View(3)

NAME
DBIx::Class::ResultSource::View - ResultSource object representing a view SYNOPSIS
package MyApp::Schema::Result::Year2000CDs; use base qw/DBIx::Class::Core/; __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); __PACKAGE__->table('year2000cds'); __PACKAGE__->result_source_instance->is_virtual(1); __PACKAGE__->result_source_instance->view_definition( "SELECT cdid, artist, title FROM cd WHERE year ='2000'" ); __PACKAGE__->add_columns( 'cdid' => { data_type => 'integer', is_auto_increment => 1, }, 'artist' => { data_type => 'integer', }, 'title' => { data_type => 'varchar', size => 100, }, ); DESCRIPTION
View object that inherits from DBIx::Class::ResultSource This class extends ResultSource to add basic view support. A view has a "view_definition", which contains a SQL query. The query can only have parameters if "is_virtual" is set to true. It may contain JOINs, sub selects and any other SQL your database supports. View definition SQL is deployed to your database on "deploy" in DBIx::Class::Schema unless you set "is_virtual" to true. Deploying the view does not translate it between different database syntaxes, so be careful what you write in your view SQL. Virtual views ("is_virtual" true), are assumed to not exist in your database as a real view. The "view_definition" in this case replaces the view name in a FROM clause in a subselect. EXAMPLES
Having created the MyApp::Schema::Year2000CDs schema as shown in the SYNOPSIS above, you can then: $2000_cds = $schema->resultset('Year2000CDs') ->search() ->all(); $count = $schema->resultset('Year2000CDs') ->search() ->count(); If you modified the schema to include a placeholder __PACKAGE__->result_source_instance->view_definition( "SELECT cdid, artist, title FROM cd WHERE year = ?" ); and ensuring you have is_virtual set to true: __PACKAGE__->result_source_instance->is_virtual(1); You could now say: $2001_cds = $schema->resultset('Year2000CDs') ->search({}, { bind => [2001] }) ->all(); $count = $schema->resultset('Year2000CDs') ->search({}, { bind => [2001] }) ->count(); SQL EXAMPLES
is_virtual set to false $schema->resultset('Year2000CDs')->all(); SELECT cdid, artist, title FROM year2000cds me is_virtual set to true $schema->resultset('Year2000CDs')->all(); SELECT cdid, artist, title FROM (SELECT cdid, artist, title FROM cd WHERE year ='2000') me METHODS
is_virtual __PACKAGE__->result_source_instance->is_virtual(1); Set to true for a virtual view, false or unset for a real database-based view. view_definition __PACKAGE__->result_source_instance->view_definition( "SELECT cdid, artist, title FROM cd WHERE year ='2000'" ); An SQL query for your view. Will not be translated across database syntaxes. deploy_depends_on __PACKAGE__->result_source_instance->deploy_depends_on( ["MyApp::Schema::Result::Year","MyApp::Schema::Result::CD"] ); Specify the views (and only the views) that this view depends on. Pass this an array reference of fully qualified result classes. OVERRIDDEN METHODS
from Returns the FROM entry for the table (i.e. the view name) or the SQL as a subselect if this is a virtual view. OTHER METHODS
new The constructor. AUTHORS
See "CONTRIBUTORS" in DBIx::Class. LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.16.2 2012-08-16 DBIx::Class::ResultSource::View(3)
All times are GMT -4. The time now is 06:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy