Postmodern
Version 1.33.7
Postmodern is a Common Lisp library for interacting with PostgreSQL databases. Features are:
- Efficient communication with the database server without need for foreign libraries.
- Support for UTF-8 on Unicode-aware Lisp implementations
- A syntax for mixing SQL and Lisp code
- Convenient support for prepared statements and stored procedures
- A metaclass for simple database-access objects
The biggest differences between this library and clsql or cl-dbi are that Postmodern has no intention of being portable across different SQL implementations (it embraces non-standard PostgreSQL features), and approaches extensions like lispy SQL and database access objects in a quite different way. This library was written because the CLSQL approach did not really work for me. Your mileage may vary.
Dependencies
The library depends on usocket (except on SBCL and ACL, where the built-in socket library is used), md5, closer-mop, bordeaux-threads if you want thread-safe connection pools, and CL+SSL when SSL connections are needed.
As of version 1.3 it also depends on ironclad, base64 and uax-15 because of the need to support scram-sha-256 authentication.
Postmodern itself is split into four different packages, some of which can be used independently:
- Simple-date is a very basic implementation of date and time objects, used to support storing and retrieving time-related
SQL types. It is not loaded by default and you can use local-time instead.
- CL-postgres is the low-level library used for interfacing with a PostgreSQL server over a socket.
- S-SQL is used to compile s-expressions to strings of SQL code, escaping any Lisp values inside, and doing as much as
possible of the work at compile time. Finally,
- Postmodern itself is a wrapper around these packages and provides higher level functions, a very simple data access object that can be mapped directly to database tables and some convient utilities. It then tries to put all these things together into a convenient programming interface.itself is the library that tries to put all these things together into a convenient programming interface.
License
Postmodern is released under a zlib-style license. Which approximately means you can use the code in whatever way you like, except for passing it off as your own or releasing a modified version without indication that it is not the original.
The functions execute-file.lisp were ported from pgloader with grateful thanks to Dimitri Fontaine and are released under a BSD-3 license.
Download and installation
We suggest using quicklisp.org for installation.
A git repository with the most recent changes can be viewed or checked out at:
> git clone https://github.com/marijnh/Postmodern
Quickstart
This quickstart is intended to give you a feel of the way coding with Postmodern works. Further details about the workings of the library can be found in the reference manuals linked below.
Assuming you have already installed quicklisp, load postmodern.
(ql:quickload :postmodern) (use-package :postmodern)
If you have a PostgreSQL server running on localhost, with a database called 'testdb' on it, which is accessible for user 'foucault' with password 'surveiller', there are two basic ways to connect to a database. If your role/application/database(s) looks like a 1:1 relationship and you are not using threads, you can connect like this:
(connect-toplevel "testdb" "foucault" "surveiller" "localhost")
This will establish a connection to be used by all code, except for that wrapped in a with-connection form, which takes the same arguments but only establishes the connection within that lexical scope.
Connect-toplevel will maintain a single connection for the life of the session.
If the server is not on localhost, replace that string with a string containing the ip address of the server:
(connect-toplevel "testdb" "foucault" "surveiller" "<IP_ADDRESS>")
If the Postgresql server is running on a port other than 5432, you would also pass the appropriate keyword port parameter. E.g.:
(connect-toplevel "testdb" "foucault" "surveiller" "localhost" :port 5434)
Ssl connections would similarly use the keyword parameter :use-ssl and pass :no, :try, :require, :yes, or :full
- :try means if the server supports it
- :require means use provided ssl certificate with no verification
- :yes means verify that the server cert is issued by a trusted CA, but does not verify the server hostname
- :full means expect a CA-signed cert for the supplied hostname and verify the server hostname
When using ssl, you can set the cl-postgres exported variables *ssl-certificate-file*
, *ssl-key-file*
and *ssl-root-ca-file*
to provide client key, certificate files
and root ca files. They can be either NIL, for no file, or a pathname.
If you have multiple roles connecting to one or more databases, i.e. 1:many or
many:1, (in other words, changing connections) or you are using threads (each thread must have its own connection) then with Postmodern you can use the with-connection
form which establishes a connection with a lexical scope is more appropriate.
(with-connection '("testdb" "foucault" "surveiller" "localhost") ...)
For other connection options, please see https://marijnhaverbeke.nl/postmodern.html#function-connection
If you are creating a database, you need to have established a connection to a currently existing database (typically "postgres"). Assuming the foucault role is a superuser and you want to stay in a development connection with your new database afterwards, you would first use with-connection to connect to postgres, create the database and then switch to connect-toplevel for development ease.
(with-connection '("postgres" "foucault" "surveiller" "localhost") (create-database 'testdb :limit-public-access t :comment "This database is for testing silly theories")) (connect-toplevel "testdb" "foucault" "surveiller" "localhost")
Note: (create-database) functionality is new to postmodern v. 1.32. Setting the :limit-public-access parameter to t will block connections to that database from anyone who you have not explicitly given permission (except other superusers).
A word about Postgresql connections. Postgresql connections are not lightweight threads. They actually consume about 10 MB of memory per connection. In addition, any connections which require security (ssl or scram authentication) will take additiona time and create more overhead.
Postgresql can be tuned to limit the number of connections allowed at any one time. It defaults to 100. The parameter is set in the postgresql.conf file. Depending on the size of your server and what you are doing, the sweet spot generally seems to be between 200-400 connections before you need to bring in connection pooling.
If your application is threaded, each thread should use its own connection. Connections are stateful and attempts to use the same connection for multiple threads will likely have problems.
If you have an application like a web app which will make many connections, you also generally do not want to create and drop connections for every query. The usual solution is to use connection pools so that the application is grabbing an already existing connection and returning it to the pool when finished, saving connection time and memory.
To use postmodern's simple connection pooler, the with-connection
call would look like:
(with-connection '("testdb" "foucault" "surveiller" "localhost" :pooled-p t) ...)
The maximum number of connections in the pool is set in the special variable
*max-pool-size*
, which defaults to nil (no maximum).
(with-connection '("testdb" "foucault" "surveiller" "localhost") (query "select 22, 'Folie et déraison', 4.5")) ;; => ((22 "Folie et déraison" 9/2))
Qquery is the basic way to send queries to the database. Please see the documentation for query for details on return types, parameterized queries, etc.
The same query can be expressed in s-sql like this:
(query (:select 22 "Folie et déraison" 4.5)) ;; => ((22 "Folie et déraison" 9/2))
In many contexts, query strings and lists starting with keywords can be used interchangeably. The lists will be compiled to SQL. The S-SQL manual describes the syntax used by these expressions and provides many examples. Lisp values occurring in them are automatically escaped. In the above query, only constant values are used, but it is possible to transparently use run-time values as well:
(defun database-powered-addition (a b) (query (:select (:+ a b)) :single)) (database-powered-addition 1030 204) ;; => 1234
That last argument, :single, indicates that we want the result not as a list of lists (for the result rows), but as a single value, since we know that we are only selecting one value. Some other options are :rows, :row, :column, :alists, :plists, :array-hash, :json-strs, :json-str, :json-array-str, :dao and :none. Their precise effect is documented in the Postmodern reference manual under Queries
You do not have to pull in the whole result of a query at once, you can also iterate over it with the doquery macro:
(doquery (:select 'x 'y :from 'some-imaginary-table) (x y) (format t "On this row, x = ~A and y = ~A.~%" x y))
You can work directly with the database or you can use a simple database-access-class (aka dao) which would cover all the fields in a row. This is what a database-access class looks like:
(defclass country () ((name :col-type string :initarg :name :reader country-name) (inhabitants :col-type integer :initarg :inhabitants :accessor country-inhabitants) (sovereign :col-type (or db-null string) :initarg :sovereign :accessor country-sovereign)) (:metaclass dao-class) (:keys name))
The above defines a class that can be used to handle records in a table named 'country' with three columns: name, inhabitants, and sovereign. The :keys parameter specifies which column(s) are used for the primary key. Once you have created the class, you can return an instance of the country class by calling
(get-dao 'country "Croatia")
You can also define classes that use multiple columns in the primary key:
(defclass points () ((x :col-type integer :initarg :x :reader point-x) (y :col-type integer :initarg :y :reader point-y) (value :col-type integer :initarg :value :accessor value)) (:metaclass dao-class) (:keys x y))
In this case, retrieving a points record would look like the following where 12 and 34 would be the values you are looking to find in the x column and y column respectively.:
(get-dao 'points 12 34)
Consider a slightly more complicated version of country:
(defclass country-c () ((id :col-type integer :col-identity t :accessor id) (name :col-type string :col-unique t :check (:<> 'name "") :initarg :name :reader country-name) (inhabitants :col-type integer :initarg :inhabitants :accessor country-inhabitants) (sovereign :col-type (or db-null string) :initarg :sovereign :accessor country-sovereign) (region-id :col-type integer :col-references ((regions id)) :initarg :region-id :accessor region-id)) (:metaclass dao-class) (:table-name countries))
In this example we have an id column which is specified to be an identity column. Postgresql will automatically generate a sequence of of integers and this will be the primary key.
We have a name column which is specified as unique and is not null and the check will ensure that the database refuses to accept an empty string as the name.
We have a region-id column which references the id column in the regions table. This is a foreign key constraint and Postgresql will not accept inserting a country into the database unless there is an existing region with an id that matches this number. Postgresql will also not allow deleting a region if there are countries that reference that region's id. If we wanted Postgresql to delete countries when regions are deleted, that column would be specified as:
(region-id :col-type integer :col-references ((regions id) :cascade) :initarg :region-id :accessor region-id)
Now you can see why the double parens.
We also specify that the table name is not "country" but "countries". (Some style guides recommend that table names be plural and references to rows be singular.)
Table Creation
With SQL or S-SQL
You can create tables directly without the need to define a class, and in more complicated cases, you may need to use the s-sql :create-table operator or plain vanilla sql. Staying with examples that will match our slightly more complicated dao-class above (but ignoring the fact that the references parameter would actually require us to create the regions table first) and using s-sql rather than plain vanilla sql would be the following:
(query (:create-table 'countries ((id :type integer :primary-key t :identity-always t) (name :type string :unique t :check (:<> 'name "")) (inhabitants :type integer) (sovereign :type (or db-null string)) (region-id :type integer :references ((regions id))))))
Restated using vanilla sql:
(query "CREATE TABLE countries ( id INTEGER NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY, name TEXT NOT NULL UNIQUE CHECK (NAME <> E''), inhabitants INTEGER NOT NULL, sovereign TEXT, region_id INTEGER NOT NULL REFERENCES regions(id) MATCH SIMPLE ON DELETE RESTRICT ON UPDATE RESTRICT)")
Let's look at a slightly different example:
(query (:create-table so-items ((item-id :type integer) (so-id :type (or integer db-null) :references ((so-headers id))) (product-id :type (or integer db-null)) (qty :type (or integer db-null)) (net-price :type (or numeric db-null))) (:primary-key item-id so-id)))
Restated using plain sql:
(query "CREATE TABLE so_items ( item_id INTEGER NOT NULL, so_id INTEGER REFERENCES so_headers(id) MATCH SIMPLE ON DELETE RESTRICT ON UPDATE RESTRICT, product_id INTEGER, qty INTEGER, net_price NUMERIC, PRIMARY KEY (item_id, so_id) );")
In the above case, the new table's name will be so_items because sql does not allow hyphens and plain vanilla sql will require that. Postmodern will generally allow you to use the quoted symbol 'so-items. This is also true for all the column names. The column item-id is an integer and cannot be null. The column so-id is also an integer, but is allowed to be null and is a foreign key to the id field in the so-headers table so-headers. The primary key is actually a composite of item-id and so-id. (If we wanted the primary key to be just item-id, we could have specified that in the form defining item-id.)
For more detail and examples on building tables using the s-sql approach, see create-tables.html
With a Previously Created DAO
You can also use a previously defined dao to create a table as well. The dao-table-definition function examines a dao class and generates the plain vanilla sql for creating a table. That can be passed on to the execute function to create a table. For example the simple country dao would generate:
(dao-table-definition 'country) "CREATE TABLE country (name TEXT NOT NULL, inhabitants INTEGER NOT NULL, sovereign TEXT DEFAULT NULL, PRIMARY KEY (name))" (execute (dao-table-definition 'country))
(Execute works like query, but does not expect any results back.)
The slightly more complicated country-c version would generate:
(dao-table-definition 'country-c) ;; => "CREATE TABLE countries ( ;; id INTEGER NOT NULL PRIMARY KEY generated always as identity, ;; name TEXT NOT NULL UNIQUE, ;; inhabitants INTEGER NOT NULL, ;; sovereign TEXT DEFAULT NULL, ;; region_id INTEGER NOT NULL REFERENCES regions(id) ;; MATCH SIMPLE ON DELETE RESTRICT ON UPDATE RESTRICT) (execute (dao-table-definition 'country-c))
For the rest of the discussion on this page, we will use the simpler version and save the more complicated version for the postmodern manuals.
Inserting Data
Similarly to table creation, you can insert data using the s-sql wrapper, plain vanilla sql or daos.
The s-sql approach would be:
(query (:insert-into 'country :set 'name "The Netherlands" 'inhabitants 16800000 'sovereign "Willem-Alexander")) (query (:insert-into 'country :set 'name "Croatia" 'inhabitants 4400000))
You could also insert multiple rows at a time but that requires the same columns for each row:
(query (:insert-rows-into 'country :columns 'name 'inhabitants 'sovereign :values '(("The Netherlands" 16800000 "Willem-Alexander") ("Croatia" 4400000 :null))))
The sql approach would be:
(query "insert into country (name, inhabitants, sovereign) values ('The Netherlands', 16800000, 'Willem-Alexander')") (query "insert into country (name, inhabitants) values ('Croatia', 4400000)")
The multiple row sql approach would be:
(query "insert into country (name, inhabitants, sovereign) values ('The Netherlands', 16800000, 'Willem-Alexander'), ('Croatia', 4400000, NULL)")
Using dao classes would look like: Let us go back to our approach using a dao class and add a few countries:
(insert-dao (make-instance 'country :name "The Netherlands" :inhabitants 16800000 :sovereign "Willem-Alexander")) (insert-dao (make-instance 'country :name "Croatia" :inhabitants 4400000))
Postmodern does not yet have an insert-daos (plural) function.
Staying with the dao class approach, to update Croatia's population, we could do this:
(let ((croatia (get-dao 'country "Croatia"))) (setf (country-inhabitants croatia) 4500000) (update-dao croatia)) (query (:select '* :from 'country)) ;; => (("The Netherlands" 16800000 "Willem-Alexander") ;; ("Croatia" 4500000 :NULL))
Please see the documentation for s-sql for more examples of using s-sql rather than daos.
Next, to demonstrate a bit more of the S-SQL syntax, here is the query the utility function list-tables uses to get a list of the tables in a database:
(sql (:select 'relname :from 'pg-catalog.pg-class :inner-join 'pg-catalog.pg-namespace :on (:= 'relnamespace 'pg-namespace.oid) :where (:and (:= 'relkind "r") (:not-in 'nspname (:set "pg_catalog" "pg_toast")) (:pg-catalog.pg-table-is-visible 'pg-class.oid)))) ;; => "(SELECT relname FROM pg_catalog.pg_class ;; INNER JOIN pg_catalog.pg_namespace ON (relnamespace = pg_namespace.oid) ;; WHERE ((relkind = 'r') and (nspname NOT IN ('pg_catalog', 'pg_toast')) ;; and pg_catalog.pg_table_is_visible(pg_class.oid)))"
sql is a macro that will simply compile a query, it can be useful for seeing how your queries are expanded or if you want to do something unexpected with them.
As you can see, lists starting with keywords are used to express SQL commands and operators (lists starting with something else will be evaluated and then inserted into the query). Quoted symbols name columns or tables (keywords can also be used but might introduce ambiguities). The syntax supports subqueries, multiple joins, stored procedures, etc. See the S-SQL reference manual for a complete treatment.
Finally, here is an example of the use of prepared statements:
(defprepared sovereign-of (:select 'sovereign :from 'country :where (:= 'name '$1)) :single!) (sovereign-of "The Netherlands") ;; => "Willem-Alexander"
The defprepared macro creates a function that takes the same amount of arguments as there are $X placeholders in the given query. The query will only be parsed and planned once (per database connection), which can be faster, especially for complex queries.
(disconnect-toplevel)
Authentication
Postmodern can use either md5 or scram-sha-256 authentication. Scram-sha-256 authentication is obviously more secure, but slower than md5, so take that into account if you are planning on opening and closing many connections without using a connection pooling setup..
Other authentication methods have not been tested. Please let us know if there is a authentication method that you believe should be considered.
Reference
The reference manuals for the different components of Postmodern are kept in separate files. For using the library in the most straightforward way, you only really need to read the Postmodern reference and glance over the S-SQL reference. The simple-date reference explains the time-related data types included in Postmodern, and the CL-postgres reference might be useful if you just want a low-level library for talking to a PostgreSQL server.
Some specific topics in more detail
Data Types
Data Types
For a short comparison of lisp and Postgresql data types (date and time datatypes are described in the next section)
| SQL type | Description |
|---|---|
| smallint | -32,768 to +32,768 2-byte storage |
| integer | -2147483648 to +2147483647 integer, 4-byte storage |
| bigint | -9223372036854775808 to<PHONE_NUMBER>854775807 8-byte storage |
| numeric(X, Y) | User specified, see notes below |
| real | float, 6 decimal digit precision 4-byte storage |
| double-precision | floating, 15 decimal digit precision 8-byte storage |
| text | variable length string, no limit specified |
| char(X) | char(length), blank-padded string, fixed storage length |
| varchar(X) | varchar(length), non-blank-padded string, variable storage length |
| boolean | boolean, 'true'/'false', 1 byte |
| bytea | binary string allowing non-printable octets |
| date | date range: 4713 BC to 5874897 AD |
| interval | See interval |
| array | See discussion at array-notes.html |
Numeric and decimal are variable storage size numbers with user specified precision. Up to 131072 digits before the decimal point; up to 16383 digits after the decimal point. The syntax is numeric(precision, scale). Numeric columns with a specified scale will coerce input values to that scale. For more detail, see https://www.postgresql.org/docs/current/datatype-numeric.html
| PG Type | Sample Postmodern Return Value | Lisp Type (per sbcl) |
|---|---|---|
| boolean | T | BOOLEAN |
| boolean | NIL (Note: within Postgresql this will show 'f') | BOOLEAN |
| int2 | 273 | (INTEGER 0<PHONE_NUMBER>427387903) |
| int4 | 2 | (INTEGER 0<PHONE_NUMBER>427387903) |
| char | A | (VECTOR CHARACTER 64) |
| varchar | id&wl;19 | (VECTOR CHARACTER 64) |
| numeric | 78239/100 | RATIO |
| json | { "customer": "John Doe", "items": {"product": "Beer","qty": 6}} | (VECTOR CHARACTER 64) |
| jsonb | {"title": "Sleeping Beauties", "genres": ["Fiction", "Thriller", "Horror"]} | (VECTOR CHARACTER 128) |
| float | 782.31 | SINGLE-FLOAT |
| point | (0.0d0 0.0d0) | CONS |
| lseg | ((-1.0d0 0.0d0) (2.0d0 4.0d0)) | CONS |
| path | ((1,0),(2,4)) | (VECTOR CHARACTER 64) |
| box | ((1.0d0 1.0d0) (0.0d0 0.0d0)) | CONS |
| polygon | ((21,0),(2,4)) | (VECTOR CHARACTER 64) |
| line | {2,-1,0} | (VECTOR CHARACTER 64) |
| double_precision | 2.38921379231d8 | DOUBLE-FLOAT |
| double_float | 2.3892137923231d8 | DOUBLE-FLOAT |
| circle | <(0,0),2> | (VECTOR CHARACTER 64) |
| cidr | <IP_ADDRESS>/24 | (VECTOR CHARACTER 64) |
| inet | <IP_ADDRESS>/24 | (VECTOR CHARACTER 64) |
| interval | #<INTERVAL P1Y3H20m> | INTERVAL |
| bit | #*1 | (SIMPLE-BIT-VECTOR 1) |
| int4range | [11,24) | (VECTOR CHARACTER 64) |
| uuid | 40e6215d-b5c6-4896-987c-f30f3678f608 | (VECTOR CHARACTER 64) |
| text_array | #(text one text two text three) | (SIMPLE-VECTOR 3) |
| integer_array | #(3 5 7 8) | (SIMPLE-VECTOR 4) |
| bytea | #(222 173 190 239) | (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (4)) |
| text | Lorem ipsum dolor sit amet, consectetur adipiscing elit | (VECTOR CHARACTER 64) |
| enum_mood | happy *Note: enum_mood was defined as 'sad','ok' or 'happy' | (VECTOR CHARACTER 64) |
Passing Parameters as Text or Binary
To avoid sql injection attacks you should be using parameterized queries. They also help avoid the hassle of worrying about double quotes and single quotes. They are also a required part of prepared queries. The following shows an example of parameterized query in regular sql and s-sql.
(query "select name, address from customers where id = $1" 237) (query (:select 'name 'address :from 'customers :where (:= 'id '$1)) 237)
Postmodern defaults to passing query parameters as text. In an example like the above, Postgresql would look at the customer table, see that "id" must be an integer or big integer and proceed accordingly. If Postgresql does not have a table column which would allow it to determine the appropriate data type and you do not specify the date type in the query, Postgresql treats the parameter as text. The following example in plain sql demonstrates:
(query "select $1" 1 :single) "1" (query "select $1" 1.5 :single) "1.5" (query "select $1" T :single) "true" (query "select $1" nil :single) "false" (query "select $1" :NULL :single) :NULL
You can specify the type and Postgresql will attempt to follow that:
(query "select $1::integer" 1 :single) 1
As of version 1.33, Postmodern provides an optional setting in the database connection object which will cause Postmodern to pass parameters to Postgresql in binary format if that format is available for that datatype. Currently this means int2, int4, int8, float, double-float (except clisp) and boolean. Rational numbers continue to be passed as text.
The default for cl-postgres/Postmodern is to continue to pass parameters to Postgresql as text (not in binary format) in order to avoid breaking existing user code. If you want to pass parameters to Postgresql in binary format, you can either provide the keyword parameter :use-binary in creating a connection like so:
(connect "test-db" "test-user" "test-password" "<IP_ADDRESS>" :port 5434 :pooled-p t :use-ssl try :application-name "test-app" :use-binary t)
or use the postmodern with-connection
macro:
(with-connection '("database-name" "user-name" "user-password" "localhost or IP address" :use-binary t [any other keyword parameters you want to apply]) ...)
You can also change the flag after the connection is established with the use-binary-parameters
function, passing T to use binary parameters or nil to use text parameters:
(use-binary-parameters *database* t) (use-binary-parameters some-database-connection t)
Using binary parameters the results has the following results:
(query "select $1" 1 :single) 1 (query "select $1" 1.5 :single) 1.5 (query "select $1" T :single) T (query "select $1" nil :single) NIL (query "select $1" :NULL :single) :NULL
Using binary parameters does tighten type checking when using prepared queries. You will not be able to use prepared queries with varying formats. In other words, if you have a prepared query that you pass an integer as the first parameter and a string as the second parameter the first time it is used, any subsequent uses of that prepared query during that session will also have to pass an integer as the first parameter and a string as the second parameter.
Benchmarking does indicate a slight speed and consing benefit to passing parameters as binary, but your mileage will vary depending on your use case.
Caveats and to-dos
Timezones and Simple-Date and Local-Time
It is important to understand how postgresql (not postmodern) handles timestamps and timestamps with time zones. Postgresql keeps everything in UTC, it does not store a timezone even in a timezone aware column. If you use a timestamp with timezone column, postgresql will calculate the UTC time and will normalize the timestamp data to UTC. When you later select the record, postgresql will look at the timezone for the postgresql session, retrieve the data and then provide the data recalculated from UTC to the timezone for that postgresql session. There is a good writeup of timezones at http://blog.untrod.com/2016/08/actually-understanding-timezones-in-postgresql.html and http://phili.pe/posts/timestamps-and-time-zones-in-postgresql/.
Without simple-date or local-time properly loaded and without use of the Postgresql to_char function, sample date and time data from postgresql will look like:
| PG Type | Sample Return Value | Lisp Type |
|---|---|---|
| date |<PHONE_NUMBER> | (INTEGER 0<PHONE_NUMBER>427387903) |
| time_wo_tz | ((HOURS 9) (MINUTES 47) (SECONDS 9) (MICROSECONDS 926531)) | CONS |
| time_w_tz | 09:47:16.510459-04 | (VECTOR CHARACTER 64) |
| timestamp_wo_tz |<PHONE_NUMBER> | (INTEGER 0<PHONE_NUMBER>427387903) |
| timestamp_w_tz |<PHONE_NUMBER> | (INTEGER 0<PHONE_NUMBER>427387903) |
YOU DO NOT NEED TO ADD ANY OTHER LIBRARIES IF ALL YOU WANT TO DO IS GET ISO 8601 or RFC 3339 PROPERLY FORMATTED TIME AND DATE STRINGS WITH THE TO_CHAR POSTGRESQL FUNCTION.
Assume a data table with columns "col_timestamp_without_time_zone", "col_timestamp_with_time_zone", "col_timestamptz", "col_timestamp", "col_time" and "col_date".
First, just basic sql. In this example we ask for the timestamp_with_time_zone field three times to show differences in the result dealing with time zones. First we do not add a timezone parameter to the pattern, the second time we ask for the time zone using TZ, the third time we ask for the offset from UTC and get back -04. We would get the same result using those additional parameters with the col_timestamptz field.
(query "(SELECT to_char(col_timestamp_with_time_zone, E'YYYY-MM-DD HH24:MI:SS'), to_char(col_timestamp_with_time_zone, E'YYYY-MM-DD HH24:MI:SS TZ'), to_char(col_timestamp_with_time_zone, E'YYYY-MM-DD HH24:MI:SS OF'), to_char(col_timestamptz, E'YYYY-MM-DD HH24:MI:SS'), to_char(col_timestamp, E'YYYY-MM-DD HH24:MI:SS'), to_char(col_time, E'HH24:MI:SS'), to_char(col_date, E'YYYY-MM-DD') FROM short_data_type_tests WHERE (id = 1))") (("2020-10-30 19:30:54" "2020-10-30 19:30:54 EDT" "2020-10-30 19:30:54 -04" "2020-10-30 19:30:54" "2020-10-30 19:30:54" "19:30:54" "2020-10-30"))
Now the s-sql version:
(query (:select (:to-char 'col_timestamp_with_time_zone "YYYY-MM-DD HH24:MI:SS TZ") (:to-char 'col_timestamp_with_time_zone "YYYY-MM-DD HH24:MI:SS OF") (:to-char 'col_timestamptz "YYYY-MM-DD HH24:MI:SS") (:to-char 'col_timestamp "YYYY-MM-DD HH24:MI:SS") (:to-char 'col_time "HH24:MI:SS") (:to-char 'col_date "YYYY-MM-DD") :from 'short-data-type-tests :where (:= 'id 1))) (("2020-10-30 19:30:54 EDT" "2020-10-30 19:30:54 -04" "2020-10-30 19:30:54" "2020-10-30 19:30:54" "19:30:54" "2020-10-30"))
Simple-Date Library Use
The Simple-date add-on library (not enabled by default) provides types (CLOS classes) for dates, timestamps, and intervals similar to the ones SQL databases use, in order to be able to store and read these to and from a database in a straighforward way. A few obvious operations are defined on these types.
To use simple-date with cl-postgres or postmodern, load simple-date-cl-postgres-glue and register suitable SQL readers and writers for the associated database types.
(ql:quickload :simple-date/postgres-glue)
(setf cl-postgres:*sql-readtable*
(cl-postgres:copy-sql-readtable
simple-date-cl-postgres-glue:*simple-date-sql-readtable*))
With simple date loaded, the same data will look like this:
| PG Type | Sample Return Value | Lisp Type |
|---|---|---|
| date | #<DATE 16-05-2020> | DATE |
| time_without_timezone | #<TIME-OF-DAY 09:47:09.926531> | TIME-OF-DAY |
| time_with_timezone | 09:47:16.510459-04 | (VECTOR CHARACTER 64) |
| timestamp_without_timezone | #<TIMESTAMP 16-05-2020T09:47:33,315> | TIMESTAMP |
| timestamp_with_timezone | #<TIMESTAMP 16-05-2020T13:47:27,855> | TIMESTAMP |
You can export these as json-strings with the encode-json-to-string function. E.g.
(encode-json-to-string (query (:select 'timestamp-without-time-zone :from 'test-data :where (:= 'id 1)) :single)) "\"2020-12-30 13:30:54:0\""
Or more simply with passing one of the json result type parameters to the query function. E.g.
(query (:select 'timestamp-with-time-zone :from 'test-data :where (:< 'id 3)) :json-strs) '("{\"timestampWithTimeZone\":\"2019-12-30 18:30:54:0\"}" "{\"timestampWithTimeZone\":\"1919-12-30 18:30:54:0\"}")
To get back to the default cl-postgres reader:
(setf cl-postgres:*sql-readtable* (cl-postgres:copy-sql-readtable cl-postgres::*default-sql-readtable*))
However Simple-date has no concept of time zones. Many users use another library, local-time, which solves the same problem as simple-date, but does understand time zones. One thing to remember is that PostgreSQL doesn't store timezone information when using `timestamp with time zone`. Time zone information only used to convert it to proper UTC timestamp.
Local-Time Library Use
For those who want to use local-time, to enable the local-time reader:
(ql:quickload :cl-postgres+local-time)
(local-time:set-local-time-cl-postgres-readers)
With that set postgresql time datatype returns look like: With local-time loaded and local-time:set-local-time-cl-postgres-readers run, the same sample data looks like:
| PG Type | Sample Return Value | Lisp Type |
|---|---|---|
| date | 2020-05-15T20:00:00.000000-04:00 | TIMESTAMP |
| time_without_timezone | 2000-03-01T04:47:09.926531-05:00 | TIMESTAMP |
| time_with_timezone | 09:47:16.510459-04 | (VECTOR CHARACTER 64) |
| timestamp_without_timezone | 2020-05-16T05:47:33.315622-04:00 | TIMESTAMP |
| timestamp_with_timezone | 2020-05-16T09:47:27.855146-04:00 | TIMESTAMP |
Similarly to simple-date timestamps, these can be exported as json-strings with the encode-json-to-string function. E.g.
(encode-json-to-string (query (:select 'timestamp-with-time-zone :from 'test-data :where (:= 'id 1)) :single)) "\"{2020-12-30T08:30:54.000000-05:00}\""
Or more simply with passing one of the json result type parameters to the query function. E.g.
(query (:select 'timestamp-with-time-zone :from 'test-data :where (:< 'id 3)) :json-strs) '("{\"timestampWithTimeZone\":\"{2019-12-30T13:30:54.000000-05:00}\"}" "{\"timestampWithTimeZone\":\"{1919-12-30T13:30:54.000000-05:00}\"}")
Portability
The Lisp code in Postmodern is theoretically portable across implementations, and seems to work on all major ones as well as some minor ones such as Genera. It is regularly tested on ccl, sbcl, ecl, abcl and cmucl.
ABCL version 1.8.0 broke the dao class inheritance. See https://abcl.org/trac/ticket/479. Everything other than dao-classes works.
Clisp currently has issues with executing a file of sql statements (Postmodern's execute-file function).
Implementations that do not have meta-object protocol support will not have DAOs, but all other parts of the library should work (all widely used implementations do support this).
The library is not likely to work for PostgreSQL versions older than 8.4. Other features only work in newer Postgresql versions as the features were only introduced in those newer versions.
Reserved Words
It is highly suggested that you do not use words that are reserved by Postgresql and the sql standard as identifiers (e.g. table names, columns). The reserved words are:
"all" "analyse" "analyze" "and" "any" "array" "as" "asc" "asymmetric" "authorization" "between" "binary" "both" "case" "cast" "check" "collate" "column" "concurrently" "constraint" "create" "cross" "current-catalog" "current-date" "current-role" "current-schema" "current-time" "current-timestamp" "current-user" "default" "deferrable" "desc" "distinct" "do" "else" "end" "except" "false" "fetch" "filter" "for" "foreign" "freeze" "from" "full" "grant" "group" "having" "ilike" "in" "initially" "inner" "intersect" "into" "is" "isnull" "join" "lateral" "leading" "left" "like" "limit" "localtime" "localtimestamp" "natural" "new" "not" "notnull" "nowait" "null" "off" "offset" "old" "on" "only" "or" "order" "outer" "overlaps" "placing" "primary" "references" "returning" "right" "select" "session-user" "share" "similar" "some" "symmetric" "table" "then" "to" "trailing" "true" "union" "unique" "user" "using" "variadic" "verbose" "when" "where" "window" "with"
Things that should be implemented
Postmodern is under active development so Issues and feature requests should be flagged on Postmodern's site on github.
Some areas that are currently under consideration can be found in the ROADMAP.md file.
Resources
Running tests
Postmodern uses FiveAM for testing. The different component systems of Postmodern have tests defined in corresponding test systems, each defining a test suite. The test systems and corresponding top-level test suites are:
- `:postmodern` in `postmodern/tests`,
- `:cl-postgres` in `cl-postgres/tests`,
- `:s-sql` in `s-sql/tests`, and
- `:simple-date` in `simple-date/tests`.
Before running the tests make sure PostgreSQL is running and a test database is created. By default tests use the following connection parameters to run the tests:
- Database name: test
- User: test
- Password: <empty>
- Hostname: localhost
- Port: 5432
- Use-SSL :NO
If connection with these parameters fails then you will be asked to provide the connection parameters interactively. The parameters will be stored in `cl-postgres-tests:*test-connection*` variable and automatically used on successive test runs. This variable can also be set manually before running the tests.
To test a particular component one would first load the corresponding test system, and then run the test suite. For example, to test the `postmodern` system in the REPL one would do the following:
(ql:quickload "postmodern/tests") (5am:run! :postmodern) ;; ... test output ...
It is also possible to test multiple components at once by first loading test systems and then running all tests:
(ql:quickload '("cl-postgres/tests" "s-sql/tests")) (5am:run-all-tests) ;; ... test output ...
To run the tests from command-line specify the same forms using your implementation's command-line syntax. For instance, to test all Postmodern components on SBCL, use the following command:
env DB_USER=$USER sbcl –noinform \ –eval '(ql:quickload "postmodern/tests")' \ –eval '(ql:quickload "cl-postgres/tests")' \ –eval '(ql:quickload "s-sql/tests")' \ –eval '(ql:quickload "simple-date/tests")' \ –eval '(progn (setq 5am:*print-names* nil) (5am:run-all-tests))' \ –eval '(sb-ext:exit)'
As you can see from above, database connection parameters can be provided using environment variables:
- `DB_NAME`: database name,
- `DB_USER`: user,
- `DB_PASS`: password,
- `DB_HOST`: hostname.


Promatrix Corp is one among the fastest growing IT companies around the globe, delivering solutions in the field of Information Technology. We deliver unmatched Consulting and Outsourcing solutions for various domains in Information Technology to our client, located at different geographic regions. We are capable of defining, designing, and presenting technology related business solutions that support global companies.
CentillionZ helps you maintain your competitive advantage by cost-effectively delivering highly skilled technical consultants when and how you need them most. We consistently provide companies with the technical resources necessary for growth to deliver the best solution for business growth.
Collaborate Solutions Inc is a full-service IT consulting company headquartered in Shrewsbury, MA with offices in Hyderabad, India. We stand for stability, strength, breadth of experience and national reach. We have grown very rapidly these past 6 years, and we owe our success to the high caliber consultants we place and the top quality service we provide to our clients.
Skolix is a total solutions company specialized in providing IT services and Business Process Outsourcing solutions. Our Information Technology initiatives range from application development to networking efforts and e-Business operations, playing a role in virtually all aspects of business. Skolix recognizes the need for companies to have state-of-the-art technologies at competitive prices. Skolix unique smart-sourcing strategy provides the backbone, the IT services while you focus on running your business.
We help you deliver organizational value by enabling you to collaborate more effectively with your communities of influence, operate more efficiently through process automation, and improve insight on organizational knowledge and the key success measures that drive your business.
Are you looking for a Website Design and Development Company in Hyderabad, India and Allen, Texas with real style and visual appeal? Levonsys is 10 years Old Website Design and Development Company based in Hyderabad, India and Allen, Texas USA. Levonsys have been relentlessly striving to promote ' a culture of Website Design and Development service excellence' to better make our chances to stand in the forefront. We would like to be at the disposal of our clients 24/7 and work round the clock to deliver the projects within turnaround time (TAT).
Enternet is an Information Technologies Consulting, Solutions and Services corporation, helping IT organizations operate more productively and profitably through a full spectrum of specialized staffing and project implementation products and services. We specialize in the areas of Systems Integration/EAI, ERP Functionality Extension, Business/Data Warehousing, Sales Force Automation/CRM, Middleware Functionality Templates, and Custom Application Development for vertical markets including telecommunications, healthcare, financial services, insurance, and energy.
Cynosure Technologies is a Houston based company that has and continues to be an industry leader in providing IT Staffing Services. Since its inception in 2005 Cynosure Technologies has successfully built numerous relationships with many private and public agencies throughout the country and provided solutions for their IT Staffing needs.
Data Soft Tech Solutions is an IT consulting services company, offering a wider range of solutions including Software Development Services, Systems Integration, ERP Solutions, Customer Relationship Management, Supply Chain Management.As a diverse IT solutions provider, We offer expertise aimed at assisting our customers to keep pace with the ever changing IT industry. We provide long term and quality solutions in a cost-effective manner.
Tekskills is a results-oriented IT services company, where our mission is to provide high quality solutions to our customer´s digital needs. Tekskills offers its diverse clientele end to end solutions in Enterprise Applications, Business Intelligence, Infrastructure Management and Global Sourcing with positive ROI.
We make sure to provide the right solution to you in various areas like Data warehousing, Application integration, web services and IT Consulting. We stand for stability, strength, breadth of experience and national reach.
Sapot Systems Inc. is a Leading Software Solution Development and Information Technology Consulting Company which provides Services to many Businesses around the United States led by certified professionals with expertise in Research, Design, Development and Delivery of high-end Technology Solutions.
We, Sharp Consulting, are here with the purpose to help our clients achieve the success they are in pursuance of.. We provide effective IT solutions which can help our clients in overcoming or rooting out complexities in their business. We are here with the prime motto to turn up our customers’(Returns on Investment) through our result-based IT services in arena of Operations Liberations, Customer Liberation, Workforce Liberation, Systems Management and Integration, Software Development, Software Testing.
Here welcomes into the uskcorp..
We are glad to inform you that our company has decided to establish a long term and productive relationship with you in the coming future. We would like to leverage your technical expertise in Java/J2EE technologies in providing corporate training to our consultants.
Centillionz
Satish Moturi, Operations Manager.
We acknowledge your deep understanding of Java/J2EE technologies. You really are excellent. We want you to know that we are extremely pleased with the quality of service you provide. Dataquest is glad to recommend you to others because of our satisfaction with your service. We would like to especially mention that your extended help in terms providing required job on job support is greatly appreciated. Each of our consultants has expressed enormous confidence in your training and has applauded your technical abilities.
Dataquest
Madhu Bolla, Vice President
The last 6 months of your partnership with Promatrix Corp has been both fruitful and productive for the organisation. In a very short span you have built a strong trust and professional relationship with the company. Your performance as a trainer and as a technical consultant has been remarkable. Your timely feedback on the various process areas has been excellent. It is our pleasure to inform you that the company is hoping to take this relationship to the next level by providing much more opportunities and by thrusting additional technical responsibilities.
Promatrix
Kannan Govindrajan, CFO


Sam Garg is an all-rounded front-end web developer. He's been building consumer facing websites for over 10 years. Specialises in responsive web solutions, allowing businesses to create and maintain a single website for desktop, tablet and mobile.
After graduating from University of Technology Sydney, as a Software Engineer, Sam Garg worked for several big names in Sydney and Amsterdam. Now Sam mostly does remote web freelancing, helping startups and small businesses improve their online presence. Does most of the work himself, but for bigger gigs, he has a small team of freelancers to help him out.
Sam has a keen eye for design, loves designing websites himself and working with designers, building beautiful and cutting-edge user-experiences together. Writes pixel-perfect CSS and clean & well-organised code. Sam firmly believes in minimalistic design and minimal code. Less is more :)
When he's not building websites, Sam loves exploring the world. He's lived in Sydney, Amsterdam, Colombia and currently resides on Isla Gran Canaria in Spain. Loves beaches and shooting beautiful landscapes. He's travelled with his camera to over 30 countries around Asia, Europe and Latin America and he's not done yet!


The Iliad
by Homer
Book 17: The Seventh Battle, For the Body of Patroclus—The Acts of Menelaus
Additional Information
- Year Published: 1899
- Language: English
- Country of Origin: Greece
- Source: Homer. (1899). The Iliad. Boston, MA; B.H. Stanton.
-
Readability:
- Flesch–Kincaid Level: 6.4
- Word Count: 7,147
- Genre: Epic
- Keywords: destiny, fate, glory, honor
- ✎ Cite This
Downloads
Menelaus, upon the death of Patroclus, defends his body from the enemy: Euphorbus, who attempts it, is slain. Hector advancing, Menelaus retires; but soon returns with Ajax, and drives him off. This, Glaucus objects to Hector as a flight, who thereupon puts on the armour he had won from Patroclus, and renews the battle. The Greeks give way, till Ajax rallies them: Æneas sustains the Trojans. Æneas and Hector Attempt the chariot of Achilles, which is borne off by Automedon. The horses of Achilles deplore the loss of Patroclus: Jupiter covers his body with a thick darkness: the noble prayer of Ajax on that occasion. Menelaus sends Antilochus to Achilles, with the news of Patroclus' death: then returns to the fight, where, though attacked with the utmost fury, he and Meriones, assisted by the Ajaces, bear off the body to the ships.
The time is the evening of the eight–and–twentieth day. The scene lies in the fields before Troy.
On the cold earth divine Patroclus spread,
Lies pierced with wounds among the vulgar dead.
Great Menelaus, touch'd with generous woe,
Springs to the front, and guards him from the foe.
Thus round her new–fallen young the heifer moves,
Fruit of her throes, and first–born of her loves;
And anxious (helpless as he lies, and bare)
Turns, and re–turns her, with a mother's care,
Opposed to each that near the carcase came,
His broad shield glimmers, and his lances flame.
The son of Panthus, skill'd the dart to send,
Eyes the dead hero, and insults the friend.
"This hand, Atrides, laid Patroclus low;
Warrior! desist, nor tempt an equal blow:
To me the spoils my prowess won, resign:
Depart with life, and leave the glory mine"
The Trojan thus: the Spartan monarch burn'd
With generous anguish, and in scorn return'd:
"Laugh'st thou not, Jove! from thy superior throne,
When mortals boast of prowess not their own?
Not thus the lion glories in his might,
Nor panther braves his spotted foe in fight,
Nor thus the boar (those terrors of the plain;)
Man only vaunts his force, and vaunts in vain.
But far the vainest of the boastful kind,
These sons of Panthus vent their haughty mind.
Yet 'twas but late, beneath my conquering steel
This boaster's brother, Hyperenor, fell;
Against our arm which rashly he defied,
Vain was his vigour, and as vain his pride.
These eyes beheld him on the dust expire,
No more to cheer his spouse, or glad his sire.
Presumptuous youth! like his shall be thy doom,
Go, wait thy brother to the Stygian gloom;
Or, while thou may'st, avoid the threaten'd fate;
Fools stay to feel it, and are wise too late."
Unmoved, Euphorbus thus: "That action known,
Come, for my brother's blood repay thy own.
His weeping father claims thy destined head,
And spouse, a widow in her bridal bed.
On these thy conquer'd spoils I shall bestow,
To soothe a consort's and a parent's woe.
No longer then defer the glorious strife,
Let heaven decide our fortune, fame, and life."
Swift as the word the missile lance he flings;
The well–aim'd weapon on the buckler rings,
But blunted by the brass, innoxious falls.
On Jove the father great Atrides calls,
Nor flies the javelin from his arm in vain,
It pierced his throat, and bent him to the plain;
Wide through the neck appears the grisly wound,
Prone sinks the warrior, and his arms resound.
The shining circlets of his golden hair,
Which even the Graces might be proud to wear,
Instarr'd with gems and gold, bestrow the shore,
With dust dishonour'd, and deform'd with gore.
As the young olive, in some sylvan scene,
Crown'd by fresh fountains with eternal green,
Lifts the gay head, in snowy flowerets fair,
And plays and dances to the gentle air;
When lo! a whirlwind from high heaven invades
The tender plant, and withers all its shades;
It lies uprooted from its genial bed,
A lovely ruin now defaced and dead:
Thus young, thus beautiful, Euphorbus lay,
While the fierce Spartan tore his arms away.
Proud of his deed, and glorious in the prize,
Affrighted Troy the towering victor flies:
Flies, as before some mountain lion's ire
The village curs and trembling swains retire,
When o'er the slaughter'd bull they hear him roar,
And see his jaws distil with smoking gore:
All pale with fear, at distance scatter'd round,
They shout incessant, and the vales resound.
Meanwhile Apollo view'd with envious eyes,
And urged great Hector to dispute the prize;
(In Mentes' shape, beneath whose martial care
The rough Ciconians learn'd the trade of war;)
"Forbear (he cried) with fruitless speed to chase
Achilles' coursers, of ethereal race;
They stoop not, these, to mortal man's command,
Or stoop to none but great Achilles' hand.
Too long amused with a pursuit so vain,
Turn, and behold the brave Euphorbus slain;
By Sparta slain! for ever now suppress'd
The fire which burn'd in that undaunted breast!"
Thus having spoke, Apollo wing'd his flight,
And mix'd with mortals in the toils of fight:
His words infix'd unutterable care
Deep in great Hector's soul: through all the war
He darts his anxious eye; and, instant, view'd
The breathless hero in his blood imbued,
(Forth welling from the wound, as prone he lay)
And in the victor's hands the shining prey.
Sheath'd in bright arms, through cleaving ranks he flies,
And sends his voice in thunder to the skies:
Fierce as a flood of flame by Vulcan sent,
It flew, and fired the nations as it went.
Atrides from the voice the storm divined,
And thus explored his own unconquer'd mind:
"Then shall I quit Patroclus on the plain,
Slain in my cause, and for my honour slain!
Desert the arms, the relics, of my friend?
Or singly, Hector and his troops attend?
Sure where such partial favour heaven bestow'd,
To brave the hero were to brave the god:
Forgive me, Greece, if once I quit the field;
'Tis not to Hector, but to heaven I yield.
Yet, nor the god, nor heaven, should give me fear,
Did but the voice of Ajax reach my ear:
Still would we turn, still battle on the plains,
And give Achilles all that yet remains
Of his and our Patroclus—" This, no more
The time allow'd: Troy thicken'd on the shore.
A sable scene! The terrors Hector led.
Slow he recedes, and sighing quits the dead.
So from the fold the unwilling lion parts,
Forced by loud clamours, and a storm of darts;
He flies indeed, but threatens as he flies,
With heart indignant and retorted eyes.
Now enter'd in the Spartan ranks, he turn'd
His manly breast, and with new fury burn'd;
O'er all the black battalions sent his view,
And through the cloud the godlike Ajax knew;
Where labouring on the left the warrior stood,
All grim in arms, and cover'd o'er with blood;
There breathing courage, where the god of day
Had sunk each heart with terror and dismay.
To him the king: "Oh Ajax, oh my friend!
Haste, and Patroclus' loved remains defend:
The body to Achilles to restore
Demands our care; alas, we can no more!
For naked now, despoiled of arms, he lies;
And Hector glories in the dazzling prize."
He said, and touch'd his heart. The raging pair
Pierced the thick battle, and provoke the war.
Already had stern Hector seized his head,
And doom'd to Trojan gods the unhappy dead;
But soon as Ajax rear'd his tower–like shield,
Sprung to his car, and measured back the field,
His train to Troy the radiant armour bear,
To stand a trophy of his fame in war.
Meanwhile great Ajax (his broad shield display'd)
Guards the dead hero with the dreadful shade;
And now before, and now behind he stood:
Thus in the centre of some gloomy wood,
With many a step, the lioness surrounds
Her tawny young, beset by men and hounds;
Elate her heart, and rousing all her powers,
Dark o'er the fiery balls each hanging eyebrow lours.
Fast by his side the generous Spartan glows
With great revenge, and feeds his inward woes.
But Glaucus, leader of the Lycian aids,
On Hector frowning, thus his flight upbraids:
"Where now in Hector shall we Hector find?
A manly form, without a manly mind.
Is this, O chief! a hero's boasted fame?
How vain, without the merit, is the name!
Since battle is renounced, thy thoughts employ
What other methods may preserve thy Troy:
'Tis time to try if Ilion's state can stand
By thee alone, nor ask a foreign hand:
Mean, empty boast! but shall the Lycians stake
Their lives for you? those Lycians you forsake?
What from thy thankless arms can we expect?
Thy friend Sarpedon proves thy base neglect;
Say, shall our slaughter'd bodies guard your walls,
While unreveng'd the great Sarpedon falls?
Even where he died for Troy, you left him there,
A feast for dogs, and all the fowls of air.
On my command if any Lycian wait,
Hence let him march, and give up Troy to fate.
Did such a spirit as the gods impart
Impel one Trojan hand or Trojan heart,
(Such as should burn in every soul that draws
The sword for glory, and his country's cause)
Even yet our mutual arms we might employ,
And drag yon carcase to the walls of Troy.
Oh! were Patroclus ours, we might obtain
Sarpedon's arms and honour'd corse again!
Greece with Achilles' friend should be repaid,
And thus due honours purchased to his shade.
But words are vain—Let Ajax once appear,
And Hector trembles and recedes with fear;
Thou dar'st not meet the terrors of his eye;
And lo! already thou prepar'st to fly."
The Trojan chief with fix'd resentment eyed
The Lycian leader, and sedate replied:
"Say, is it just, my friend, that Hector's ear
From such a warrior such a speech should hear?
I deem'd thee once the wisest of thy kind,
But ill this insult suits a prudent mind.
I shun great Ajax? I desert my train?
'Tis mine to prove the rash assertion vain;
I joy to mingle where the battle bleeds,
And hear the thunder of the sounding steeds.
But Jove's high will is ever uncontroll'd,
The strong he withers, and confounds the bold;
Now crowns with fame the mighty man, and now
Strikes the fresh garland from the victor's brow!
Come, through yon squadrons let us hew the way,
And thou be witness, if I fear to–day;
If yet a Greek the sight of Hector dread,
Or yet their hero dare defend the dead."
Then turning to the martial hosts, he cries:
"Ye Trojans, Dardans, Lycians, and allies!
Be men, my friends, in action as in name,
And yet be mindful of your ancient fame.
Hector in proud Achilles' arms shall shine,
Torn from his friend, by right of conquest mine."
He strode along the field, as thus he said:
(The sable plumage nodded o'er his head:)
Swift through the spacious plain he sent a look;
One instant saw, one instant overtook
The distant band, that on the sandy shore
The radiant spoils to sacred Ilion bore.
There his own mail unbraced the field bestrow'd;
His train to Troy convey'd the massy load.
Now blazing in the immortal arms he stands;
The work and present of celestial hands;
By aged Peleus to Achilles given,
As first to Peleus by the court of heaven:
His father's arms not long Achilles wears,
Forbid by fate to reach his father's years.
Him, proud in triumph, glittering from afar,
The god whose thunder rends the troubled air
Beheld with pity; as apart he sat,
And, conscious, look'd through all the scene of fate.
He shook the sacred honours of his head;
Olympus trembled, and the godhead said;
"Ah, wretched man! unmindful of thy end!
A moment's glory; and what fates attend!
In heavenly panoply divinely bright
Thou stand'st, and armies tremble at thy sight,
As at Achilles' self! beneath thy dart
Lies slain the great Achilles' dearer part.
Thou from the mighty dead those arms hast torn,
Which once the greatest of mankind had worn.
Yet live! I give thee one illustrious day,
A blaze of glory ere thou fad'st away.
For ah! no more Andromache shall come
With joyful tears to welcome Hector home;
No more officious, with endearing charms,
From thy tired limbs unbrace Pelides' arms!"
Then with his sable brow he gave the nod
That seals his word; the sanction of the god.
The stubborn arms (by Jove's command disposed)
Conform'd spontaneous, and around him closed:
Fill'd with the god, enlarged his members grew,
Through all his veins a sudden vigour flew,
The blood in brisker tides began to roll,
And Mars himself came rushing on his soul.
Exhorting loud through all the field he strode,
And look'd, and moved, Achilles, or a god.
Now Mesthles, Glaucus, Medon, he inspires,
Now Phorcys, Chromius, and Hippothous fires;
The great Thersilochus like fury found,
Asteropaeus kindled at the sound,
And Ennomus, in augury renown'd.
"Hear, all ye hosts, and hear, unnumber'd bands
Of neighbouring nations, or of distant lands!
'Twas not for state we summon'd you so far,
To boast our numbers, and the pomp of war:
Ye came to fight; a valiant foe to chase,
To save our present, and our future race.
Tor this, our wealth, our products, you enjoy,
And glean the relics of exhausted Troy.

Whatever hand shall win Patroclus slain,
Whoe'er shall drag him to the Trojan train,
With Hector's self shall equal honours claim;
With Hector part the spoil, and share the fame."
Fired by his words, the troops dismiss their fears,
They join, they thicken, they protend their spears;
Full on the Greeks they drive in firm array,
And each from Ajax hopes the glorious prey:
Vain hope! what numbers shall the field o'erspread,
What victims perish round the mighty dead!
Great Ajax mark'd the growing storm from far,
And thus bespoke his brother of the war:
"Our fatal day, alas! is come, my friend;
And all our wars and glories at an end!
'Tis not this corse alone we guard in vain,
Condemn'd to vultures on the Trojan plain;
We too must yield: the same sad fate must fall
On thee, on me, perhaps, my friend, on all.
See what a tempest direful Hector spreads,
And lo! it bursts, it thunders on our heads!
Call on our Greeks, if any hear the call,
The bravest Greeks: this hour demands them all."
The warrior raised his voice, and wide around
The field re–echoed the distressful sound.
"O chiefs! O princes, to whose hand is given
The rule of men; whose glory is from heaven!
Whom with due honours both Atrides grace:
Ye guides and guardians of our Argive race!
All, whom this well–known voice shall reach from far,
All, whom I see not through this cloud of war;
Come all! let generous rage your arms employ,
And save Patroclus from the dogs of Troy."
Oilean Ajax first the voice obey'd,
Swift was his pace, and ready was his aid:
Next him Idomeneus, more slow with age,
And Merion, burning with a hero's rage.
The long–succeeding numbers who can name?
But all were Greeks, and eager all for fame.
Fierce to the charge great Hector led the throng;
Whole Troy embodied rush'd with shouts along.
Thus, when a mountain billow foams and raves,
Where some swoln river disembogues his waves,
Full in the mouth is stopp'd the rushing tide,
The boiling ocean works from side to side,
The river trembles to his utmost shore,
And distant rocks re–bellow to the roar.
Nor less resolved, the firm Achaian band
With brazen shields in horrid circle stand.
Jove, pouring darkness o'er the mingled fight,
Conceals the warriors' shining helms in night:
To him, the chief for whom the hosts contend
Had lived not hateful, for he lived a friend:
Dead he protects him with superior care.
Nor dooms his carcase to the birds of air.
The first attack the Grecians scarce sustain,
Repulsed, they yield; the Trojans seize the slain.
Then fierce they rally, to revenge led on
By the swift rage of Ajax Telamon.
(Ajax to Peleus' son the second name,
In graceful stature next, and next in fame)
With headlong force the foremost ranks he tore;
So through the thicket bursts the mountain boar,
And rudely scatters, for a distance round,
The frighted hunter and the baying hound.
The son of Lethus, brave Pelasgus' heir,
Hippothous, dragg'd the carcase through the war;
The sinewy ankles bored, the feet he bound
With thongs inserted through the double wound:
Inevitable fate o'ertakes the deed;
Doom'd by great Ajax' vengeful lance to bleed:
It cleft the helmet's brazen cheeks in twain;
The shatter'd crest and horse–hair strow the plain:
With nerves relax'd he tumbles to the ground:
The brain comes gushing through the ghastly wound:
He drops Patroclus' foot, and o'er him spread,
Now lies a sad companion of the dead:
Far from Larissa lies, his native air,
And ill requites his parents' tender care.
Lamented youth! in life's first bloom he fell,
Sent by great Ajax to the shades of hell.
Once more at Ajax Hector's javelin flies;
The Grecian marking, as it cut the skies,
Shunn'd the descending death; which hissing on,
Stretch'd in the dust the great Iphytus' son,
Schedius the brave, of all the Phocian kind
The boldest warrior and the noblest mind:
In little Panope, for strength renown'd,
He held his seat, and ruled the realms around.
Plunged in his throat, the weapon drank his blood,
And deep transpiercing through the shoulder stood;
In clanging arms the hero fell and all
The fields resounded with his weighty fall.
Phorcys, as slain Hippothous he defends,
The Telamonian lance his belly rends;
The hollow armour burst before the stroke,
And through the wound the rushing entrails broke:
In strong convulsions panting on the sands
He lies, and grasps the dust with dying hands.
Struck at the sight, recede the Trojan train:
The shouting Argives strip the heroes slain.
And now had Troy, by Greece compell'd to yield,
Fled to her ramparts, and resign'd the field;
Greece, in her native fortitude elate,
With Jove averse, had turn'd the scale of fate:
But Phoebus urged Æneas to the fight;
He seem'd like aged Periphas to sight:
(A herald in Anchises' love grown old,
Revered for prudence, and with prudence bold.)
Thus he—"What methods yet, O chief! remain,
To save your Troy, though heaven its fall ordain?

Æneas through the form assumed descries
The power conceal'd, and thus to Hector cries:
"Oh lasting shame! to our own fears a prey,
We seek our ramparts, and desert the day.
A god, nor is he less, my bosom warms,
And tells me, Jove asserts the Trojan arms."
He spoke, and foremost to the combat flew:
The bold example all his hosts pursue.
Then, first, Leocritus beneath him bled,
In vain beloved by valiant Lycomede;
Who view'd his fall, and, grieving at the chance,
Swift to revenge it sent his angry lance;
The whirling lance, with vigorous force address'd,
Descends, and pants in Apisaon's breast;
From rich Paeonia's vales the warrior came,
Next thee, Asteropeus! in place and fame.
Asteropeus with grief beheld the slain,
And rush'd to combat, but he rush'd in vain:
Indissolubly firm, around the dead,
Rank within rank, on buckler buckler spread,
And hemm'd with bristled spears, the Grecians stood,
A brazen bulwark, and an iron wood.
Great Ajax eyes them with incessant care,
And in an orb contracts the crowded war,
Close in their ranks commands to fight or fall,
And stands the centre and the soul of all:
Fix'd on the spot they war, and wounded, wound
A sanguine torrent steeps the reeking ground:
On heaps the Greeks, on heaps the Trojans bled,
And, thickening round them, rise the hills of dead.
Greece, in close order, and collected might,
Yet suffers least, and sways the wavering fight;
Fierce as conflicting fires the combat burns,
And now it rises, now it sinks by turns.
In one thick darkness all the fight was lost;
The sun, the moon, and all the ethereal host
Seem'd as extinct: day ravish'd from their eyes,
And all heaven's splendours blotted from the skies.
Such o'er Patroclus' body hung the night,
The rest in sunshine fought, and open light;
Unclouded there, the Ærial azure spread,
No vapour rested on the mountain's head,
The golden sun pour'd forth a stronger ray,
And all the broad expansion flamed with day.
Dispersed around the plain, by fits they fight,
And here and there their scatter'd arrows light:
But death and darkness o'er the carcase spread,
There burn'd the war, and there the mighty bled.
Meanwhile the sons of Nestor, in the rear,
(Their fellows routed,) toss the distant spear,
And skirmish wide: so Nestor gave command,
When from the ships he sent the Pylian band.
The youthful brothers thus for fame contend,
Nor knew the fortune of Achilles' friend;
In thought they view'd him still, with martial joy,
Glorious in arms, and dealing death to Troy.
But round the corse the heroes pant for breath,
And thick and heavy grows the work of death:
O'erlabour'd now, with dust, and sweat, and gore,
Their knees, their legs, their feet, are covered o'er;
Drops follow drops, the clouds on clouds arise,
And carnage clogs their hands, and darkness fills their eyes.
As when a slaughter'd bull's yet reeking hide,
Strain'd with full force, and tugg'd from side to side,
The brawny curriers stretch; and labour o'er
The extended surface, drunk with fat and gore:
So tugging round the corse both armies stood;
The mangled body bathed in sweat and blood;
While Greeks and Ilians equal strength employ,
Now to the ships to force it, now to Troy.

Achilles in his ships at distance lay,
Nor knew the fatal fortune of the day;
He, yet unconscious of Patroclus' fall,
In dust extended under Ilion's wall,
Expects him glorious from the conquered plain,
And for his wish'd return prepares in vain;
Though well he knew, to make proud Ilion bend
Was more than heaven had destined to his friend.
Perhaps to him: this Thetis had reveal'd;
The rest, in pity to her son, conceal'd.
Still raged the conflict round the hero dead,
And heaps on heaps by mutual wounds they bled.
"Cursed be the man (even private Greeks would say)
Who dares desert this well–disputed day!
First may the cleaving earth before our eyes
Gape wide, and drink our blood for sacrifice;
First perish all, ere haughty Troy shall boast
We lost Patroclus, and our glory lost!"
Thus they: while with one voice the Trojans said,
"Grant this day, Jove! or heap us on the dead!"
Then clash their sounding arms; the clangours rise,
And shake the brazen concave of the skies.
Meantime, at distance from the scene of blood,
The pensive steeds of great Achilles stood:
Their godlike master slain before their eyes,
They wept, and shared in human miseries.
In vain Automedon now shakes the rein,
Now plies the lash, and soothes and threats in vain;
Nor to the fight nor Hellespont they go,
Restive they stood, and obstinate in woe:
Still as a tombstone, never to be moved,
On some good man or woman unreproved
Lays its eternal weight; or fix'd, as stands
A marble courser by the sculptor's hands,
Placed on the hero's grave. Along their face
The big round drops coursed down with silent pace,
Conglobing on the dust. Their manes, that late
Circled their arched necks, and waved in state,
Trail'd on the dust beneath the yoke were spread,
And prone to earth was hung their languid head:
Nor Jove disdain'd to cast a pitying look,
While thus relenting to the steeds he spoke:
"Unhappy coursers of immortal strain,
Exempt from age, and deathless, now in vain;
Did we your race on mortal man bestow,
Only, alas! to share in mortal woe?
For ah! what is there of inferior birth,
That breathes or creeps upon the dust of earth;
What wretched creature of what wretched kind,
Than man more weak, calamitous, and blind?
A miserable race! but cease to mourn:
For not by you shall Priam's son be borne
High on the splendid car: one glorious prize
He rashly boasts: the rest our will denies.
Ourself will swiftness to your nerves impart,
Ourself with rising spirits swell your heart.
Automedon your rapid flight shall bear
Safe to the navy through the storm of war.
For yet 'tis given to Troy to ravage o'er
The field, and spread her slaughters to the shore;
The sun shall see her conquer, till his fall
With sacred darkness shades the face of all."
He said; and breathing in the immortal horse
Excessive spirit, urged them to the course;
From their high manes they shake the dust, and bear
The kindling chariot through the parted war:
So flies a vulture through the clamorous train
Of geese, that scream, and scatter round the plain.
From danger now with swiftest speed they flew,
And now to conquest with like speed pursue;
Sole in the seat the charioteer remains,
Now plies the javelin, now directs the reins:
Him brave Alcimedon beheld distress'd,
Approach'd the chariot, and the chief address'd:
"What god provokes thee rashly thus to dare,
Alone, unaided, in the thickest war?
Alas! thy friend is slain, and Hector wields
Achilles' arms triumphant in the fields."
"In happy time (the charioteer replies)
The bold Alcimedon now greets my eyes;
No Greek like him the heavenly steeds restrains,
Or holds their fury in suspended reins:
Patroclus, while he lived, their rage could tame,
But now Patroclus is an empty name!
To thee I yield the seat, to thee resign
The ruling charge: the task of fight be mine."
He said. Alcimedon, with active heat,
Snatches the reins, and vaults into the seat.
His friend descends. The chief of Troy descried,
And call'd Æneas fighting near his side.
"Lo, to my sight, beyond our hope restored,
Achilles' car, deserted of its lord!
The glorious steeds our ready arms invite,
Scarce their weak drivers guide them through the fight.
Can such opponents stand when we assail?
Unite thy force, my friend, and we prevail."
The son of Venus to the counsel yields;
Then o'er their backs they spread their solid shields:
With brass refulgent the broad surface shined,
And thick bull–hides the spacious concave lined.
Them Chromius follows, Aretus succeeds;
Each hopes the conquest of the lofty steeds:
In vain, brave youths, with glorious hopes ye burn,
In vain advance! not fated to return.
Unmov'd, Automedon attends the fight,
Implores the Eternal, and collects his might.
Then turning to his friend, with dauntless mind:
"Oh keep the foaming coursers close behind!
Full on my shoulders let their nostrils blow,
For hard the fight, determined is the foe;
'Tis Hector comes: and when he seeks the prize,
War knows no mean; he wins it or he dies."
Then through the field he sends his voice aloud,
And calls the Ajaces from the warring crowd,
With great Atrides. "Hither turn, (he said,)
Turn where distress demands immediate aid;
The dead, encircled by his friends, forego,
And save the living from a fiercer foe.
Unhelp'd we stand, unequal to engage
The force of Hector, and Æneas' rage:
Yet mighty as they are, my force to prove
Is only mine: the event belongs to Jove."
He spoke, and high the sounding javelin flung,
Which pass'd the shield of Aretus the young:
It pierced his belt, emboss'd with curious art,
Then in the lower belly struck the dart.
As when a ponderous axe, descending full,
Cleaves the broad forehead of some brawny bull:
Struck 'twixt the horns, he springs with many a bound,
Then tumbling rolls enormous on the ground:
Thus fell the youth; the air his soul received,
And the spear trembled as his entrails heaved.
Now at Automedon the Trojan foe
Discharged his lance; the meditated blow,
Stooping, he shunn'd; the javelin idly fled,
And hiss'd innoxious o'er the hero's head;
Deep rooted in the ground, the forceful spear
In long vibrations spent its fury there.
With clashing falchions now the chiefs had closed,
But each brave Ajax heard, and interposed;
Nor longer Hector with his Trojans stood,
But left their slain companion in his blood:
His arms Automedon divests, and cries,
"Accept, Patroclus, this mean sacrifice:
Thus have I soothed my griefs, and thus have paid,
Poor as it is, some offering to thy shade."

And now Minerva from the realms of air
Descends impetuous, and renews the war;
For, pleased at length the Grecian arms to aid,
The lord of thunders sent the blue–eyed maid.
As when high Jove denouncing future woe,
O'er the dark clouds extends his purple bow,
(In sign of tempests from the troubled air,
Or from the rage of man, destructive war,)
The drooping cattle dread the impending skies,
And from his half–till'd field the labourer flies:
In such a form the goddess round her drew
A livid cloud, and to the battle flew.
Assuming Phoenix' shape on earth she falls,
And in his well–known voice to Sparta calls:
"And lies Achilles' friend, beloved by all,
A prey to dogs beneath the Trojan wall?
What shame 'o Greece for future times to tell,
To thee the greatest in whose cause he fell!"
"O chief, O father! (Atreus' son replies)
O full of days! by long experience wise!
What more desires my soul, than here unmoved
To guard the body of the man I loved?
Ah, would Minerva send me strength to rear
This wearied arm, and ward the storm of war!
But Hector, like the rage of fire, we dread,
And Jove's own glories blaze around his head!"
Pleased to be first of all the powers address'd,
She breathes new vigour in her hero's breast,
And fills with keen revenge, with fell despite,
Desire of blood, and rage, and lust of fight.
So burns the vengeful hornet (soul all o'er),
Repulsed in vain, and thirsty still of gore;
(Bold son of air and heat) on angry wings
Untamed, untired, he turns, attacks, and stings.
Fired with like ardour fierce Atrides flew,
And sent his soul with every lance he threw.
There stood a Trojan, not unknown to fame,
Ætion's son, and Podes was his name:
With riches honour'd, and with courage bless'd,
By Hector loved, his comrade, and his guest;
Through his broad belt the spear a passage found,
And, ponderous as he falls, his arms resound.
Sudden at Hector's side Apollo stood,
Like Phaenops, Asius' son, appear'd the god;
(Asius the great, who held his wealthy reign
In fair Abydos, by the rolling main.)
"Oh prince! (he cried) Oh foremost once in fame!
What Grecian now shall tremble at thy name?
Dost thou at length to Menelaus yield,
A chief once thought no terror of the field?
Yet singly, now, the long–disputed prize
He bears victorious, while our army flies:
By the same arm illustrious Podes bled;
The friend of Hector, unrevenged, is dead!"
This heard, o'er Hector spreads a cloud of woe,
Rage lifts his lance, and drives him on the foe.
But now the Eternal shook his sable shield,
That shaded Ide and all the subject field
Beneath its ample verge. A rolling cloud
Involved the mount; the thunder roar'd aloud;
The affrighted hills from their foundations nod,
And blaze beneath the lightnings of the god:
At one regard of his all–seeing eye
The vanquish'd triumph, and the victors fly.
Then trembled Greece: the flight Peneleus led;
For as the brave Boeotian turn'd his head
To face the foe, Polydamas drew near,
And razed his shoulder with a shorten'd spear:
By Hector wounded, Leitus quits the plain,
Pierced through the wrist; and raging with the pain,
Grasps his once formidable lance in vain.
As Hector follow'd, Idomen address'd
The flaming javelin to his manly breast;
The brittle point before his corslet yields;
Exulting Troy with clamour fills the fields:
High on his chariots the Cretan stood,
The son of Priam whirl'd the massive wood.
But erring from its aim, the impetuous spear
Struck to the dust the squire and charioteer
Of martial Merion: Coeranus his name,
Who left fair Lyctus for the fields of fame.
On foot bold Merion fought; and now laid low,
Had graced the triumphs of his Trojan foe,
But the brave squire the ready coursers brought,
And with his life his master's safety bought.
Between his cheek and ear the weapon went,
The teeth it shatter'd, and the tongue it rent.
Prone from the seat he tumbles to the plain;
His dying hand forgets the falling rein:
This Merion reaches, bending from the car,
And urges to desert the hopeless war:
Idomeneus consents; the lash applies;
And the swift chariot to the navy flies.
Not Ajax less the will of heaven descried,
And conquest shifting to the Trojan side,
Turn'd by the hand of Jove. Then thus begun,
To Atreus's seed, the godlike Telamon:
"Alas! who sees not Jove's almighty hand
Transfers the glory to the Trojan band?
Whether the weak or strong discharge the dart,
He guides each arrow to a Grecian heart:
Not so our spears; incessant though they rain,
He suffers every lance to fall in vain.
Deserted of the god, yet let us try
What human strength and prudence can supply;
If yet this honour'd corse, in triumph borne,
May glad the fleets that hope not our return,
Who tremble yet, scarce rescued from their fates,
And still hear Hector thundering at their gates.
Some hero too must be despatch'd to bear
The mournful message to Pelides' ear;
For sure he knows not, distant on the shore,
His friend, his loved Patroclus, is no more.
But such a chief I spy not through the host:
The men, the steeds, the armies, all are lost
In general darkness—Lord of earth and air!
Oh king! Oh father! hear my humble prayer:
Dispel this cloud, the light of heaven restore;
Give me to see, and Ajax asks no more:
If Greece must perish, we thy will obey,
But let us perish in the face of day!"
With tears the hero spoke, and at his prayer
The god relenting clear'd the clouded air;
Forth burst the sun with all–enlightening ray;
The blaze of armour flash'd against the day.
"Now, now, Atrides! cast around thy sight;
If yet Antilochus survives the fight,
Let him to great Achilles' ear convey
The fatal news"—Atrides hastes away.
So turns the lion from the nightly fold,
Though high in courage, and with hunger bold,
Long gall'd by herdsmen, and long vex'd by hounds,
Stiff with fatigue, and fretted sore with wounds;
The darts fly round him from a hundred hands,
And the red terrors of the blazing brands:
Till late, reluctant, at the dawn of day
Sour he departs, and quits the untasted prey,
So moved Atrides from his dangerous place
With weary limbs, but with unwilling pace;
The foe, he fear'd, might yet Patroclus gain,
And much admonish'd, much adjured his train:
"O guard these relics to your charge consign'd,
And bear the merits of the dead in mind;
How skill'd he was in each obliging art;
The mildest manners, and the gentlest heart:
He was, alas! but fate decreed his end,
In death a hero, as in life a friend!"
So parts the chief; from rank to rank he flew,
And round on all sides sent his piercing view.
As the bold bird, endued with sharpest eye
Of all that wings the mid Ærial sky,
The sacred eagle, from his walks above
Looks down, and sees the distant thicket move;
Then stoops, and sousing on the quivering hare,
Snatches his life amid the clouds of air.
Not with less quickness, his exerted sight
Pass'd this and that way, through the ranks of fight:
Till on the left the chief he sought, he found,
Cheering his men, and spreading deaths around:
To him the king: "Beloved of Jove! draw near,
For sadder tidings never touch'd thy ear;
Thy eyes have witness'd what a fatal turn!
How Ilion triumphs, and the Achaians mourn.
This is not all: Patroclus, on the shore
Now pale and dead, shall succour Greece no more.
Fly to the fleet, this instant fly, and tell
The sad Achilles, how his loved–one fell:
He too may haste the naked corse to gain:
The arms are Hector's, who despoil'd the slain."
The youthful warrior heard with silent woe,
From his fair eyes the tears began to flow:
Big with the mighty grief, he strove to say
What sorrow dictates, but no word found way.
To brave Laodocus his arms he flung,
Who, near him wheeling, drove his steeds along;
Then ran the mournful message to impart,
With tearful eyes, and with dejected heart.
Swift fled the youth: nor Menelaus stands
(Though sore distress'd) to aid the Pylian bands;
But bids bold Thrasymede those troops sustain;
Himself returns to his Patroclus slain.
"Gone is Antilochus (the hero said);
But hope not, warriors, for Achilles' aid:
Though fierce his rage, unbounded be his woe,
Unarm'd, he fights not with the Trojan foe.
'Tis in our hands alone our hopes remain,
'Tis our own vigour must the dead regain,
And save ourselves, while with impetuous hate
Troy pours along, and this way rolls our fate."
"'Tis well (said Ajax), be it then thy care,
With Merion's aid, the weighty corse to rear;
Myself, and my bold brother will sustain
The shock of Hector and his charging train:
Nor fear we armies, fighting side by side;
What Troy can dare, we have already tried,
Have tried it, and have stood." The hero said.
High from the ground the warriors heave the dead.
A general clamour rises at the sight:
Loud shout the Trojans, and renew the fight.
Not fiercer rush along the gloomy wood,
With rage insatiate, and with thirst of blood,
Voracious hounds, that many a length before
Their furious hunters, drive the wounded boar;
But if the savage turns his glaring eye,
They howl aloof, and round the forest fly.
Thus on retreating Greece the Trojans pour,
Wave their thick falchions, and their javelins shower:
But Ajax turning, to their fears they yield,
All pale they tremble and forsake the field.
While thus aloft the hero's corse they bear,
Behind them rages all the storm of war:
Confusion, tumult, horror, o'er the throng
Of men, steeds, chariots, urged the rout along:
Less fierce the winds with rising flames conspire
To whelm some city under waves of fire;
Now sink in gloomy clouds the proud abodes,
Now crack the blazing temples of the gods;
The rumbling torrent through the ruin rolls,
And sheets of smoke mount heavy to the poles.
The heroes sweat beneath their honour'd load:
As when two mules, along the rugged road,
From the steep mountain with exerted strength
Drag some vast beam, or mast's unwieldy length;
Inly they groan, big drops of sweat distil,
The enormous timber lumbering down the hill:
So these—Behind, the bulk of Ajax stands,
And breaks the torrent of the rushing bands.
Thus when a river swell'd with sudden rains
Spreads his broad waters o'er the level plains,
Some interposing hill the stream divides.
And breaks its force, and turns the winding tides.
Still close they follow, close the rear engage;
Æneas storms, and Hector foams with rage:
While Greece a heavy, thick retreat maintains,
Wedged in one body, like a flight of cranes,
That shriek incessant, while the falcon, hung
High on poised pinions, threats their callow young.
So from the Trojan chiefs the Grecians fly,
Such the wild terror, and the mingled cry:
Within, without the trench, and all the way,
Strow'd in bright heaps, their arms and armour lay;
Such horror Jove impress'd! yet still proceeds
The work of death, and still the battle bleeds.


The DOM element where to render the object.
DOM Element, default = null
Usually it is a DIV, but can be any block element.
If you change .box property you will need to call .render() method
to render widget inside the new DOM element. If you specify a selector, there is no need to define .box because
it will be automatically set.
However, you could have created a layout without rendering it anywhere:
The layout is created in memory. You can render it in one of the following ways:
or
or


We’re the quaint Cheers-like spot in Pinellas Park where everyone knows your name, and we’re ready to share our simple, home-style cooking with you. Serving classic diner breakfasts all day long, plus big, delicious burgers, steaks, and sandwiches, our hearty portions and warm, inviting atmosphere will have you feeling right at home. We like to show a little sweet flair with our fare too, which is why we serve to-die-for cakes, pies, and other classic desserts. Taste the love in our food, and join us at Tampa Bay’s friendliest diner today.
If there are any concerns or suggestions that you may have, below is a form you can fill out and we will do our best to reply as quickly as we can