• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript access to databases (was: A bit of philosophy about Database events)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript access to databases (was: A bit of philosophy about Database events)


  • Subject: Re: AppleScript access to databases (was: A bit of philosophy about Database events)
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 22 Mar 2010 10:29:36 +0100

Le 22 mars 2010 à 01:01:23, BareFeet a écrit :

> [...]
>
> You can, however, create and access true SQLite database files from AppleScript. The simplest way is to use "do shell script" to use the command line tool "sqlite3".
>
> Here's the code I was using to execute arbitrary SQLite commands and selects.
>
> [...]
> 	set shellCommand to "echo " & (quoted form of sqlCommand) & " | " & sqlite3Path & space & quoted form of databasePath
> [...]

Hello Tom,

This is just about a detail...
Perhaps would it be more appropriate to make use of:

	/usr/bin/sqlite3 <path to db> <sql statements>

instead of:

	echo <sql statements> | /usr/bin/sqlite3 <path to db>

It may be expected to be slightly more efficient; one also should avoid the various prompts from an interactive session, as well as the possible transformation of <sql statements> by the echo command.

Axel,
Somewhat OT

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: AppleScript access to databases
      • From: BareFeet <email@hidden>
References: 
 >Re: A bit of philosophy about Database events (From: Rob Lewis <email@hidden>)
 >AppleScript access to databases (was: A bit of philosophy about Database events) (From: BareFeet <email@hidden>)

  • Prev by Date: AppleScript access to databases (was: A bit of philosophy about Database events)
  • Next by Date: Re: AppleScript access to databases
  • Previous by thread: AppleScript access to databases (was: A bit of philosophy about Database events)
  • Next by thread: Re: AppleScript access to databases
  • Index(es):
    • Date
    • Thread