#include "pqexpbuffer.h"#include "prompt.h"

Go to the source code of this file.
Typedefs | |
| typedef struct PsqlScanStateData * | PsqlScanState |
Enumerations | |
| enum | PsqlScanResult { PSCAN_SEMICOLON, PSCAN_BACKSLASH, PSCAN_INCOMPLETE, PSCAN_EOL } |
| enum | slash_option_type { OT_NORMAL, OT_SQLID, OT_SQLIDHACK, OT_FILEPIPE, OT_WHOLE_LINE, OT_NO_EVAL } |
Functions | |
| PsqlScanState | psql_scan_create (void) |
| void | psql_scan_destroy (PsqlScanState state) |
| void | psql_scan_setup (PsqlScanState state, const char *line, int line_len) |
| void | psql_scan_finish (PsqlScanState state) |
| PsqlScanResult | psql_scan (PsqlScanState state, PQExpBuffer query_buf, promptStatus_t *prompt) |
| void | psql_scan_reset (PsqlScanState state) |
| bool | psql_scan_in_quote (PsqlScanState state) |
| char * | psql_scan_slash_command (PsqlScanState state) |
| char * | psql_scan_slash_option (PsqlScanState state, enum slash_option_type type, char *quote, bool semicolon) |
| void | psql_scan_slash_command_end (PsqlScanState state) |
| typedef struct PsqlScanStateData* PsqlScanState |
Definition at line 17 of file psqlscan.h.
| enum PsqlScanResult |
Definition at line 20 of file psqlscan.h.
{
PSCAN_SEMICOLON, /* found command-ending semicolon */
PSCAN_BACKSLASH, /* found backslash command */
PSCAN_INCOMPLETE, /* end of line, SQL statement incomplete */
PSCAN_EOL /* end of line, SQL possibly complete */
} PsqlScanResult;
| enum slash_option_type |
Definition at line 29 of file psqlscan.h.
{
OT_NORMAL, /* normal case */
OT_SQLID, /* treat as SQL identifier */
OT_SQLIDHACK, /* SQL identifier, but don't downcase */
OT_FILEPIPE, /* it's a filename or pipe */
OT_WHOLE_LINE, /* just snarf the rest of the line */
OT_NO_EVAL /* no expansion of backticks or variables */
};
| PsqlScanResult psql_scan | ( | PsqlScanState | state, | |
| PQExpBuffer | query_buf, | |||
| promptStatus_t * | prompt | |||
| ) |
Referenced by MainLoop().
| PsqlScanState psql_scan_create | ( | void | ) |
Referenced by main(), and MainLoop().
| void psql_scan_destroy | ( | PsqlScanState | state | ) |
Referenced by main(), and MainLoop().
| void psql_scan_finish | ( | PsqlScanState | state | ) |
Referenced by MainLoop().
| bool psql_scan_in_quote | ( | PsqlScanState | state | ) |
Referenced by MainLoop().
| void psql_scan_reset | ( | PsqlScanState | state | ) |
Referenced by exec_command(), and MainLoop().
| void psql_scan_setup | ( | PsqlScanState | state, | |
| const char * | line, | |||
| int | line_len | |||
| ) |
Referenced by main(), and MainLoop().
| char* psql_scan_slash_command | ( | PsqlScanState | state | ) |
Referenced by HandleSlashCmds().
| void psql_scan_slash_command_end | ( | PsqlScanState | state | ) |
Referenced by HandleSlashCmds().
| char* psql_scan_slash_option | ( | PsqlScanState | state, | |
| enum slash_option_type | type, | |||
| char * | quote, | |||
| bool | semicolon | |||
| ) |
Referenced by exec_command(), HandleSlashCmds(), and read_connect_arg().
1.7.1